Date: 2018/09/07 11:21: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
########################################################################################################################################
#--------------------------------------------------------------------------------------------------------------------------------------#
#| Le convoi perdu |#
#| Phrébor |#
#| Categorie: Quest |#
#| Author: Littlepork1 |#
#| Time: 1H |#
#| Version: 2.0 |#
#| |#
#| Copyright (C) Les Royaumes d'Eredrim - All Rights Reserved |#
#| Unauthorized copying of this file, via any medium is strictly prohibited |#
#| Proprietary and confidential |#
#--------------------------------------------------------------------------------------------------------------------------------------#
########################################################################################################################################
#-----------------------------------------------------------------------------------------------------------------#
# COMMANDS: #
# - npcq scripts add LeConvoiPerduQuest#Yu_choice : premier NPC sur la plage #
# - /npcq scripts add LeConvoiPerduQuest#proxy PROXIMITY #
# - npcq scripts add LeConvoiPerduQuest#Kiwan_choice : deuxième NPC à Phrébor #
# - npcq scripts add LeConvoiPerduQuest#Voleur_choice: Voleur #
# PERMISSIONS : #
# #
#-----------------------------------------------------------------------------------------------------------------#
#-----------------------------------------------------------------#
# #
# EVENTS #
# #
#-----------------------------------------------------------------#
leConvoiPerduQuestEvents:
type: world
debug: false
events:
on reload scripts:
# reload -a
- if <context.all> {
# create notable cuboids if not exist
- if <farmerquest_cow.as_cuboid.notable_name||nope> == nope {
- note cu@123,65,186,delerorn|164,67,214,delerorn as:farmerquest_cow
}
- if <Yuquest_enclosure.as_cuboid.notable_name||nope> == nope {
- note cu@102,65,51,delerorn|104,65,55,delerorn as:Yuquest_enclosure
}
}
# No reapetable quest
- if <player.flag[QUESTS.ACTIVE_QUESTS].as_list.contains[Le convoi perdu].not||true> {
- queue clear
}
- define objectiveNumber "<player.flag[QUESTS.Le convoi perdu.CURRENT_OBJECTIVE]||0>"
# objective 2
- if <def[objectiveNumber]> != 2 {
- queue clear
}
- run instantly s@QuestWorld p:updateObjective def:farmerquest|3 delay:1t player:<player>
- flag <player> Quests.Farmer.Cow:<c.entity>
#-----------------------------------------------------------------#
# #
# QUEST #
# #
#-----------------------------------------------------------------#
LeConvoiPerduQuestData:
type: yaml data
debug: false
icon: i@leash
#----------------------------
# Conditions
#----------------------------
# Conditions nécessaires pour que la quête soit marquée comme DISPONIBLE
# la quête est t'elle répétable ?
repeatable: false
# Cooldown de la quête si répétable.
cooldown: ""
hide_ifLocked: true
hide_description: true
title: Le convoi perdu
description: ramener la marchandise a Yu
#----------------------------------------------------------------------
required_rep:
# REPUTATION;MONTANT;COMPARATEUR
# MORE => Réputation du joueur supérieure à montant = pas de quête
# LESS => Réputation du joueur inféieure à montant = pas de quête
# Le nom de la réputation doit être le même que la réputation définie dans ReputationsAndLevels.Reputations
- phrebor;+1;MORE
- voleur;0;MORE
#----------------------------------------------------------------------
experience: 1
reputations: li@
objectives:
1:
name: Le Convoi
description: Recherche du convoi
2:
name: trouver des indices
description: Retrouver 4 indices
3:
name: Repaire des voleurs
description:
4:
name: Marchandise
description: Tuer et ramener la marchandise a Yu
5:
name: Yu
description: aller voir Yu
LeconvoiperduQuest:
type: task
debug: false
#-----------------------------------------------------------------#
# Fermier de Phrébor #
#-----------------------------------------------------------------#
# choix qui sont disponibles auprès du PNJ Yu
Yu_choice:
- if <player.flag[QUESTS.ACTIVE_QUESTS].as_list.contains[<script.name>].not||true> {
- narrate format:choice_format "<proc[msgcommand].context[<aqua>Salutations. Auriez-vous besoin de mon aide ?|quest answer <script.name>#Yu_start <npc>|Cliquez pour choisir cette option]>"
- queue clear
}
- define objectiveNumber "<player.flag[QUESTS.<script.name>.CURRENT_OBJECTIVE]||0>" {
- narrate format:choice_format "<proc[msgcommand].context[<aqua> a propos de votre marchandise|quest answer <script.name>#Yu_objective_<def[objectiveNumber]> <npc>|Cliquez pour choisir cette option]>"
- queue clear
}
proxy:
- define activeQuests <player.flag[QUESTS.ACTIVE_QUESTS].as_list||li@>
- if <def[activeQuests].contains[<script.name>].not||false> && <proc[QuestIsAvailable].context[<script.name>|<player>]||false> {
- narrate format:npc_talk_format "Aurevoir."
}
# début de la quête
Yu_start:
- narrate format:npc_talk_format "Bonjour,j'attend un convoi de marchandise"
- wait 4
- narrate format:player_talk_format "Ah bon ?"
- wait 2
- narrate format:npc_talk_format "Oui,mais je n'ai toujours rien reçu ."
- wait 4
- narrate format:npc_talk_format "Pourriez vous m'aider? !"
- wait 3
# donne l'objective 1
- run instantly s@QuestWorld p:acceptation def:<script.name>#Yu_acceptation delay:1t player:<player> npc:<npc>
- queue clear
# le joueur accepte ou refuse
Yu_acceptation:
- define answer <def[1]>
- define activesQuests <player.flag[QUESTS.ACTIVE_QUESTS].as_list||li@>
- if <def[activesQuests].contains[<script.name>]> {
- narrate format:error_format "Vous faites déjà cette quête."
- queue clear
}
- if <def[answer]> == "accepter" {
- narrate format:player_talk_format "D'accord, mais je ne sais pas où chercher."
- wait 5
- narrate format:npc_talk_format "la marchandise vien du Nord allé voir pret de la route au Nord."
- wait 3
- flag <player> RespawnPoint:<npc.location>
- run instantly s@QuestWorld p:start def:<script.name> delay:1t player:<player>
- queue clear
} else {
- narrate format:player_talk_format "Non, je ne vous aiderais pas."
- wait 3
- narrate format:npc_talk_format "S'il vous plait, je vous offrirai quelques pièces !"
}
#-----------------------------------------------------------------#
# PNJ (kiwan) à Phrèbor #
#-----------------------------------------------------------------#
# choix qui sont disponibles auprès de Kiwan
Kiwan_choice:
- if <player.flag[QUESTS.ACTIVE_QUESTS].as_list.contains[<script.name>].not||true> {
- queue clear
}
- define objectiveNumber "<player.flag[QUESTS.<script.name>.CURRENT_OBJECTIVE]||0>"
- narrate format:choice_format "<proc[msgcommand].context[<aqua>A propos des hommes|quest answer <script.name>#Kiwan_objective_<def[objectiveNumber]> <npc>|Cliquez pour choisir cette option]>"
# objectif 1 second Kiwan
Kiwan_objective_1:
- narrate format:player_talk_format "Bonjour messieur,Auriez-vous vue se qui c'est passé?."
- wait 4
- narrate format:npc_talk_format "Bonjour . Oui j'ai vue ce qui c'est passé"
- wait 3
- narrate format:npc_talk_format "Il y avais 3 hommes qui ont attaqué ce convoi tué ce pauvre et sont reparti vers la ville après "
- wait 5
- narrate format:player_talk_format "D'accord merci"
- give i@KiwanQuestLeash
- narrate format:narration_format "Vous recevez <i@KiwanQuestLeash.display_name>"
- flag <player> RespawnPoint:<l@80.5,65.0,1.0,2.0,-61.0,delerorn>
- run instantly s@QuestWorld p:updateObjective def:<script.name>|2 delay:1t player:<player>
- queue clear
}
- narrate format:npc_talk_format "Aurevoir."
#-----------------------------------------------------------------#
# PNJ voleur à Phrèbor #
#-----------------------------------------------------------------#
# choix qui sont disponibles auprès du voleur
voleur_choice:
- if <player.flag[QUESTS.ACTIVE_QUESTS].as_list.contains[<script.name>].not||true> {
- narrate format:npc_talk_format "Bonjour, quelle belle journée !"
- queue clear
}
- define objectiveNumber "<player.flag[QUESTS.<script.name>.CURRENT_OBJECTIVE]||0>"
- narrate format:choice_format "<proc[msgcommand].context[<aqua>A propos de cette marchandise|quest answer <script.name>#voleur_objective_1<def[objectiveNumber]> <npc>|Cliquez pour choisir cette option]>"
# objectif 1 second Kiwan
voleur_objective_1:
- narrate format:player_talk_format "Bonjour,ou avez vous trouve cette marchandise?."
- wait 4
- narrate format:npc_talk_format "Bonjour <player.name>. Nous avons trouvé cette marchandise sur le bord de la route. "
- wait 3
- narrate format:npc_talk_format "Nous avons pense la mettre en lieu sur pour eviter la pluie "
- wait 5
- narrate format:player_talk_format "D'accord merci.Je vais la ramener maintenant"
- equip <npc> hand:i@VoleurQuestItemVoleurSword
- wait 4
- narrate format:player_talk_format "Que faites vous ?!"
- wait 4
- narrate format:npc_talk_format "C'est regrettable si on apprend qu'on a volé cette marchandise..."
- wait 5
- run instantly s@QuestWorld p:updateObjective def:VoleurQuest|3 delay:1t player:<player>
- run instantly Quester p:fight delay:1t def:VoleurQuest#Voleurclone_death player:<player> npc:<npc>
- equip <npc> hand:i@air
- Voleurclone_death:
- if <player.flag[QUESTS.ACTIVE_QUESTS].as_list.contains[<script.name>].not||true> {
- narrate "quête pas activée "
#- queue clear
}
- narrate format:npc_talk_format "Arrgghhh !!!"
- playsound <player.location> sound:ENTITY_HOSTILE_DEATH
- wait 1
- narrate "<green><npc.name><gray> est mort."
- drop item:i@LuciusQuestItemVoleurSword qty:1 location:<npc.location>
- run instantly s@QuestWorld p:end def:VoleurQuest delay:1t player:<player>
- give i@VoleurQuestLeash
- narrate format:narration_format "Vous recevez <i@voleurQuestLeash.display_name>"
- flag <player> RespawnPoint:<l@80.5,65.0,1.0,2.0,-61.0,delerorn>
- run instantly s@QuestWorld p:updateObjective def:<script.name>|2 delay:1t player:<player>
- queue clear
}
#
# END LeconvoiperduQuest
#
################################################################################