Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on inventory click:
- inventory name of player's current inventory is "&c&lDaily &c&lCrate"
- cancel event
- on inventory close:
- if {crate::%player%} is set:
- loop 9 times:
- set {slot.%loop-number%.%player%} to slot 8 + loop-number of player's current inventory
- wait a tick
- open chest with 3 row named "&c&lDaily &c&lCrate" to player
- loop 18 times:
- if loop-number is smaller than 9:
- if loop-number - 1 is 4:
- set slot loop-number - 1 of player's current inventory to light green stained glass pane
- else:
- set slot loop-number - 1 of player's current inventory to black stained glass pane
- else:
- if loop-number + 9 is 22:
- set slot loop-number + 9 of player's current inventory to light green stained glass pane
- else:
- set slot loop-number + 9 of player's current inventory to black stained glass pane
- loop 9 times:
- set slot 8 + loop-number of player's current inventory to {slot.%loop-number%.%player%}
- delete {slot.%loop-number%.%player%}
- on right click on Trapped Chest:
- if {crate::%player%} is set:
- stop
- on right click on Trapped Chest:
- cancel event
- if name of player's held item contains "&cDaily &7key":
- remove glowing tripwire hook named "&cDaily &7key" from player's tool
- set {crate::%player%} to 0
- set {dailyprizes::helmet} to iron helmet of protection 2
- set {dailyprizes::chestplate} to iron chestplate of protection 2
- set {dailyprizes::leggings} to iron leggings of protection 2
- set {dailyprizes::boots} to iron boots of protection 2
- set {dailyprizes::sword} to iron sword of sharpness 4
- set {dailyprizes::bow} to bow of power 2
- set {dailyprizes::rod} to fishing rod of knockback 2
- set {dailyprizes::firecharge} to fire charge of fire aspect 2
- set {dailyprizes::blood} to redstone named "&7&lx64 &4&lBlood"
- set {dailyprizes::golden_apple} to golden_apple named "&7&lx2 &e&lGolden Apples"
- set {dailyprizes::experience} to bottle_o'_enchanting named "&7&lx4 &b&lBottle of Xp"
- set {dailyprizes::speed} to water_bottle:8226 named "&7&lx2 &9&lSpeed Potion"
- set {dailyprizes::strength} to water_bottle:8233 named "&7&lx2 &5&lStrength Potion"
- set {dailyprizes::axe} to iron axe of sharpness 4
- set {dailyprizes::goldkit} to gold ingot named "&6&lGold Kit"
- set {dailyprizes::rank} to gold block named "&7&lPro Rank"
- open chest with 3 row named "&c&lDaily &c&lCrate" to player
- set slot 0 of player's current inventory to black stained glass pane
- set slot 1 of player's current inventory to black stained glass pane
- set slot 2 of player's current inventory to black stained glass pane
- set slot 3 of player's current inventory to black stained glass pane
- set slot 4 of player's current inventory to light green stained glass pane
- set slot 5 of player's current inventory to black stained glass pane
- set slot 6 of player's current inventory to black stained glass pane
- set slot 7 of player's current inventory to black stained glass pane
- set slot 8 of player's current inventory to black stained glass pane
- set slot 18 of player's current inventory to black stained glass pane
- set slot 19 of player's current inventory to black stained glass pane
- set slot 20 of player's current inventory to black stained glass pane
- set slot 21 of player's current inventory to black stained glass pane
- set slot 22 of player's current inventory to light green stained glass pane
- set slot 23 of player's current inventory to black stained glass pane
- set slot 24 of player's current inventory to black stained glass pane
- set slot 25 of player's current inventory to black stained glass pane
- set slot 26 of player's current inventory to black stained glass pane
- loop 25 times:
- wait 0.15 seconds
- play "click" to the player at volume 10
- loop 8 times:
- set slot loop-number-2 + 8 of player's current inventory to slot loop-number-2 + 9 of player's current inventory
- if loop-number is 20:
- set slot 17 of player's current inventory to air
- chance of 90%:
- set slot 17 of player's current inventory to iron helmet of protection 2
- if slot 17 of player's current inventory is air:
- chance of 60%:
- set slot 17 of player's current inventory to iron chestplate of protection 2
- if slot 17 of player's current inventory is air:
- chance of 70%:
- set slot 17 of player's current inventory to iron leggings of protection 2
- if slot 17 of player's current inventory is air:
- chance of 80%:
- set slot 17 of player's current inventory to iron boots of protection 2
- if slot 17 of player's current inventory is air:
- chance of 50%:
- set slot 17 of player's current inventory to iron sword of sharpness 2
- if slot 17 of player's current inventory is air:
- chance of 50%:
- set slot 17 of player's current inventory to bow of power 2
- if slot 17 of player's current inventory is air:
- chance of 70%:
- set slot 17 of player's current inventory to fishing rod of knockback 2
- if slot 17 of player's current inventory is air:
- chance of 80%:
- set slot 17 of player's current inventory to fire charge of fire aspect 2
- if slot 17 of player's current inventory is air:
- chance of 45%:
- set slot 17 of player's current inventory to redstone named "&7&lx64 &4&lBlood"
- if slot 17 of player's current inventory is air:
- chance of 40%:
- set slot 17 of player's current inventory to golden apple named "&7&lx2 &e&lGolden Apples"
- if slot 17 of player's current inventory is air:
- chance of 40%:
- set slot 17 of player's current inventory to bottle_o'_enchanting named "&7&lx4 &b&lBottle of Xp"
- if slot 17 of player's current inventory is air:
- chance of 30%:
- set slot 17 of player's current inventory to water_bottle:8226 named "&7&lx2 &9&lSpeed Potion"
- if slot 17 of player's current inventory is air:
- chance of 15%:
- set slot 17 of player's current inventory to water_bottle:8233 named "&7&lx2 &5&lStrength Potion"
- if slot 17 of player's current inventory is air:
- chance of 7%:
- set slot 17 of player's current inventory to iron axe of sharpness 4
- if slot 17 of player's current inventory is air:
- chance of 5%:
- set slot 17 of player's current inventory to gold ingot named "&6&lGold Kit"
- if slot 17 of player's current inventory is air:
- chance of 3%:
- set slot 17 of player's current inventory to gold block named "&7&lPro Rank"
- if slot 17 of player's current inventory is air:
- set slot 17 of player's current inventory to iron helmet of protection 2
- else:
- set {temp} to random element of {dailyprizes::*}
- set slot 17 of player's current inventory to {temp}
- delete {temp}
- play "level up" to the player at volume 50
- if slot 13 of player's current inventory is iron helmet:
- give iron helmet of protection 2 to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lhelmet &efrom &cDaily Key."
- if slot 13 of player's current inventory is iron chestplate:
- give iron chestplate of protection 2 to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lChestplate &efrom &cDaily Key."
- if slot 13 of player's current inventory is iron leggings:
- give iron leggings of protection 2 to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lLeggings &efrom &cDaily Key."
- if slot 13 of player's current inventory is iron boots:
- give iron boots of protection 2 to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lBoots &efrom &cDaily Key."
- if slot 13 of player's current inventory is iron sword:
- give iron sword of sharpness 2 to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lSword &efrom &cDaily Key."
- if slot 13 of player's current inventory is bow:
- give bow of power 2 to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lBow &efrom &cDaily Key."
- if slot 13 of player's current inventory is fishing rod:
- give fishing rod of knockback 2 to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lRod &efrom &cDaily Key."
- if slot 13 of player's current inventory is fire charge:
- give fire charge of fire aspect 2 to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lFire Charge &efrom &cDaily Key."
- if slot 13 of player's current inventory is redstone:
- give 64 of redstone named "&4&lBlood" to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lx64 Blood &cDaily Key."
- if slot 13 of player's current inventory is golden apple:
- give 2 of golden apple to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lx2 Gapples &efrom &cDaily Key."
- if slot 13 of player's current inventory is bottle_o'_enchanting:
- give 4 of bottle_o'_enchanting to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lx4 Xp Bottle &efrom &cDaily Key."
- if slot 13 of player's current inventory is water_bottle:8226:
- give 2 of water_bottle:8226 to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lx2 Speed Potion &efrom &cDaily Key."
- if slot 13 of player's current inventory is water_bottle:8233:
- give 2 of water_bottle:8233 to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lx2 Strength Potion &efrom &cDaily Key."
- if slot 13 of player's current inventory is iron axe:
- give iron axe of sharpness 4 to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lAxe &efrom &cDaily Key."
- if slot 13 of player's current inventory is gold ingot:
- give gold ingot named "&6&lGold Kit" with lore "&b► right-click to recieve your reward." to player
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lGold Kit &efrom &cDaily Key."
- if slot 13 of player's current inventory is gold block:
- make console execute command "rank"
- broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lPro Rank &efrom &cDaily Key."
- delete {dailyprizes::*}
- delete {crate::%player%}
- else:
- send "&eKalimeraMc &8» &cYou don't have any crate key in your hand."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement