Date: 2016/03/05 08:07:17 UTC-08: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
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:
border: i@border_item
return_button: i@return_button
CoalOreQuest: i@CoalOreQuest
IronOreQuest: i@IronOreQuest
GoldOreQuest: i@GoldOreQuest
ResetFlags: i@ResetFlags
slots:
- "[border] [border] [border] [border] [border] [border] [border] [border] [border]"
- "[border] [] [] [] [] [] [] [] [border]"
- "[border] [] [CoalOreQuest] [] [IronOreQuest] [] [GoldOreQuest] [] [border]"
- "[border] [] [] [] [] [] [ResetFlags] [] [border]"
- "[border] [] [] [] [] [] [] [] [border] "
- "[border] [] [] [] [] [] [] [] [border] "
- "[border] [border] [border] [border] [border] [border] [border] [border] [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:++
- narrate "<&a>You have mined <player.flag[coal_ore_quest_count].round> Coal Ore!"
- 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 {
- narrate "<&a>You have mined <player.flag[iron_ore_quest_count].round> Iron Ore!"
}
- 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 {
- narrate "<&a>You have mined <player.flag[gold_ore_quest_count].round> Gold Ore!"
}
- if <player.flag[gold_ore_quest_count]> >= 128 {
- narrate "<&6>[Return to the Quest Master]"
- flag player gold_ore_quest:!
}
}
border_item:
type: item
material: i@black_stained_glass_pane
display name: <white><&sp>
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 ERASE all Quest data from your profile."
- "<&c>ALL quest cooldowns get put on their original timers to prevent abusing this feature."
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]||48 Hours>"
-
- "<&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]||48 Hours>"
-
- "<&6>Quest Reward:<&e><&o> $65,000
GoldOreQuest:
type: item
material: i@Gold_pickaxe
display name: "<&6><&o>Gold Mining!"
lore:
- "<&a>Mine <&7>6<&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>"
-
- "<&6>Quest Reward:<&e><&o> $120,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:48h
- 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
}
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