Date: 2016/04/02 07:32:37 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
CustomQuestGUI:
type: assignment
actions:
on click:
- inventory open d:in@QuestGUI
- flag server "currentplayeropen:<player>"
- inject QuestRewards
QuestGUI:
type: inventory
inventory: chest
title: "<&6><&l>Quest Master"
size: 63
definitions:
return_button: i@return_button
CoalOreQuest: i@CoalOreQuest
IronOreQuest: i@IronOreQuest
GoldOreQuest: i@GoldOreQuest
StoneQuest: i@StoneQuest
ResetFlags: i@ResetFlags
LapisQuest: i@LapisQuest
DiamondQuest: i@DiamondQuest
slots:
- "[] [] [] [] [] [] [] [] []"
- "[] [StoneQuest] [] [CoalOreQuest] [] [IronOreQuest] [] [GoldOreQuest] []"
- "[] [] [] [] [] [] [] [] []"
- "[] [LapisQuest] [] [DiamondQuest] [] [] [ResetFlags] [] []"
- "[] [] [] [] [] [] [] [] [] "
- "[] [] [] [] [] [] [] [] [] "
- "[] [] [] [] [] [] [] [] [return_button]"
GUI_Inventory_World:
type: world
events:
on player clicks in QuestGUI:
- determine cancelled
on player clicks ResetFlags in QuestGUI:
- Inject ResetQuestFlags
- narrate "<&a>All quests have now been reset."
on player clicks CoalOreQuest in QuestGUI:
- if <player.has_flag[coal_ore_quest_cooldown]> {
- narrate "<&7><&o>You can repeat this quest in <player.flag[coal_ore_quest_cooldown].expiration.formatted>"
- queue clear
}
- if <player.has_flag[Quest_Log_Count]> {
- narrate "<&6>Your Quest log is full! Return your current quests to accept new ones."
- queue clear
}
- flag player Quest_Log_Count:++
- flag player coal_ore_quest
- flag player coal_ore_quest_count:0
- narrate "<&6>-=+ Break <&7>64 <&6>Coal Ore +=-"
- narrate "<&a><player.flag[coal_ore_quest_count].round||0> Coal Ores mined!"
on player breaks coal_ore:
- if <player.has_flag[coal_ore_quest]> {
- flag player coal_ore_quest_count:++
- if <player.flag[coal_ore_quest_count]> >= 64 {
- narrate "<&6>[Return to the Quest Master]"
- flag player gold_ore_quest:!
}
}
on player clicks IronOreQuest in QuestGUI:
- if <player.has_flag[iron_ore_quest_cooldown]> {
- narrate "<&7><&o>You can repeat this quest in <player.flag[iron_ore_quest_cooldown].expiration.formatted>"
- queue clear
}
- if <player.has_flag[Quest_Log_Count]> {
- narrate "<&6>Your Quest log is full! Return your current quests to accept new ones."
- queue clear
}
- flag player Quest_Log_Count:++
- flag player iron_ore_quest
- flag player iron_ore_quest_count:0
- narrate "<&6>-=+ Break <&f>32 <&6>Iron Ore +=-"
- narrate "<&a><player.flag[iron_ore_quest_count].round||0> Iron Ores mined!"
on player breaks iron_ore:
- if <player.has_flag[iron_ore_quest]> {
- flag player iron_ore_quest_count:++
- if <player.flag[iron_ore_quest_count]> <= 32 {
}
- if <player.flag[iron_ore_quest_count]> >= 32 {
- narrate "<&6>[Return to the Quest Master]"
- flag player iron_ore_quest:!
}
}
on player clicks GoldOreQuest in QuestGUI:
- if <player.has_flag[gold_ore_quest_cooldown]> {
- narrate "<&7><&o>You can repeat this quest in <player.flag[gold_ore_quest_cooldown].expiration.formatted>"
- queue clear
}
- if <player.has_flag[Quest_Log_Count]> {
- narrate "<&6>Your Quest log is full! Return your current quests to accept new ones."
- queue clear
}
- flag player Quest_Log_Count:++
- flag player gold_ore_quest
- flag player gold_ore_quest_count:0
- narrate "<&6>-=+ Break <&6>128 <&6>Gold Ore +=-"
- narrate "<&a><player.flag[gold_ore_quest_count].round||0> Gold Ores mined!"
on player breaks gold_ore:
- if <player.has_flag[gold_ore_quest]> {
- flag player gold_ore_quest_count:++
- if <player.flag[gold_ore_quest_count]> <= 128 {
}
- if <player.flag[gold_ore_quest_count]> >= 128 {
- narrate "<&6>[Return to the Quest Master]"
- flag player gold_ore_quest:!
}
}
on player clicks StoneQuest in QuestGUI:
- if <player.has_flag[stonequest_cooldown]> {
- narrate "<&7><&o>You can repeat this quest in <player.flag[stonequest_cooldown].expiration.formatted>"
- queue clear
}
- if <player.has_flag[Quest_Log_Count]> {
- narrate "<&6>Your Quest log is full! Return your current quests to accept new ones."
- queue clear
}
- flag player Quest_Log_Count:++
- flag player StoneQuest
- flag player StoneQuest_count:0
- narrate "<&6>-=+ Break <&6>192<&6> Stone Ore +=-"
- narrate "<&a><player.flag[StoneQuest_count].round||0> Stone Ores mined!"
on player breaks stone:
- if <player.has_flag[StoneQuest]> {
- flag player StoneQuest_count:++
- if <player.flag[StoneQuest_count]> <= 192 {
}
- if <player.flag[StoneQuest_count]> >= 192 {
- narrate "<&6>[Return to the Quest Master]"
- flag player StoneQuest:!
}
}
on player clicks LapisQuest in QuestGUI:
- if <player.has_flag[Lapisquest_cooldown]> {
- narrate "<&7><&o>You can repeat this quest in <player.flag[lapisquest_cooldown].expiration.formatted>"
- queue clear
}
- if <player.has_flag[Quest_Log_Count]> {
- narrate "<&6>Your Quest log is full! Return your current quests to accept new ones."
- queue clear
}
- flag player Quest_Log_Count:++
- flag player LapisQuest
- flag player LapisQuest_count:0
- narrate "<&6>-=+ Break <&6>384<&6> Lapis Ore +=-"
- narrate "<&a><player.flag[LapisQuest_count].round||0> Lapis Ores mined!"
on player breaks 21:
- if <player.has_flag[lapisQuest]> {
- flag player LapisQuest_count:++
}
- if <player.flag[LapisQuest_count]> >= 384 {
- narrate "<&6>[Return to the Quest Master]"
- flag player LapisQuest:!
}
}
on player clicks DiamondQuest in QuestGUI:
- if <player.has_flag[Diamondquest_cooldown]> {
- narrate "<&7><&o>You can repeat this quest in <player.flag[Diamondquest_cooldown].expiration.formatted>"
- queue clear
}
- if <player.has_flag[Quest_Log_Count]> {
- narrate "<&6>Your Quest log is full! Return your current quests to accept new ones."
- queue clear
}
- flag player Quest_Log_Count:++
- flag player DiamondQuest
- flag player DiamondQuest_count:0
- narrate "<&6>-=+ Break <&6>512<&6> Diamond Ore +=-"
- narrate "<&a><player.flag[DiamondQuest_count].round||0> Diamond Ores mined!"
on player breaks diamond_ore:
- if <player.has_flag[DiamondQuest]> {
- flag player DiamondQuest_count:++
}
- if <player.flag[DiamondQuest_count]> >= 512 {
- narrate "<&6>[Return to the Quest Master]"
- flag player DiamondQuest:!
}
}
return_button:
type: item
material: i@redstone_torch_on
display name: "<&6><&l>Close Menu"
ResetFlags:
type: item
material: i@string
display name: "<&a><&l>Reset Quests"
lore:
- "<&c><&l>NOTE:<&c> Resetting Quests will completely"
- "<&c> ERASE all Quest data from your profile and putting them all on cooldown."
CoalOreQuest:
type: item
material: i@coal_ore
display name: "<&7><&o>Industrialized"
lore:
- "<&a>Mine <&7>64<&a> Coal Ore!"
- "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[coal_ore_quest_cooldown].expiration.formatted.replace[forever].with[0 seconds]||24 Hours>"
- "<&e>Ore Count: <player.flag[Coal_Ore_Quest_Count]||0 Ores Mined!>"
- "<&6>Quest Reward:<&e><&o> $30,000"
IronOreQuest:
type: item
material: i@iron_ore
display name: "<&f><&o>Factorization"
lore:
- "<&a>Mine <&7>32<&a> Iron Ore!"
- "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[iron_ore_quest_cooldown].expiration.formatted.replace[forever].with[0 seconds]||24 Hours>"
- "Ore Count: <player.flag[Iron_Ore_Quest_Count]||0 Ores Mined!>"
- "<&6>Quest Reward:<&e><&o> $65,000"
GoldOreQuest:
type: item
material: i@Gold_ore
display name: "<&6><&o>Gold Mining!"
lore:
- "<&a>Mine <&7>128<&a> Gold Ore!"
- "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[gold_ore_quest_cooldown].expiration.formatted.replace[forever].with[0 seconds]||48 Hours>"
- "Ore Count: <player.flag[Gold_Ore_Quest_Count]||0 Ores Mined!>"
- "<&6>Quest Reward:<&e><&o> $120,000"
StoneQuest:
type: item
material: i@stone
display name: "<&6><&o>Cave Mining!"
lore:
- "<&a>Mine <&7>192<&a> Stone Blocks!"
- "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[stone_quest_cooldown].expiration.formatted.replace[forever].with[0 seconds]||24 Hours>"
- "Ore Count: <player.flag[StoneQuest_Count]||0 Ores Mined!>"
- "<&6>Quest Reward:<&e><&o> $15,000"
LapisQuest:
type: item
material: i@21
display name: "<&6><&o>Experienced Miner!"
lore:
- "<&a>Mine <&7>384<&a> Lapis Ores!"
- "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[lapis_quest_cooldown].expiration.formatted.replace[forever].with[0 seconds]||48 Hours>"
- "Ore Count: <player.flag[LapisQuest_Count]||0 Ores Mined!>"
- "<&6>Quest Reward:<&e><&o> $150,000"
DiamondQuest:
type: item
material: i@diamond_ore
display name: "<&6><&o>Going Deep!"
lore:
- "<&a>Mine <&7>512<&a> Diamond Ores!"
- "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[diamond_quest_cooldown].expiration.formatted.replace[forever].with[0 seconds]||48 Hours>"
- "Ore Count: <player.flag[DiamondQuest_Count]||0 Ores Mined!>"
- "<&6>Quest Reward:<&e><&o> $500,000"
QuestRewards:
type: task
script:
- if <player.has_flag[gold_ore_quest_cooldown].not||true> {
- if <player.flag[gold_ore_quest_count]||0> >= 128 {
- narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!"
- narrate "<&2>$120,000 has been added to your account."
- give money qty:120000
- flag player Quest_Log_Count:!
- flag player gold_ore_quest_count:!
- flag player gold_ore_quest:!
- flag player gold_ore_quest_cooldown duration:48h
- inventory close
- queue clear
}
}
- if <player.has_flag[iron_ore_quest_cooldown].not||true> {
- if <player.flag[iron_ore_quest_count]||0> >= 32 {
- narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!"
- give xp quantity:800
- narrate "<&2>$65,000 has been added to your account."
- give money qty:65000
- flag player Quest_Log_Count:!
- flag player iron_ore_quest_count:!
- flag player iron_ore_quest:!
- flag player iron_ore_quest_cooldown duration:12h
- inventory close
- queue clear
}
}
- if <player.has_flag[coal_ore_quest_cooldown].not||true> {
- if <player.flag[coal_ore_quest_count]||0> >= 64 {
- narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!"
- narrate "<&2>$30,000 has been added to your account."
- give money qty:30000
- flag player Quest_Log_Count:!
- flag player coal_ore_quest_count:!
- flag player coal_ore_quest:!
- flag player coal_ore_quest_cooldown duration:24h
- inventory close
- queue clear
}
}
- if <player.has_flag[stonequest_cooldown].not||true> {
- if <player.flag[stonequest_count]||0> >= 192 {
- narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!"
- narrate "<&2>$15,000 has been added to your account."
- give money qty:15000
- flag player Quest_Log_Count:!
- flag player stonequest_count:!
- flag player stonequest:!
- flag player stonequest_cooldown duration:24h
- inventory close
- queue clear
}
}
- if <player.has_flag[lapisquest_cooldown].not||true> {
- if <player.flag[lapisquest_count]||0> >= 384 {
- narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!"
- narrate "<&2>$150,000 has been added to your account."
- give money qty:150000
- flag player Quest_Log_Count:!
- flag player lapisquest_count:!
- flag player lapisquest:!
- flag player lapisquest_cooldown duration:24h
- inventory close
- queue clear
}
}
- if <player.has_flag[diamondquest_cooldown].not||true> {
- if <player.flag[diamondquest_count]||0> >= 384 {
- narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!"
- narrate "<&2>$500,000 has been added to your account."
- give money qty:500000
- flag player Quest_Log_Count:!
- flag player diamondquest_count:!
- flag player diamondquest:!
- flag player diamondquest_cooldown duration:48h
- inventory close
- queue clear
}
ResetQuestFlags:
type: task
script:
- flag <player> Quest_Log_Count:!
- flag player Quest_Log_Count:!
- flag player gold_ore_quest_count:!
- flag player gold_ore_quest:!
- flag player gold_ore_quest_cooldown duration:48h
- flag player iron_ore_quest_count:!
- flag player iron_ore_quest:!
- flag player iron_ore_quest_cooldown duration:48h
- flag player coal_ore_quest_count:!
- flag player coal_ore_quest:!
- flag player coal_ore_quest_cooldown duration:48h
- flag player Quest_Log_Count:!
- flag player lapisquest_count:!
- flag player lapisquest:!
- flag player lapis_quest_cooldown duration: 24h
- flag player diamondquest_count:!
- flag player diamondquest:!
- flag player diamond_quest_cooldown duration: 12h