- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


TitleCriticalMC's Rankup Script 4 munky
TypeDenizen Script
Date2016/09/06 19:50:10 UTC-07:00
ByGuest
Other
Paste
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
29300
rankup_menu:
    type: inventory
    debug: false
    title<&2>Rank Upgrades
    size: 36
    slots:
    - "[rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge]"
    - "[rankup_menu_edge] [rankup_menu_slot1] [rankup_menu_slot2] [rankup_menu_slot3] [rankup_menu_slot4] [rankup_menu_slot5] [rankup_menu_slot6] [rankup_menu_slot7] [rankup_menu_edge]"
    - "[rankup_menu_edge] [rankup_menu_rankpreview1] [rankup_menu_rankpreview2] [rankup_menu_rankpreview3] [rankup_menu_rankpreview4] [rankup_menu_rankpreview5] [rankup_menu_rankpreview6] [rankup_menu_rankpreview7] [rankup_menu_edge]"
    - "[rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge] [rankup_menu_edge]"

rankup_menu_slot1:
    type: item
    debug: false
    material: golden_apple
    display name<&8>[<&7>Wanderer<&8>]
    lore:
    - "<&8><&l>> <&7>Cost<&8><&2>$5,000"
    - "<&8><&l>> <&7>Click to purchase!"
    - "<&c><&o>Peasant is required!"
    
rankup_menu_slot2:
    type: item
    debug: false
    material: leather_chestplate
    display name<&8>[<&7>Adventurer<&8>]
    lore:
    - "<&8><&l>> <&7>Cost<&8><&2>$15,000"
    - "<&8><&l>> <&7>Click to purchase!"
    - "<&c><&o>Wanderer is required!"
    
rankup_menu_slot3:
    type: item
    debug: false
    material: chainmail_chestplate
    display name<&8>[<&7>Squire<&8>]
    lore:
    - "<&8><&l>> <&7>Cost<&8><&2>$50,000"
    - "<&8><&l>> <&7>Click to purchase!"
    - "<&c><&o>Adventurer is required!"

rankup_menu_slot4:
    type: item
    debug: false
    material: gold_chestplate
    display name<&8>[<&7>Warrior<&8>]
    lore:
    - "<&8><&l>> <&7>Cost<&8><&2>$100,000"
    - "<&8><&l>> <&7>Click to purchase!"
    - "<&c><&o>Squire is required!"

rankup_menu_slot5:
    type: item
    debug: false
    material: iron_chestplate
    display name<&8>[<&7>Noble<&8>]
    lore:
    - "<&8><&l>> <&7>Cost<&8><&2>$500,000"
    - "<&8><&l>> <&7>Click to purchase!"
    - "<&c><&o>Warrior is required!"

rankup_menu_slot6:
    type: item
    debug: false
    material: diamond_chestplate
    display name<&8>[<&7>Regent<&8>]
    lore:
    - "<&8><&l>> <&7>Cost<&8><&2>$1,000,000"
    - "<&8><&l>> <&7>Click to purchase!"
    - "<&c><&o>Noble is required!"

rankup_menu_slot7:
    type: item
    debug: false
    material: golden_apple,1
    display name<&8>[<&7>Gladiator<&8>]
    lore:
    - "<&8><&l>> <&7>Cost<&8><&2>$2,250,000"
    - "<&8><&l>> <&7>Click to purchase!"
    - "<&c><&o>Regent is required!"
    
rankup_menu_rankpreview1:
    type: item
    debug: false
    materialstained_glass_pane:13
    display name<&b>Rank Preview
    lore:
    - "<&8><&l>> <&8>[<&7>Wanderer<&8>] <&7>Rank"
    - "<&8><&l>> <&7>Click me!"

rankup_menu_rankpreview2:
    type: item
    debug: false
    materialstained_glass_pane:13
    display name<&b>Rank Preview
    lore:
    - "<&8><&l>> <&8>[<&7>Adventurer<&8>] <&7>Rank"
    - "<&8><&l>> <&7>Click me!"

