Date: 2014/03/29 12:38:29 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
kuechenhilfe:
type: assignment
debug: false
actions:
on assignment:
- trigger name:chat toggle:true
- trigger name:click toggle:true
- lookclose state:true
default constants:
# At the first step the player has to kill 2 different mobtypes.
# Here you can define which mobtypes he has to kill and how many.
steakmobtype1: pig
steakmobtype1amount: 10
steakmobtype2: cow
steakmobtype2amount: 10
# At the second step the player has to deliver 2 different items.
# I guess it makes the most sense when the player has to deliver
# the items that the killed mobs drop. Here you can define which
# items and how many.
steakitem1: pork
steakitem1amount: 64
steakitem2: raw_beef
steakitem2amount: 64
# This quest is repeatable but it has a cooldown after finishing
# it. You can change the cooldown time here. Use "1s" for 1 second,
# "5m" for 5 minutes or "24h" for 24 hours.
steakquestredodelay: 20h
# After completing the quest the player gets a money reward. You
# can change the amount of money here.
steakmoneyreward: 10000
interact scripts:
- 10 steakquest
# There are no further comments because if you want to change something, which is highly
# recommended and probably needed if your server isnt german, you should understand it anyways.
steakquest:
type: interact
debug: false
steps:
"*meet":
click trigger:
script:
- if <player.flag[steakquest]> != done {
- random {
- ^chat "Hallo <player.name>."
- ^chat "Hi <player.name>."
- ^chat "Moin <player.name>."
}
- wait 1
- random {
- ^chat "Ich brauche noch einige Zutaten für das heutige Essen!"
- ^chat "Einige Zutaten für das heutige Essen wurden noch nicht geliefert!"
- ^chat "Uns wurde heute zu wenig Fleisch geliefert!"
}
- wait 1
- random {
- ^chat "Kannst du mir helfen?"
- ^chat "Hilfst du mir?"
}
- wait 1
- ^narrate "<&6>Schreibe <&a>Ja<&6> oder <&c>Nein<&6>!"
- zap step:accept duration:20s
} else {
- random {
- ^chat "Danke nochmal für das Fleisch!"
- ^chat "Ohne dich wären bestimmt einige verhungert!"
- ^chat "Wenn du mir nicht geholfen hättest, hätte es wahrscheinlich einen Aufstand gegeben!"
}
- wait 2
- random {
- ^chat "Melde dich in <player.flag[steakquest].expiration.formatted> nochmal, vielleicht brauche ich dann wieder welches!"
- ^chat "Momentan haben wir genügend Fleisch. Schau in <player.flag[steakquest].expiration.formatted> nochmal vorbei!"
}
}
accept:
chat trigger:
"yes":
trigger: "/Ja/, ich werde dir helfen."
script:
- wait 1
- ^narrate "<&5>Steak Tag <&6>- Quest angenommen"
- wait 1
- ^chat "Töte <cons:steakmobtype1amount> Schweine und <cons:steakmobtype2amount> Kühe und bringe mir dann <cons:steakitem1amount> rohes Schweine- und <cons:steakitem2amount> rohes Kuhfleisch!"
- ^flag player steakmobtype1count:0
- ^flag player steakmobtype2count:0
- ^flag player "questaufgabe:->:<&5>[Steak Tag]<&a> Töte <player.flag[steakmobtype1count].as_int>/<cons:steakmobtype1amount> Schweine und <player.flag[steakmobtype2count].as_int>/<cons:steakmobtype2amount> Kühe!"
- ^listen kill "id:Steak Schwein Listener" type:entity name:<cons:steakmobtype1> qty:1 script:steakmob1check
- ^listen kill "id:Steak Kuh Listener" type:entity name:<cons:steakmobtype2> qty:1 script:steakmob2check
- zap step:huntpigcow
"no":
trigger: "/Nein/, ich hab gerade keine Zeit."
script:
- wait 1
- random {
- ^chat "Schade, dann werde ich mal jemand anderes fragen."
- ^chat "Ok, hoffentlich hilft mir jemand anderes."
}
- wait 1
- random {
- ^chat "Solltest du doch irgendwann Zeit haben, dann melde dich einfach nochmal bei mir!"
- ^chat "Sprich mich einfach nochmal an, wenn du Zeit haben solltest."
}
- zap step:meet
"everything else":
trigger: /REGEX:\w+/
script:
- wait 1
- random {
- ^chat "Tut mir leid <player.name>, aber ich weiß nicht was <&sq><&f><context.message><&9><&sq> bedeutet!"
- ^chat "Ich weiß nicht, was du mit <&sq><&f><context.message><&9><&sq> meinst!"
}
- wait 1
- ^narrate "<&6>Schreibe <&a>Ja<&6> oder <&c>Nein<&6>!"
huntpigcow:
click trigger:
script:
- ^chat "<player.name>, du hast erst <player.flag[steakmobtype1count].as_int>/<cons:steakmobtype1amount> Schweine und <player.flag[steakmobtype2count].as_int>/<cons:steakmobtype2amount> Kühe getötet!"
whiledelivering:
click trigger:
script:
- ^if <player.item_in_hand.material> == m@<cons:steakitem1> {
- ^if <player.flag[steakitem1count].as_int> < <cons:steakitem1amount> {
- ^define item_in_hand <player.item_in_hand.qty>
- ^define toomuch <math.as_int:<cons:steakitem1amount>-<player.flag[steakitem1count]>>
- ^flag player "questaufgabe:<-:<&5>[Steak Tag]<&a> Bringe der Küchenhilfe <player.flag[steakitem1count].as_int>/<cons:steakitem1amount> rohes Schweine- und <player.flag[steakitem2count].as_int>/<cons:steakitem2amount> rohes Kuhfleisch!"
- ^flag player steakitem1count:++:<player.item_in_hand.qty>
- ^take i@<cons:steakitem1> qty:<player.item_in_hand.qty>
- ^if <player.flag[steakitem1count].as_int> < <cons:steakitem1amount> {
- ^chat "Danke für %item_in_hand% rohes Schweinefleisch!"
- ^flag player "questaufgabe:->:<&5>[Steak Tag]<&a> Bringe der Küchenhilfe <player.flag[steakitem1count].as_int>/<cons:steakitem1amount> rohes Schweine- und <player.flag[steakitem2count].as_int>/<cons:steakitem2amount> rohes Kuhfleisch!"
} else {
- ^chat "Danke für %toomuch% rohes Schweinefleisch!"
- ^flag player steakitem1:done
- ^if <player.flag[steakitem1count].as_int> > <cons:steakitem1amount> {
- ^give i@<cons:steakitem1> qty:<math.as_int:<player.flag[steakitem1count]>-<cons:steakitem1amount>>
}
- ^flag player steakitem1count:<cons:steakitem1amount>
- ^flag player "questaufgabe:->:<&5>[Steak Tag]<&a> Bringe der Küchenhilfe <player.flag[steakitem1count].as_int>/<cons:steakitem1amount> rohes Schweine- und <player.flag[steakitem2count].as_int>/<cons:steakitem2amount> rohes Kuhfleisch!"
- ^if <player.flag[steakitem1]> == done && <player.flag[steakitem2]> == done {
- random {
- ^chat "Danke für deine Hilfe. Hier hast du deine Belohnung!"
- ^chat "Vielen Dank! Über <cons:steakmoneyreward> Dollar freust du dich bestimmt!"
}
- ^give money qty:<cons:steakmoneyreward>
- ^narrate "<&2>[<&f>Money<&2>] Received <&f><cons:steakmoneyreward> Dollars <&2>from <&f><npc.name>"
- wait 1
- ^narrate "<&5>Steak Tag <&6>- Quest abgeschlossen"
- ^flag player steakquest:done duration:<cons:steakquestredodelay>
- ^flag player "questaufgabe:<-:<&5>[Steak Tag]<&a> Bringe der Küchenhilfe <player.flag[steakitem1count].as_int>/<cons:steakitem1amount> rohes Schweine- und <player.flag[steakitem2count].as_int>/<cons:steakitem2amount> rohes Kuhfleisch!"
- ^flag player steakitem1count:!
- ^flag player steakitem2count:!
- ^flag player steakitem1:!
- ^flag player steakitem2:!
- zap script:steakquest step:meet
} else {
- ^chat "Du musst noch etwas rohes Kuhfleisch zu mir bringen!"
}
}
} else {
- ^chat "Du hast bereits genügend rohes Schweinefleisch abgeliefert!"
}
} else if <player.item_in_hand.material> == m@<cons:steakitem2> {
- ^if <player.flag[steakitem2count].as_int> < <cons:steakitem2amount> {
- ^define item_in_hand <player.item_in_hand.qty>
- ^define toomuch <math.as_int:<cons:steakitem2amount>-<player.flag[steakitem2count]>>
- ^flag player "questaufgabe:<-:<&5>[Steak Tag]<&a> Bringe der Küchenhilfe <player.flag[steakitem1count].as_int>/<cons:steakitem1amount> rohes Schweine- und <player.flag[steakitem2count].as_int>/<cons:steakitem2amount> rohes Kuhfleisch!"
- ^flag player steakitem2count:++:<player.item_in_hand.qty>
- ^take i@<cons:steakitem2> qty:<player.item_in_hand.qty>
- ^if <player.flag[steakitem2count].as_int> < <cons:steakitem2amount> {
- ^chat "Danke für %item_in_hand% rohes Kuhfleisch!"
- ^flag player "questaufgabe:->:<&5>[Steak Tag]<&a> Bringe der Küchenhilfe <player.flag[steakitem1count].as_int>/<cons:steakitem1amount> rohes Schweine- und <player.flag[steakitem2count].as_int>/<cons:steakitem2amount> rohes Kuhfleisch!"
} else {
- ^chat "Danke für %toomuch% rohes Kuhfleisch!"
- ^flag player steakitem2:done
- ^if <player.flag[steakitem2count].as_int> > <cons:steakitem2amount> {
- ^give i@<cons:steakitem2> qty:<math.as_int:<player.flag[steakitem2count]>-<cons:steakitem2amount>>
}
- ^flag player steakitem2count:<cons:steakitem2amount>
- ^flag player "questaufgabe:->:<&5>[Steak Tag]<&a> Bringe der Küchenhilfe <player.flag[steakitem1count].as_int>/<cons:steakitem1amount> rohes Schweine- und <player.flag[steakitem2count].as_int>/<cons:steakitem2amount> rohes Kuhfleisch!"
- ^if <player.flag[steakitem1]> == done && <player.flag[steakitem2]> == done {
- random {
- ^chat "Danke für deine Hilfe. Hier hast du deine Belohnung!"
- ^chat "Vielen Dank! Über <cons:steakmoneyreward> Dollar freust du dich bestimmt!"
}
- ^give money qty:<cons:steakmoneyreward>
- ^narrate "<&2>[<&f>Money<&2>] Received <&f><cons:steakmoneyreward> Dollars <&2>from <&f><npc.name>"
- wait 1
- ^narrate "<&5>Steak Tag <&6>- Quest abgeschlossen"
- ^flag player steakquest:done duration:<cons:steakquestredodelay>
- ^flag player "questaufgabe:<-:<&5>[Steak Tag]<&a> Bringe der Küchenhilfe <player.flag[steakitem1count].as_int>/<cons:steakitem1amount> rohes Schweine- und <player.flag[steakitem2count].as_int>/<cons:steakitem2amount> rohes Kuhfleisch!"
- ^flag player steakitem1count:!
- ^flag player steakitem2count:!
- ^flag player steakitem1:!
- ^flag player steakitem2:!
- zap script:steakquest step:meet
} else {
- ^chat "Du musst noch etwas rohes Schweinefleisch zu mir bringen!"
}
}
} else {
- ^chat "Du hast bereits genügend rohes Kuhfleisch abgeliefert!"
}
} else {
- random {
- ^chat "Ich brauche noch das Fleisch! Du kannst auch einzelne Portionen bringen!"
- ^chat "Wo bleibt das Fleisch? Du musst nicht alles auf einmal bringen!"
}
- wait 1
- ^chat "Du hast erst <player.flag[steakitem1count].as_int>/<cons:steakitem1amount> rohes Schweinefleisch und <player.flag[steakitem2count].as_int>/<cons:steakitem2amount> rohes Kuhfleisch zur mir gebracht!"
}
steakmob1check:
type: task
debug: false
script:
- ^flag player "questaufgabe:<-:<&5>[Steak Tag]<&a> Töte <player.flag[steakmobtype1count].as_int>/<cons:steakmobtype1amount> Schweine und <player.flag[steakmobtype2count].as_int>/<cons:steakmobtype2amount> Kühe!"
- ^flag player steakmobtype1count:++
- ^flag player "questaufgabe:->:<&5>[Steak Tag]<&a> Töte <player.flag[steakmobtype1count].as_int>/<cons:steakmobtype1amount> Schweine und <player.flag[steakmobtype2count].as_int>/<cons:steakmobtype2amount> Kühe!"
- ^narrate "<&5>[QUEST]<&f><&co> Du hast <player.flag[steakmobtype1count].as_int>/<cons:steakmobtype1amount> Schweine getötet!"
- ^if <player.flag[steakmobtype1count].as_int> >= <cons:steakmobtype1amount> {
- flag player mob1:done
- ^if <player.flag[mob1]> == done && <player.flag[mob2]> == done {
- narrate "<&5>[QUEST]<&f><&co> Du hast <cons:steakmobtype1amount> Schweine und <cons:steakmobtype2amount> Kühe getötet. Bringe der Küchenhilfe <cons:steakitem1amount> rohes Schweine- und <cons:steakitem2amount> rohes Kuhfleisch!"
- ^flag player "questaufgabe:<-:<&5>[Steak Tag]<&a> Töte <player.flag[steakmobtype1count].as_int>/<cons:steakmobtype1amount> Schweine und <player.flag[steakmobtype2count].as_int>/<cons:steakmobtype2amount> Kühe!"
- ^flag player steakmobtype1count:!
- ^flag player steakmobtype2count:!
- ^flag player mob1:!
- ^flag player mob2:!
- ^flag player steakitem1count:0
- ^flag player steakitem2count:0
- ^flag player "questaufgabe:->:<&5>[Steak Tag]<&a> Bringe der Küchenhilfe <player.flag[steakitem1count].as_int>/<cons:steakitem1amount> rohes Schweine- und <player.flag[steakitem2count].as_int>/<cons:steakitem2amount> rohes Kuhfleisch!"
- zap script:steakquest step:whiledelivering
} else {
- narrate "<&5>[QUEST]<&f><&co> Du musst noch ein paar Kühe töten!"
}
} else {
- ^listen kill "id:Steak Schwein Listener" type:entity name:<cons:steakmobtype1> qty:1 script:steakmob1check
}
steakmob2check:
type: task
debug: false
script:
- ^flag player "questaufgabe:<-:<&5>[Steak Tag]<&a> Töte <player.flag[steakmobtype1count].as_int>/<cons:steakmobtype1amount> Schweine und <player.flag[steakmobtype2count].as_int>/<cons:steakmobtype2amount> Kühe!"
- ^flag player steakmobtype2count:++
- ^flag player "questaufgabe:->:<&5>[Steak Tag]<&a> Töte <player.flag[steakmobtype1count].as_int>/<cons:steakmobtype1amount> Schweine und <player.flag[steakmobtype2count].as_int>/<cons:steakmobtype2amount> Kühe!"
- ^narrate "<&5>[QUEST]<&f><&co> Du hast <player.flag[steakmobtype2count].as_int>/<cons:steakmobtype2amount> Kühe getötet!"
- ^if <player.flag[steakmobtype2count].as_int> >= <cons:steakmobtype2amount> {
- flag player mob2:done
- ^if <player.flag[mob1]> == done && <player.flag[mob2]> == done {
- narrate "<&5>[QUEST]<&f><&co> Du hast <cons:steakmobtype1amount> Schweine und <cons:steakmobtype2amount> Kühe getötet. Bring der Küchenhilfe <cons:steakitem1amount> rohes Schweine- und <cons:steakitem2amount> rohes Kuhfleisch!"
- ^flag player "questaufgabe:<-:<&5>[Steak Tag]<&a> Töte <player.flag[steakmobtype1count].as_int>/<cons:steakmobtype1amount> Schweine und <player.flag[steakmobtype2count].as_int>/<cons:steakmobtype2amount> Kühe!"
- ^flag player steakmobtype1count:!
- ^flag player steakmobtype2count:!
- ^flag player mob1:!
- ^flag player mob2:!
- ^flag player steakitem1count:0
- ^flag player steakitem2count:0
- ^flag player "questaufgabe:->:<&5>[Steak Tag]<&a> Bringe der Küchenhilfe <player.flag[steakitem1count].as_int>/<cons:steakitem1amount> rohes Schweine- und <player.flag[steakitem2count].as_int>/<cons:steakitem2amount> rohes Kuhfleisch!"
- zap script:steakquest step:whiledelivering
} else {
- narrate "<&5>[QUEST]<&f><&co> Du musst noch ein paar Schweine töten!"
}
} else {
- ^listen kill "id:Steak Kuh Listener" type:entity name:<cons:steakmobtype2> qty:1 script:steakmob2check
}