Date: 2016/07/08 03:57:15 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
########################################################################################################################################
#--------------------------------------------------------------------------------------------------------------------------------------#
#| Lucius Quest 1 |#
#| Les Pirates du soleil bleu |#
#| Categorie: Quest |#
#| Author: Oruss7 |#
#| Time: 5H |#
#| Version: 0.1 |#
#--------------------------------------------------------------------------------------------------------------------------------------#
########################################################################################################################################
#-----------------------------------------------------------------------------------------------------------------#
# COMMANDS: #
# - npc assignment --set LuciusQuest_1 : Set Lucius NPC script #
# - npc assignment --set LuciusHint_1 : Set First Hint NPC script #
# - npc assignment --set LuciusHint_2 : Set Second Hint NPC script #
# - npc assignment --set LuciusHint_3 : Set Third Hint NPC script #
# #
# PERMISSIONS : #
# #
#-----------------------------------------------------------------------------------------------------------------#
# Icon script
LuciusQuest_1_Icon:
type: item
debug: true
# Unused in the gui
display name: Journal des Quêtes
# The material used as the gui icon for this quest
material: i@boat
# A flag required to mark the quest as Available or LOCKED.
# Leave this empty '' if you do not want your quest to be repeatable.
quest_unlocked_flag: ''
# Set to true to not display this quest if the player does not have the specified unlock flag.
# Set to false to show the quest as LOCKED if the player does not have the specified unlock flag.
hide_ifLocked: true
# A flag for repeatable quests. Flag must store the number of times the quest has been completed.
# Once completed, repeatable quests will only show up in the quest journal if they are in the
# Active_Quests player flag, but will always display in the completed gui after the first completion.
# There's potential for stale data to display in the Objectives view, so we might need to address that in the future.
times_completed_flag: QuestGUI.Lucius.Quest.1.Completed
# What to display the quest title as
quest_title: Les pirates du soleil bleu
# What to display for the description of this quest
quest_desc: Neutralise les pirates du soleil bleu
# A flag to store the number value for the players current objective
# If the player is currently doing objective 3 than the value of this flag should be 3
quest_progress_flag: QuestGUI.Lucius.Quest.1.Objective
# Define your quest objectives here. Must use a numbered node structure.
# Number corresponds to quest_progress_flag
objectives:
1:
# The text to display as the name of this objective
name: Enquêter
# A long description of this objective
description: Enquête sur l'île et trouve des indices.
# Set to true to remove this objective from the list until the player is at this objective
# Set to false to allow this objective to be displayed before they reach this objective
hide: false
# Set to true to show this objective as LOCKED hiding all info about it until the player reaches this objective
# Set to false to show all info about this objective even if the player hasn't reached it yet
lockDisplay: false
# Set the icon to display for this objective
icon: i@paper
# A list of flags that hold stats for this objective.
# Value must be set as a split list in the format statname/flagname
# statname is the phrase displayed as the title of this stat
# flagname is the flag that holds the value to display
progress_flags:
- 'Enquêter/QuestGUI.Lucius.Quest.1.Objectives.1'
# Script run when an admin resets this quest for a player
reset:
- flag %player% QuestGUI.Lucius.Quest.1:!
- flag %player% QuestGUI.QuestsCompleted:<-:LuciusQuest_1
- flag %player% QuestGUI.Active_Quests:<-:LuciusQuest_1
# Script run when an admin completes this quest for a player
complete:
- if <def[player].flag[QuestGUI.QuestsCompleted].as_list> !contains LuciusQuest_1 {
- flag %player% QuestGUI.QuestsCompleted:->:LuciusQuest_1
}
- flag %player% QuestGUI.Lucius.Quest.1.Completed:++
- flag %player% QuestGUI.Active_Quests:<-:LuciusQuest_1
# Script run when an admin activates this quest for a player
activate:
- run player:%player% MyQuestGUIQuest_1_Dialogue_2
# Script run when an admin deactivates this quest for a player
deactivate:
- narrate "stub"
#
#
# END Icon script
#--------------------------------------
#
# Quest Trophies
# - Item script containers for all obtainable quest trophies
# - Must have the quest: node with the scriptname of the quest it belongs to
#
#
# END Quest Trophies
#--------------------------------------
#
# END Requisite Data for QuestGUI
# - The actual quest is upto you!
#
################################################################################
#
# Lucius Quest 1
# - Assign this to an NPC and click on him. He'll walk you through the rest.
#
LuciusQuest_1:
type: assignment
debug: true
actions:
on spawn:
- inject locally init instantly
on assignment:
- inject locally init instantly
on click:
- inject locally click instantly
on death:
- inject locally death instantly
init:
- trigger name:chat state:false
- trigger name:click state:true cooldown:1 radius:8
- trigger name:proximity state:true cooldown:5 radius:5
- trigger name:damage state:true cooldown:3
- lookclose true range:5 realistic
- vulnerable state:false
- execute as_npc "npc select <npc.id>"
- execute as_npc "Trait Health"
- wait 1
- ^execute as_npc "Trait sentinel"
- execute as_npc "sentinel Health 30"
- execute as_npc "sentinel invincible"
- execute as_npc "sentinel Armor 1.0"
- execute as_npc "sentinel Strength 2"
- execute as_npc "sentinel Range 18"
- execute as_npc "sentinel Speed 0.8"
- execute as_npc "sentinel Attackrate 1"
- execute as_npc "sentinel HealRate 0"
- execute as_npc "sentinel Nightvision 5"
- execute as_npc "sentinel Respawn 30"
- execute as_npc "sentinel ignore add entity:monster"
- execute as_npc "npc targetable"
- execute as_npc "npc respawn 60"
- equip <npc> hand:i@air
- if <npc.name> != 'Lucius' {
- adjust <npc> 'name:Lucius'
}
click:
# No reapetable quest
- if <player.flag[QuestGUI.Lucius.Quest.1.Objective]> == 'Complete' {
- queue clear
}
- if <player.flag[QuestGUI.Active_Quests].as_list||li@> contains 'LuciusQuest_1' {
- define objective "<player.flag[QuestGUI.Lucius.Quest.1.Objective]||null>"
# objective 2
- if %objective% == 2 {
- narrate "<green><npc.name><white> -> <green><player.name><white>: <yellow>Vous avez trouvé notre taupe ?"
- wait 3
- narrate "<green><player.name><white> -> <green><npc.name><white>: J'ai trouvé tous les indices qu'il nous fallait."
- wait 2
- narrate "<green><npc.name><white> -> <green><player.name><white>: <yellow> Très bien, donnez les moi."
- wait 2
- take 'item:i@LuciusQuest_1_Item_Hints' "from:<player.inventory>"
- wait 3
- narrate "<green><npc.name><white> -> <green><player.name><white>: <yellow> Excellent. Je n'ai plus besoin de vous maintenant."
- wait 3
- equip <npc> hand:i@LuciusQuest_1_Item_Lucius_Sword
- wait 3
- narrate "<green><player.name><white> -> <green><npc.name><white>: Que faites vous ?!"
- wait 3
- narrate "<green><npc.name><white> -> <green><player.name><white>: <yellow> C'est regrettable mais si on apprend que je vous ai fait faire mon travail, on se passera de mes services.."
- wait 4
- execute as_npc "npc select <npc.id>"
# now vulnerable =)
- execute as_npc "sentinel invincible"
- vulnerable state:true
- execute as_npc "sentinel addTarget player:<player.name>"
- attack
}
- queue clear
}
# objective 1
- flag <player> QuestGUI.Active_Quests:->:LuciusQuest_1
- flag <player> QuestGUI.Lucius.Quest.1.Objective:1
- narrate "<green>Inconnu<white><&co> <green><player.name><yellow>, je viens te faire sortir d'ici."
- wait 2
- narrate "<green><player.name><white> -> <green>Inconnu<white>: Que c'est-il passé ? Pourquoi je suis dans ce cachot ?!"
- wait 3
- narrate "<green>Inconnu<white><&co> <yellow>Le navire marchand sur lequel tu voyagais a été attaqué par les Pirates du Soleil Bleu."
- wait 3
- narrate "<green>Inconnu<white><&co> <yellow>Ils ont tué tout le monde sauf toi. Un voyageur de ta prestence, ils préfèrent t'échanger contre de l'or."
- wait 4
- narrate "<green><player.name><white> -> <green>Inconnu<white>: Mais qui êtes vous ?"
- wait 3
- narrate "<green>Inconnu<white><&co> <yellow>Je suis <green><npc.name><yellow>, je suis un espion du Roi, et vous allez m'aider à anéantir ses pirates !"
- wait 3
- narrate "<green><player.name><white> -> <green><npc.name><white>: Très bien, que dois-je faire ?"
- wait 2
- narrate "<green><npc.name><white> -> <green><player.name><white>: <yellow>Les pirates du soleil bleu ont toujours un coup d'avance sur nous."
- wait 3
- narrate "<green><player.name><white> -> <green><npc.name><white>: Et vous pensez qu'il y a une taupe."
- wait 2
- narrate "<green><npc.name><white> -> <green><player.name><white>: <yellow>Ce n'est pas une hypothèse, c'est une certitude."
- wait 3
- narrate "<green><npc.name><white> -> <green><player.name><white>: <yellow>Enquêtez sur l'île et trouvez des indices qui pourront m'aider à démasquer cette taupe."
- wait 3
- narrate "<green><npc.name><white> -> <green><player.name><white>: <yellow>Retrouvez moi au nord de la rivière quand vous aurez terminé."
- wait 3
- narrate "<green><npc.name><white> -> <green><player.name><white>: <yellow>Vous n'avez pas le choix, ou vous restez enfermé ici ou vous m'aider et je vous présenterais au Roi."
- wait 3
- narrate "<green><player.name><white> -> <green><npc.name><white>: Marché conclu."
- wait 3
- cast blindness duration:2s hide_particles
- ^give 'item:Steak' "to:<player.inventory>" qty:7
- ^playsound <player.location> sound:BLOCK_IRON_DOOR_CLOSE
- teleport <player> <l@1286.5,40.0,-1205.5,3.2,0.0,delerorn>
- wait 3
- title 'title:<yellow>Nouvelle Quête' 'subtitle:<white>Les Pirates du Soleil Bleu' targets:<player>
- wait 2
- narrate "<yellow><&lb>QUETE<&rb><white> Trouvez des indices sur la taupe des pirates du soleil bleu. (0/3)"
- ^playsound <player.location> sound:ENTITY_EXPERIENCE_ORB_TOUCH
- wait 10
- title 'title: ' 'subtitle:Un aventure proposée par' targets:<player>
- wait 5
- title 'title: ' 'subtitle:<blue>Les Royaumes d<&chr[00B4]>Eredrim' targets:<player>
- flag <player> QuestGUI.Lucius.Quest.1.Timer:<server.current_time_millis>
death:
- narrate "<green><npc.name><white> -> <green><player.name><white>: <yellow> Arrgghhh !!!"
- equip <npc> hand:i@air
- ^playsound <player.location> sound:ENTITY_HOSTILE_DEATH
- wait 1
- ^narrate "<green><npc.name><gray> est mort."
- drop item:i@LuciusQuest_1_Item_Lucius_Sword qty:1 location:<npc.location>
- flag <%player%> QuestGUI.Lucius.Quest.1.Objectives.2:<server.current_time_millis.sub_int[<%player%.flag[QuestGUI.Lucius.Quest.1.Timer]>].div[1000].as_duration.formatted>
# quest finished
- run LuciusQuestEnd def:<player>
# Check player discover 3 hint
LuciusCheckHint:
type: task
debug: true
definitions: player
script:
- if ( <%player%.flag[QuestGUI.Lucius.Quest.1.Objective]||null> == 1 ) {
# All 3 hint reached
- if ( <%player%.flag[QuestGUI.Lucius.Quest.1.Objectives.1.hint.1]||false> && <%player%.flag[QuestGUI.Lucius.Quest.1.Objectives.1.hint.2]||false> && <%player%.flag[QuestGUI.Lucius.Quest.1.Objectives.1.hint.3]||false> ) {
- narrate "<yellow><&lb>QUETE<&rb><white> Trouvez des indices sur la taupe des pirates du soleil bleu (3/3)." targets:<%player%>
- flag <%player%> QuestGUI.Lucius.Quest.1.Objectives.1.hint.1:!
- flag <%player%> QuestGUI.Lucius.Quest.1.Objectives.1.hint.2:!
- flag <%player%> QuestGUI.Lucius.Quest.1.Objectives.1.hint.3:!
- narrate "<yellow><&lb>QUETE<&rb><white> Retrouvez <green>Lucius<white> au nord de la rivière." targets:<%player%>
- flag <%player%> QuestGUI.Lucius.Quest.1.Objectives.1:<server.current_time_millis.sub_int[<%player%.flag[QuestGUI.Lucius.Quest.1.Timer]>].div[1000].as_duration.formatted>
- flag <%player%> QuestGUI.Lucius.Quest.1.Timer:<server.current_time_millis>
- flag <%player%> QuestGUI.Lucius.Quest.1.Objective:2
- ^playsound <%player%.location> sound:ENTITY_EXPERIENCE_ORB_TOUCH
- ^give 'item:i@LuciusQuest_1_Item_Hints' "to:<%player%.inventory>" qty:1
}
else {
# not all hint reached
- define count 0
- if <%player%.flag[QuestGUI.Lucius.Quest.1.Objectives.1.hint.1]||false> {
- define count <def[count].add[1]>
}
- if <%player%.flag[QuestGUI.Lucius.Quest.1.Objectives.1.hint.2]||false> {
- define count <def[count].add[1]>
}
- if <%player%.flag[QuestGUI.Lucius.Quest.1.Objectives.1.hint.3]||false> {
- define count <def[count].add[1]>
}
- narrate "<yellow><&lb>QUETE<&rb><white> Trouvez des indices sur la taupe des pirates du soleil bleu (%count%/3)." targets:<%player%>
}
}
# Secret Reports on the harbor office (hint 1)
LuciusHint_1:
type: assignment
debug: true
actions:
on spawn:
- inject locally init instantly
on assignment:
- inject locally init instantly
on click:
- inject locally click instantly
on enter proximity:
- inject locally click instantly
init:
- trigger name:chat state:false
- trigger name:click state:true cooldown:1 radius:8
- trigger name:proximity state:true cooldown:8 radius:2
- vulnerable state:false
click:
- if ( <player.flag[QuestGUI.Lucius.Quest.1.Objective]||null> == 1 && !<player.flag[QuestGUI.Lucius.Quest.1.Objectives.1.hint.1]||false> ) {
- if !<player.has_flag[QuestGUI.Lucius.Quest.1.Completed]||false> {
- flag <player> QuestGUI.Lucius.Quest.1.Objectives.1.hint.1:true
- ^NARRATE target:<player> "<gray>Toutes les routes commerciales sont indiquées dans ce livre."
- run LuciusCheckHint def:<player>
}
}
# Boat's Chest
LuciusHint_2:
type: task
debug: true
definitions: player
script:
- if ( <%player%.flag[QuestGUI.Lucius.Quest.1.Objective]||null> == 1 && !<%player%.flag[QuestGUI.Lucius.Quest.1.Objectives.1.hint.2]||false> ) {
- if !<player.has_flag[QuestGUI.Lucius.Quest.1.Completed]||false> {
- flag <%player%> QuestGUI.Lucius.Quest.1.Objectives.1.hint.2:true
- ^NARRATE target:<%player%> "<gray>Il y a quelque chose dans ce coffre. Il s'agit d'une carte maritime avec le cachet du Roi."
- run LuciusCheckHint def:<%player%>
}
}
# Blacksmith Armor (hint 3)
LuciusHint_3:
type: assignment
debug: true
actions:
on spawn:
- inject locally init instantly
on assignment:
- inject locally init instantly
on click:
- inject locally click instantly
on enter proximity:
- inject locally click instantly
init:
- trigger name:chat state:false
- trigger name:click state:true cooldown:1 radius:8
- trigger name:proximity state:true cooldown:8 radius:2
- vulnerable state:false
click:
- if ( <player.flag[QuestGUI.Lucius.Quest.1.Objective]||null> == 1 && !<player.flag[QuestGUI.Lucius.Quest.1.Objectives.1.hint.3]||false> ) {
- if !<player.has_flag[QuestGUI.Lucius.Quest.1.Completed]||false> {
- flag <player> QuestGUI.Lucius.Quest.1.Objectives.1.hint.3:true
- ^NARRATE target:<player> "<gray>Cette armure n'appartient pas à un pirate, c'est sûr."
- run LuciusCheckHint def:<player>
}
}
# Quest end
LuciusQuestEnd:
type: task
debug: true
definitions: player
script:
- title 'title:<yellow>Quête Terminée' 'subtitle:<white>Les Pirates du Soleil Bleu' targets:<%player%>
- ^playsound <%player%.location> sound:ENTITY_PLAYER_LEVELUP
- flag <%player%> QuestGUI.Lucius.Quest.1.Objective:Complete
- if <%player%.flag[QuestGUI.QuestsCompleted].as_list||li@> !contains LuciusQuest_1 {
- flag <%player%> QuestGUI.QuestsCompleted:->:LuciusQuest_1
}
- flag <%player%> QuestGUI.Lucius.Quest.1.Completed:++
- flag <%player%> QuestGUI.Active_Quests:<-:LuciusQuest_1
- flag <%player%> QuestGUI.Lucius.Quest.1.Timer:!
- title 'title:<yellow>Merci d<&chr[00B4]>avoir joué !' 'subtitle:<red>>>> <white>play.eredrim.fr<red> <<<' targets:<%player%>
- wait 5
- execute 'mv spawn <%player%.name>'
#
# END Lucius Quest 1
#
################################################################################