Date: 2014/05/19 16:40:01 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
#Part 1: KillQuest. Quest to kill 10 Zombies
Zombie:
type: assignment
interact scripts:
- 10 KillQuest
KillQuest:
type: interact
steps:
1:
click trigger:
script:
- engage
- chat "You must be <player.name>! Please, help me kill those Zombies!"
- wait 1
- chat "The Zombies killed my entire family!"
- wait 1
- chat "Killing some Zombies would help ease my pain."
- wait 1
- chat "Can you kill 10 of those bastards for me?"
- disengage
chat trigger:
1:
trigger: /Yes/, I shall slaughter them!
trigger: /Yes./, I shall slaughter them!
script:
- engage
- chat "Hell yeah! Kill them bastards!"
- wait 1
- chat "Please hurry!"
- listen kill type:entity target:Zombie qty:1 script:ZombieQuestCheck
- flag player ZombieCount:0
- zap step:2
- disengage
2:
trigger: /No/, I am far too busy.
script:
- chat "Then leave coward!"
2:
click trigger:
script:
- engage
- chat "Kill more of them bastards!"
- wait 1
- chat "You've only killed <player.flag[ZombieCount].asint> zombies!"
- disengage
3:
click trigger:
script:
- engage
- chat "Thanks <player.name>! May my family rest in peace.."
- wait 1
- chat "Here take this!"
- narrate "You were rewarded $25 and 25 exp"
- give money qty:25
- give xp qty:25
- zap step:4
- disengage
4:
click trigger:
script:
- engage
- chat "Thanks for killing those Zombies for me <player.name>!"
- wait 1
- chat "Come back later, I might have something else for you to do."
- zap step:5
- disengage
#Part 2: Gather materials.
5:
click trigger:
script:
- engage
- chat "Welcome back <player.name>! So happy to see you."
- wait 1
- chat "Why? Because we are trying to rebuild around here."
- wait 1
- chat "With your muscle, we can rebuild in no time!"
- wait 1
- chat "What do you say, can you help?"
- disengage
chat trigger:
1:
trigger: /Yes/, what can I do to help?
script:
- engage
- chat "I knew we could count on you, <player.name>!"
- wait 1
- chat "Help us gather materials. We'll need 10 Wood."
- wait 1
- chat "Come back when you have enough Wood for us."
- listen block type:break block:log qty:1 script:MaterialsQuestCheck
- flag player WoodCutCount:0
- zap step:6
- disengage
2:
trigger: /No/, I have no time for this!
script:
- chat "I suppose I understand. Come back when you are ready."
6:
click trigger:
script:
- engage
- chat "That's not enough wood!"
- wait 1
- chat "You only cut <player.flag[WoodCutCount].asint>/10 Wood!"
- wait 1
- chat "Come back when you have it all."
- disengage
7:
click trigger:
script:
- engage
- chat "What a fine job! Nice looking batch of Wood!"
- wait 1
- chat "Here's your reward!"
- narrate "$10 and 10 exp"
- give money qty:10
- give xp qty:10
- zap step:8
- disengage
8:
click trigger:
script:
- engage
- chat "Thanks for gathering that Wood <player.name>!"
- wait 1
- chat "Come back later, and I might have another task."
- zap step:9
- disengage
#Part 3: Build
9:
click trigger:
script:
- engage
- chat "Welcome back <player.name>!"
- wait 1
- chat "Now that we have our materials, we can start building!"
- wait 1
- chat "I bet you'd make a fine builder, <player.name>!"
- wait 1
- chat "Will you help us?"
- disengage
chat trigger:
1:
trigger: /yes/, I will help build.
script:
- engage
- chat "I knew you would!"
- wait 1
- Chat "Help us build at least 10 blocks worth."
- wait 1
- chat "Come back when you have finished."
- listen block type:build block:log|wood planks qty:1 script:BuildQuestCheck
- flag player BuildCount:0
- zap step:10
- disengage
2:
trigger: /No/, I am a fighter, not a builder!
script:
- chat "Oh, yes I see. Very well then."
10:
click trigger:
script:
- engage
- chat "You haven't helped us build enough yet!"
- wait 1
- chat "You've only placed <player.flag[BuildCount].asint>/10 Wood!"
- disengage
11:
click trigger:
script:
- engage
- Chat "What a fine job of building <player.name>!"
- wait 1
- chat "Here's your reward!"
- give money qty:10
- give xp qty:10
- narrate "You received $100 and 300 exp."
- zap step:12
- disengage
12:
click trigger:
script:
- engage
- chat "Thanks for helping us rebuild <player.name>!"
- wait 1
- chat "Come back later for some more work!"
- zap step:13
- disengage
13:
click trigger:
script:
- engage
- chat "Hello again, <player.name>!"
- wait 1
- chat "I don't know about you, but we're all getting pretty hungry."
- wait 1
- chat "Our food supplies are running low. Could you help us?"
- zap step:14
- disengage
14:
chat trigger:
1:
trigger: /Yes/, how can I help?
script:
- engage
- chat "Good! Grow us some wheat!"
- wait 1
- chat "Use some of that wood you have left over to make yourself a hoe"
- wait 1
- chat "After you make a hoe, cut some grass down to get some seeds!"
- wait 1
- chat "Then use your hoe to plant those seeds. Make sure to plant near some water!"
- wait 1
- chat "Plant about 10 of them. Harvest 10 Wheat and come back!"
- wait 1
- chat "Good luck <player.name>!"
- zap step:15
- disengage
2:
trigger: /no/, go farm yourself!
script:
- chat "Fine then!"
15:
click trigger:
script:
- engage
- if <player.inventory.contains[Wheat].qty[10]> {
- take Wheat qty:10
- chat "Mighty fine job of farming there <player.name>!"
- wait 1
- chat "Here's your reward!"
- give money qty:20
- give xp qty:20
- narrate "You obtained $20 and 20 exp!"
- zap step:16
} else {
- chat "That's not enough Wheat! Come back when you have 10!"
- narrate "<npc.name>Holds his rumbling stomach and frowns."
}
- disengage
16:
click trigger:
script:
- engage
- chat "Thanks for gathering all that wheat <player.name>!"
- wait 1
- chat "Come back soon for another job!"
- disengage
ZombieQuestCheck:
type: task
script:
- flag player ZombieCount:++
- narrate "You have slaughtered <player.flag[ZombieCount].asint>/10 zombies!"
- if <player.flag[ZombieCount].asint> >= 10 run ZombieQuestReward
else run ZombieQuestContinue
ZombieQuestContinue:
type: task
script:
- listen kill type:entity name:Zombie qty:1 script:ZombieQuestCheck
ZombieQuestReward:
type: task
script:
- narrate "You have killed <player.flag[ZombieCount].asint>/10 zombies! return back to Zombie Hater!"
- zap step:3 script:KillQuest
#Part 2: Quest to gather 10 Wood.
MaterialsQuestCheck:
type: task
script:
- flag player WoodCutCount:++
- narrate "You have gathered <player.flag[WoodCutCount].asint>/10 Wood!"
- if <player.flag[WoodCutCount].asint> >= 10 run MaterialsQuestReward
else run MaterialsQuestContinue
MaterialsQuestContinue:
type: task
Script:
- listen block type:break block:log qty:1 script:MaterialsQuestCheck
MaterialsQuestReward:
type: task
script:
- narrate "You have gathered <player.flag[WoodCutCount].asint>/10 Wood! Return to Zombie Hater!"
- zap step:7 script:KillQuest
#Part 3: Build.
BuildQuestChecK:
type: task
script:
- flag player BuildCount:++
- narrate "You have built <player.flag[BuildCount].asint>/10 blocks!"
- if <player.flag[BuildCount].asint> >= 10 run BuildQuestReward
else run BuildQuestContinue
BuildQuestContinue:
type: task
script:
- listen block type:build block:log|wood planks qty:1 script:BuildQuestCheck
BuildQuestReward:
type: task
script:
- narrate "You have built <player.flag[BuildCount].asint>/10 blocks! Return to Zombie Hater!"
- zap step:11 script:KillQuest