rankup_menu_rankpreview3:
    type: item
    debug: false
    materialstained_glass_pane:13
    display name<&b>Rank Preview
    lore:
    - "<&8><&l>> <&8>[<&7>Squire<&8>] <&7>Rank"
    - "<&8><&l>> <&7>Click me!"

rankup_menu_rankpreview4:
    type: item
    debug: false
    materialstained_glass_pane:13
    display name<&b>Rank Preview
    lore:
    - "<&8><&l>> <&8>[<&7>Warrior<&8>] <&7>Rank"
    - "<&8><&l>> <&7>Click me!"

rankup_menu_rankpreview5:
    type: item
    debug: false
    materialstained_glass_pane:13
    display name<&b>Rank Preview
    lore:
    - "<&8><&l>> <&8>[<&7>Noble<&8>] <&7>Rank"
    - "<&8><&l>> <&7>Click me!"

rankup_menu_rankpreview6:
    type: item
    debug: false
    materialstained_glass_pane:13
    display name<&b>Rank Preview
    lore:
    - "<&8><&l>> <&8>[<&7>Regent<&8>] <&7>Rank"
    - "<&8><&l>> <&7>Click me!"

rankup_menu_rankpreview7:
    type: item
    debug: false
    materialstained_glass_pane:13
    display name<&b>Rank Preview
    lore:
    - "<&8><&l>> <&8>[<&7>Gladiator<&8>] <&7>Rank"
    - "<&8><&l>> <&7>Click me!"
    
rankup_menu_edge:
    type: item
    debug: false
    material: stained_glass_pane
    display name<&c>
    
