Date: 2019/12/06 14:07:52 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
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
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
CustomGUI_CustomWeapon_Main:
type: inventory
debug: false
title: <&c><bold>Custom Weapons Main Page
size: 27
slots:
- [CustomGUI_Tier1] [CustomGUI_Tier2] [CustomGUI_Tier3] [CustomGUI_Tier4] [CustomGUI_Tier5] [CustomGUI_Tier6] [CustomGUI_Tier7] [CustomGUI_Tier8] [CustomGUI_Tier9]
- [] [] [] [] [CustomGUI_Tier10] [] [] [] []
- [CustomGUI_PlayerBalance] [] [] [] [] [] [] [] [CustomGUI_Clicktobuy]
CustomGUI_PlayerBalance:
type: item
debug: false
material: player_head
mechanisms:
skull_skin: <player.uuid>
display name: <&f><&e><bold>Your Balance<&co>
lore:
- <&2><bold>$ <player.money>
CustomGUI_Back:
type: item
debug: false
material: red_wool
display name: <&e><bold>Previous Page
CustomGUI_Next:
type: item
debug: false
material: green_wool
display name: <&e><bold>Next Page
CustomGUI_Clicktobuy:
type: item
material: gold_block
display name: <&e><bold>Click Options
lore:
- <&6><bold>Left click to purchase the item!
- <&a><bold>Right click to view the item!
CustomGUI_Tier1:
type: item
debug: false
material: gray_wool
display name: <&8><bold>Tier 1
lore:
- Click here to view the
- Tier 1 weapons!
CustomGUI_Tier1_Page1:
type: inventory
debug: false
title: <&c><bold>Tier 1 - Page 1
size: 54
slots:
- [CustomWeapon_KitsuneOutfit] [CustomWeapon_VampireCape] [CustomWeapon_WitchsHat] [CustomWeapon_SilverEmeraldCrown] [CustomWeapon_FlowerCrown] [CustomWeapon_Navi] [CustomWeapon_Guitar] [CustomWeapon_Harp] [CustomWeapon_GoldenRubyCrown]
- [CustomWeapon_BunnyEars] [CustomWeapon_CatEars] [CustomWeapon_MagicOrb] [CustomWeapon_WitchsBroom] [CustomWeapon_SpartanHelm] [CustomWeapon_DiamondRing] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [CustomGUI_Back] [] [] [] [CustomGUI_PlayerBalance] [] [] [] [CustomGUI_Next]
CustomGUI_Tier1_Page2:
type: inventory
debug: false
title: <&c><bold>Tier 1 - Page 2
size: 54
slots:
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [CustomGUI_Back] [] [] [] [CustomGUI_PlayerBalance] [] [] [] []
CustomGUI_Tier2:
type: item
debug: false
material: light_gray_wool
display name: <&7><bold>Tier 2
lore:
- Click here to view the
- Tier 2 weapons!
CustomGUI_Tier2_Page1:
type: inventory
debug: false
title: <&c><bold>Tier 2 - Page 1
size: 54
slots:
- [CustomWeapon_EmeraldScepter] [CustomWeapon_RubyScepter] [CustomWeapon_VikingClub] [CustomWeapon_Scepter] [CustomWeapon_JoustingLance] [CustomWeapon_SpikedMace] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [CustomGUI_Back] [] [] [] [CustomGUI_PlayerBalance] [] [] [] [CustomGUI_Next]
CustomGUI_Tier3:
type: item
debug: false
material: lime_wool
display name: <&a><bold>Tier 3
lore:
- Click here to view the
- Tier 3 weapons!
CustomGUI_Tier3_Page1:
type: inventory
debug: false
title: <&c><bold>Tier 3 - Page 1
size: 54
slots:
- [CustomWeapon_OnyxScepter] [CustomWeapon_StrawberryStaff] [CustomWeapon_Reinlich] [CustomWeapon_BrassKnuckles] [CustomWeapon_Pugiona] [CustomWeapon_FlangedMace] [CustomWeapon_Igiturus] [CustomWeapon_PiratesCompanion] [CustomWeapon_IronDagger]
- [CustomWeapon_Scweizersabel] [CustomWeapon_InfinityBlade] [CustomWeapon_Ellaborus] [CustomWeapon_Brus] [CustomWeapon_FarmingScythe] [CustomWeapon_Jiganemaru] [CustomWeapon_RoughClaws] [CustomWeapon_Backbiter] [CustomWeapon_Swashbuckler]
- [CustomWeapon_Valeria] [CustomWeapon_Joyeux] [CustomWeapon_AmberScepter] [CustomWeapon_OpalScepter] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [CustomGUI_Back] [] [] [] [CustomGUI_PlayerBalance] [] [] [] [CustomGUI_Next]
CustomGUI_Tier4:
type: item
debug: false
material: green_wool
display name: <&2><bold>Tier 4
lore:
- Click here to view the
- Tier 4 weapons!
CustomGUI_Tier4_Page1:
type: inventory
debug: false
title: <&c><bold>Tier 4 - Page 1
size: 54
slots:
- [CustomWeapon_SapphireScepter] [CustomWeapon_LapisScepter] [CustomWeapon_CrystalStaff] [CustomWeapon_AnnealBlade] [CustomWeapon_BattleAxe] [CustomWeapon_Claymore] [CustomWeapon_HoarFrost] [CustomWeapon_Halberd] [CustomWeapon_Ostium]
- [CustomWeapon_FrostAxe] [CustomWeapon_KnightsBane] [CustomWeapon_ScytheOfTheSea] [CustomWeapon_BiClaw] [CustomWeapon_IronWarHammer] [CustomWeapon_Bloodless] [CustomWeapon_SwordOfDecay] [CustomWeapon_EnergyClaws] [CustomWeapon_SolarSword]
- [CustomWeapon_AtlastBlade] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [CustomGUI_Back] [] [] [] [CustomGUI_PlayerBalance] [] [] [] [CustomGUI_Next]
CustomGUI_Tier5:
type: item
debug: false
material: orange_wool
display name: <&6><bold>Tier 5
lore:
- Click here to view the
- Tier 5 weapons!
CustomGUI_Tier5_Page1:
type: inventory
debug: false
title: <&c><bold>Tier 5 - Page 1
size: 54
slots:
- [CustomWeapon_RoseQuartzScepter] [CustomWeapon_AmethystScepter] [CustomWeapon_PoleAxe] [CustomWeapon_VineWhip] [CustomWeapon_Malleus] [CustomWeapon_StaffOfFire] [CustomWeapon_CrescentScythe] [CustomWeapon_Virgamux] [CustomWeapon_RubyStaff]
- [CustomWeapon_HeavenlyVoid] [CustomWeapon_AncientGemStaff] [CustomWeapon_ToxicWaste] [CustomWeapon_StaffOfTheUndead] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [CustomGUI_Back] [] [] [] [CustomGUI_PlayerBalance] [] [] [] [CustomGUI_Next]
CustomGUI_Tier6:
type: item
debug: false
material: red_wool
display name: <&4><bold>Tier 6
lore:
- Click here to view the
- Tier 6 weapons!
CustomGUI_Tier6_Page1:
type: inventory
debug: false
title: <&c><bold>Tier 6 - Page 1
size: 54
slots:
- [CustomWeapon_FrozenCrescent] [CustomWeapon_TopazScepter] [CustomWeapon_PeridotScepter] [CustomWeapon_CorruptedMagesStaff] [CustomWeapon_Nocturne] [CustomWeapon_DragonsBreath] [CustomWeapon_Piercer] [CustomWeapon_Oakrune] [CustomWeapon_BlueBlood]
- [CustomWeapon_DiabloAzul] [CustomWeapon_TigersClaw] [CustomWeapon_ElementalAxe] [CustomWeapon_SpiritWarhammer] [CustomWeapon_DualBladeOfShock] [CustomWeapon_DragonboneAxe] [CustomWeapon_OceanBlade] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [CustomGUI_Back] [] [] [] [CustomGUI_PlayerBalance] [] [] [] [CustomGUI_Next]
CustomGUI_Tier7:
type: item
debug: false
material: light_blue_wool
display name: <&b><bold>Tier 7
lore:
- Click here to view the
- Tier 7 weapons!
CustomGUI_Tier7_Page1:
type: inventory
debug: false
title: <&c><bold>Tier 7 - Page 1
size: 54
slots:
- [CustomWeapon_GarnetScepter] [CustomWeapon_Malakies] [CustomWeapon_SummerRose] [CustomWeapon_HellAxe] [CustomWeapon_BloodFlame] [CustomWeapon_AbbadonsPike] [CustomWeapon_GuiltyThorn] [CustomWeapon_ScytheOfDespair] [CustomWeapon_FrozenMenace]
- [CustomWeapon_EdgeOfBrisingr] [CustomWeapon_ChaoticCrusader] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [CustomGUI_Back] [] [] [] [CustomGUI_PlayerBalance] [] [] [] [CustomGUI_Next]
CustomGUI_Tier8:
type: item
debug: false
material: cyan_wool
display name: <&3><bold>Tier 8
lore:
- Click here to view the
- Tier 8 weapons!
CustomGUI_Tier8_Page1:
type: inventory
debug: false
title: <&c><bold>Tier 8 - Page 1
size: 54
slots:
- [CustomWeapon_RubyHatchet] [CustomWeapon_Icealic] [CustomWeapon_Tenebris] [CustomWeapon_NaughtSieger] [CustomWeapon_Hellflame] [CustomWeapon_Bloodbane] [CustomWeapon_AzrealsClockwork] [CustomWeapon_MenacingWingedScepter] [CustomWeapon_OccultWoodenStaff]
- [CustomWeapon_BloodyCleaver] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [CustomGUI_Back] [] [] [] [CustomGUI_PlayerBalance] [] [] [] [CustomGUI_Next]
CustomGUI_Tier9:
type: item
debug: false
material: blue_wool
display name: <&9><bold>Tier 9
lore:
- Click here to view the
- Tier 9 weapons!
CustomGUI_Tier9_Page1:
type: inventory
debug: false
title: <&c><bold>Tier 9 - Page 1
size: 54
slots:
- [CustomWeapon_DemonicEbonyScythe] [CustomWeapon_LightWingedScepter] [CustomWeapon_MasterSword] [CustomWeapon_EbonyArmingSword] [CustomWeapon_HeavensWrath] [CustomWeapon_NotisDracon] [CustomWeapon_LightningRod] [CustomWeapon_FireBone] [CustomWeapon_HellsBlood]
- [CustomWeapon_DawnHammer] [CustomWeapon_MagmaOfMorroc] [CustomWeapon_BloodyEater] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [CustomGUI_Back] [] [] [] [CustomGUI_PlayerBalance] [] [] [] [CustomGUI_Next]
CustomGUI_Tier10:
type: item
debug: false
material: diamond_block
display name: <&8><bold>Tier 10
lore:
- Click here to view the
- Tier 10 weapons!
CustomGUI_Tier10_Page1:
type: inventory
debug: false
title: <&c><bold>Tier 10 - Page 1
size: 54
slots:
- [CustomWeapon_Excalibur] [CustomWeapon_LanceOfMichael] [CustomWeapon_AngelBlade] [CustomWeapon_Archblade] [CustomWeapon_Auroria] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
- [CustomGUI_Back] [] [] [] [CustomGUI_PlayerBalance] [] [] [] [CustomGUI_Next]
CustomGUI_ConfirmPurchase:
type: inventory
debug: false
title: <&c><bold>Confirm your purchase
size: 9
slots:
- [CustomGUI_Confirm] [] [] [] [<player.flag[weapon_selection]||<item[stone]>>] [] [] [] [CustomGUI_Deny]
CustomGUI_Confirm:
type: item
debug: false
material: emerald_block
display name: <&c><bold>Confirm
lore:
- <&2><bold>Click here to confirm the purchase
- <&e><bold>Cost<&7><&co> <&a><player.flag[weapon_cost]||0>
CustomGUI_Deny:
type: item
debug: false
material: redstone_block
display name: <&c><bold>Deny Transaction
lore:
- <&2><bold>Click here to deny the transaction
CustomGUI_CustomWeapon_Main_Events:
type: world
debug: true
events:
on player clicks CustomGUI* in CustomGUI_CustomWeapon_Main:
- determine cancelled passively
- if <context.item.simple.contains[Tier]>:
- define Tier <context.item.simple.after[Tier]>
#- narrate <[Tier]>
#- define inv CustomGUI_Tier<[Tier]>
- inventory open d:CustomGUI_Tier<[Tier]>_Page1
on player clicks CustomGUI_PlayerBalance in CustomGUI*:
- determine cancelled
on player clicks CustomGUI_Next in CustomGUI_Tier*:
- determine cancelled passively
#- narrate <context.inventory>
#- define inv <inventory[<context.inventory>].script_name>
- define inv <context.inventory.script_name>
#- narrate <[inv]>
- define next_page Page<element[<[inv].after[page]>].add[1]>
- define next_inv <[inv].before[_Page]>_<[next_page]>
- if <server.list_scripts.filter[contains[CustomGUI_Tier]].contains[s@<[next_inv]>]>:
- inventory open d:<[next_inv]>
on player clicks CustomGUI_Back in CustomGUI_Tier*:
- determine cancelled passively
- define inv <context.inventory.script_name>
- define inv_page <[inv].after[Page]>
- if <[inv_page]> == "1":
- inventory open d:CustomGUI_CustomWeapon_Main
- stop
- define prev_page Page<element[<[inv].after[page]>].sub[1]>
- define prev_inv <[inv].before[_Page]>_<[prev_page]>
- inventory open d:<[prev_inv]>
on player RIGHT clicks CustomWeapon* in CustomGUI_Tier*:
- determine cancelled passively
- define Tier <element[<context.item.nbt[Tier]>]>
#########- define cost <element[10000].mul[<
- define slot <player.inventory.first_empty>
- inventory close
- fakeitem <context.item> slot:<[slot]> duration:5s
- adjust <player> item_slot:<[slot]>
- flag player fake_item duration:5s
on player LEFT clicks CustomWeapon* in CustomGUI_Tier*:
- determine cancelled passively
- flag player weapon_selection:<context.item>
- define Tier <item[<player.flag[weapon_selection]>].nbt[Tier]>
- define cost <element[10000].mul[<proc[FactorialProc].context[<[Tier].add[1]>]>]>
- flag player weapon_cost:<[cost]>
- inventory open d:CustomGUI_ConfirmPurchase
on player clicks CustomWeapon* in CustomGUI_ConfirmPurchase:
- determine cancelled
on player clicks CustomGUI_Confirm in CustomGUI_ConfirmPurchase:
- determine cancelled passively
#- inventory close
- define Tier <item[<player.flag[weapon_selection]>].nbt[Tier]>
- define cost <element[10000].mul[<proc[FactorialProc].context[<[Tier].add[1]>]>]>
- if <[cost].is[more].to[<player.money||0>]>:
- inventory close
- narrate "You do not have enough money to buy this item! You need <[cost].sub[<player.money||0>]> more!"
#- give <player.flag[weapon_selection]>
#- flag player weapon_selection:!
- else:
- give <player.flag[weapon_selection]>
- money take quantity:<[cost]>
- narrate "<&2>Your previous balance was <&6><player.money.add[<[cost]>]> <&2>but is now <&6><player.money>"
- narrate "Enjoy your new item!"
- flag player weapon_selection:!
on player clicks in CustomGUI*:
- if <context.is_shift_click>:
- if <player.is_op>:
- narrate "Bypassing the safeguards.."
- stop
- determine cancelled
on player clicks CustomGUI_Deny in CustomGUI_ConfirmPurchase:
- determine cancelled passively
- inventory open d:CustomGUI_CustomWeapon_Main
on player scrolls their hotbar flagged:fake_item:
- determine cancelled
on player drops item:
- if <player.has_flag[fake_item]:
- determine cancelled passively
FactorialProc:
type: procedure
debug: false
definitions: Tier
script:
- define va 1
- repeat <[Tier]||0>:
- if <[Tier].is[more].to[1]>:
- define va <[va].mul[<[Tier]>]>
- define Tier <[Tier].sub[1]>
- determine <[va]>