rankup_menu_handler:
    type: world
    debug: true
    events:
        on player clicks in rankup_menu:
        - determine cancelled
        on player drags on rankup_menu:
        - determine cancelled
        on player clicks rankup_menu_exit in rankup_menu:
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot1 in rankup_menu:
        - narrate "<&c>This feature is not yet released!"
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot2 in rankup_menu:
        - narrate "<&c>This feature is not yet released!"
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot3 in rankup_menu:
        - narrate "<&c>This feature is not yet released!"
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot4 in rankup_menu:
        - narrate "<&c>This feature is not yet released!"
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot5 in rankup_menu:
        - narrate "<&c>This feature is not yet released!"
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot6 in rankup_menu:
        - narrate "<&c>This feature is not yet released!"
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot7 in rankup_menu:
        - narrate "<&c>This feature is not yet released!"
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_rankpreview1 in rankup_menu:
        - inventory open d:in@wanderer_menu
        on player clicks rankup_menu_rankpreview2 in rankup_menu:
        - inventory open d:in@adventurer_menu
        on player clicks rankup_menu_rankpreview3 in rankup_menu:
        - inventory open d:in@squire_menu
        on player clicks rankup_menu_rankpreview4 in rankup_menu:
        - inventory open d:in@warrior_menu
        on player clicks rankup_menu_rankpreview5 in rankup_menu:
        - inventory open d:in@noble_menu
        on player clicks rankup_menu_rankpreview6 in rankup_menu:
        - inventory open d:in@regent_menu
        on player clicks rankup_menu_rankpreview7 in rankup_menu:
        - inventory open d:in@gladiator_menu
        on player clicks rankup_menu_slot1 in rankup_menu:
        - if <player.has_permission[denizen.group.peasant].not> {
          - narrate "<&c>Error: You already purchased this rank!"
           - if <player.money> >= 5000 && <player.has_permission[denizen.group.peasant]> {
            - execute as_server "manuadd <player.name> wanderer"
            - execute as_server "eco take <player.name> 5000"
            - execute as_server "gal broadcast <&8>[<&c>Upgrades<&8>] <&e><player.name> <&7>upgraded to the <&8>[<&7>Wanderer<&8>] <&7>rank!"
            - flag player wanderer
           }
           else {
             - narrate "Test"
           }
        }
        else {
          - narrate "<&c>Error: You do not have enough to purchase this upgrade or you are not Peasant."
        }
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot2 in rankup_menu:
        - if <player.has_flag[wanderer]> && <player.money> >= 15000 && <player.has_permission[denizen.group.wanderer]> {
          - execute as_server "manuadd <player.name> adventurer"
          - execute as_server "eco take <player.name> 15000"
          - execute as_server "gal broadcast <&8>[<&c>Upgrades<&8>] <&e><player.name> <&7>upgraded to the <&8>[<&7>Adventurer<&8>] <&7>rank!"
          - flag player adventurer
          - flag player wanderer:!
          - if <player.has_permission[-denizen.group.wanderer]> {
            - narrate "<&c>Error: You already purchased this rank!"
           }
        }
        else {
          - narrate "<&c>Error: You do not have enough to purchase this upgrade or do not already have the Wanderer upgrade."
        }
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot3 in rankup_menu:
        - if <player.has_flag[adventurer]> && <player.money> >= 50000 && <player.has_permission[denizen.group.adventurer]> {
          - execute as_server "manuadd <player.name> squire"
          - execute as_server "eco take <player.name> 50000"
          - execute as_server "gal broadcast <&8>[<&c>Upgrades<&8>] <&e><player.name> <&7>upgraded to the <&8>[<&7>Squire<&8>] <&7>rank!"
          - flag player adventurer:!
          - flag player squire
        }
        else {
          - narrate "<&c>Error: You do not have enough to purchase this upgrade or do not already have the Adventurer upgrade."
        }
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot4 in rankup_menu:
        - if <player.has_flag[squire]> && <player.money> >= 100000 && <player.has_permission[denizen.group.squire]> {
          - execute as_server "manuadd <player.name> warrior"
          - execute as_server "eco take <player.name> 100000"
          - execute as_server "gal broadcast <&8>[<&c>Upgrades<&8>] <&e><player.name> <&7>upgraded to the <&8>[<&7>Warrior<&8>] <&7>rank!"
          - flag player warrior
        }
        else {
          - narrate "<&c>Error: You do not have enough to purchase this upgrade or do not already have the Squire upgrade."
        }
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot5 in rankup_menu:
        - if <player.has_flag[warrior]> && <player.money> >= 500000 && <player.has_permission[denizen.group.warrior]> {
          - execute as_server "manuadd <player.name> noble"
          - execute as_server "eco take <player.name> 500000"
          - execute as_server "gal broadcast <&8>[<&c>Upgrades<&8>] <&e><player.name> <&7>upgraded to the <&8>[<&7>Noble<&8>] <&7>rank!"
          - flag player noble
        }
        else {
          - narrate "<&c>Error: You do not have enough to purchase this upgrade or do not already have the Warrior upgrade."
        }
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot6 in rankup_menu:
        - if <player.has_flag[noble]> && <player.money> >= 1000000 && <player.has_permission[denizen.group.noble]> {
          - execute as_server "manuadd <player.name> regent"
          - execute as_server "eco take <player.name> 1000000"
          - execute as_server "gal broadcast <&8>[<&c>Upgrades<&8>] <&e><player.name> <&7>upgraded to the <&8>[<&7>Regent<&8>] <&7>rank!"
          - flag player regent
        }
        else {
          - narrate "<&c>Error: You do not have enough to purchase this upgrade or do not already have the Noble upgrade."
        }
        - inventory close d:in@rankup_menu
        on player clicks rankup_menu_slot7 in rankup_menu:
        - if <player.has_flag[regent]> && <player.money> >= 2250000 && <player.has_permission[denizen.group.regent]> {
          - execute as_server "manuadd <player.name> gladiator"
          - execute as_server "eco take <player.name> 2250000"
          - execute as_server "gal broadcast <&8>[<&c>Upgrades<&8>] <&e><player.name> <&7>upgraded to the <&8>[<&7>Gladiator<&8>] <&7>rank!"
          - flag player squire
        }
        else {
          - narrate "<&c>Error: You do not have enough to purchase this upgrade or do not already have the Regent upgrade."
        }
        - inventory close d:in@rankup_menu
        
newrankup_command:
    type: command
    debug: false
    name: newrankup
    description: Upgrade your rank.
    usage: /newrankup
    script:
    - inventory open d:in@rankup_menu



RawRaw



Pastes made: 61946