Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- crate: &8[&eCrate&8]
- command /crate [<text>] [<text>] [<text>]:
- permission: *
- aliases: /cr
- trigger:
- if arg-1 is set:
- if arg-2 is set:
- if arg-1 is "key":
- if arg-2 is "diamond":
- give player 64 tripwire hook named "&bDiamond Key"
- if arg-2 is "gold":
- give player 64 tripwire hook named "&6Gold Key"
- if arg-2 is "bombe":
- give player 64 name tag of unbreaking 10 named "&cBombe Key"
- if arg-2 is "rankup":
- give player 64 name tag of unbreaking 10 named "&aRankup Key"
- if arg-1 is "set":
- if arg-2 is "diamond":
- set {crate.loc.diamond} to targeted block
- send "{@crate} &7Du satte &bDiamond Crate &7til %targeted block%" to player
- if arg-2 is "gold":
- set {crate.loc.gold} to targeted block
- send "{@crate} &7Du satte &6Gold Crate &7til %targeted block%" to player
- if arg-2 is "bombe":
- set {crate.loc.bombe} to targeted block
- send "{@crate} &7Du satte &cBombe Crate &7til %targeted block%" to player
- if arg-2 is "rankup":
- set {crate.loc.rankup} to targeted block
- send "{@crate} &7Du satte &aRankup Crate &7til %targeted block%" to player
- if arg-1 is "delete":
- if arg-2 is "diamond":
- delete {crate.loc.diamond}
- if arg-2 is "gold":
- delete {crate.loc.gold}
- if arg-2 is "bombe":
- delete {crate.loc.bombe}
- if arg-2 is "rankup":
- delete {crate.loc.rankup}
- else:
- send "&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&c( &eCrate Help &c)&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---"
- send " &eSæt en crate &8- &c/cr set <crate>"
- send " &eSlet en crate &8- &c/cr delete <crate>"
- send " &eGiv dig selv 64 keys &8- &c/cr key <crate>"
- send "&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---"
- on right click on ender chest:
- if event-block is {crate.loc.diamond}:
- cancel event
- if player is holding a tripwire hook named "&bDiamond Key":
- wait 2 ticks
- set {crate.cooldown.diamond.%player%} to true
- remove 1 tripwire hook named "&bDiamond Key" from player's inventory
- set {_diamondcrate.%player%} to a random integer between 1 and 100
- if {_diamondcrate.%player%} is between 1 and 34.99:
- send "{@crate} &7Du vandt &a11.000.000$" to player
- add 11000000 to player's balance
- if {_diamondcrate.%player%} is between 35 and 54.99:
- send "{@crate} &7Du vandt &a13.500.000$" to player
- add 13500000 to player's balance
- if {_diamondcrate.%player%} is between 55 and 69.99:
- send "{@crate} &7Du vandt &a15.000.000$" to player
- add 15000000 to player's balance
- if {_diamondcrate.%player%} is between 70 and 80.99:
- send "{@crate} &7Du vandt &a17.000.000$" to player
- add 17000000 to player's balance
- if {_diamondcrate.%player%} is between 81 and 81.5:
- send "{@crate} &7Du vandt &a10.000.000$" to player
- add 10000000 to player's balance
- if {_diamondcrate.%player%} is between 81.51 and 89.49:
- send "{@crate} &7Du vandt &a18.500.000$" to player
- add 18500000 to player's balance
- if {_diamondcrate.%player%} is between 89.50 and 95:
- send "{@crate} &7Du vandt &a27.500.000$" to player
- add 27500000 to player's balance
- if {_diamondcrate.%player%} is between 95 and 99.60:
- send "{@crate} &7Du vandt &a32.500.000$" to player
- add 32500000 to player's balance
- if {_diamondcrate.%player%} is between 99.61 and 100:
- broadcast "{@crate} &c%player% &7vandt &bDiamond &7jackpot på &a100.000.000$!"
- add 75000000 to player's balance
- play "NOTE_PLING" to player at volume 0.3
- else:
- send "{@crate} &7Du skal holde en &bDiamond Key &7i hånden"
- stop
- if event-block is {crate.loc.gold}:
- cancel event
- if player is holding a tripwire hook named "&6Gold Key":
- wait 2 ticks
- set {crate.cooldown.gold.%player%} to true
- remove 1 tripwire hook named "&6Gold Key" from player's inventory
- set {_goldcrate.%player%} to a random integer between 1 and 100
- if {_goldcrate.%player%} is between 1 and 34.99:
- send "{@crate} &7Du vandt &a8.000.000$" to player
- add 8000000 to player's balance
- if {_goldcrate.%player%} is between 35 and 54.99:
- send "{@crate} &7Du vandt &a9.500.000$" to player
- add 9500000 to player's balance
- if {_goldcrate.%player%} is between 55 and 69.99:
- send "{@crate} &7Du vandt &a11.000.000$" to player
- add 11000000 to player's balance
- if {_goldcrate.%player%} is between 70 and 80.99:
- send "{@crate} &7Du vandt &a12.500.000$" to player
- add 12500000 to player's balance
- if {_goldcrate.%player%} is between 81 and 81.5:
- broadcast "{@crate} &c%player% &7vandt &6Gold &7jackpot på &a$75.000.000$!"
- add 75000000 to player's balance
- if {_goldcrate.%player%} is between 81.51 and 89.49:
- send "{@crate} &7Du vandt &a14.000.000$" to player
- add 14000000 to player's balance
- if {_diamondcrate.%player%} is between 89.50 and 95:
- send "{@crate} &7Du vandt &a20.000.000$" to player
- add 20000000 to player's balance
- if {_goldcrate.%player%} is between 95 and 99.60:
- send "{@crate} &7Du vandt &a23.500.000$" to player
- add 23500000 to player's balance
- if {_goldcrate.%player%} is between 99.61 and 100:
- broadcast "{@crate} &c%player% &7vandt &6Gold &7jackpot på &a75.000.000$!"
- add 50000000 to player's balance
- play "NOTE_PLING" to player at volume 0.3
- else:
- send "{@crate} &7Du skal holde en &6Gold Key &7i hånden"
- stop
- on left click on chest:
- if event-block is {crate.loc.rankup}:
- cancel event
- on right click on chest:
- if event-block is {crate.loc.rankup}:
- cancel event
- if player is holding a name tag of unbreaking 10 named "&aRankup Key":
- remove 1 name tag of unbreaking 10 named "&aRankup Key" from player's inventory
- set {_rankupcrate.%player%} to a random integer between 1 and 100
- if {_rankupcrate.%player%} is between 1 and 34.99:
- set {rankupcratewin.%player%} to "1"
- if {_rankupcrate.%player%} is between 35 and 59.99:
- set {rankupcratewin.%player%} to "2"
- if {_rankupcrate.%player%} is between 60 and 79.99:
- set {rankupcratewin.%player%} to "3"
- if {_rankupcrate.%player%} is between 80 and 80.99:
- set {rankupcratewin.%player%} to "4"
- if {_rankupcrate.%player%} is between 81 and 90.99:
- set {rankupcratewin.%player%} to "5"
- if {_rankupcrate.%player%} is between 91 and 96.99:
- set {rankupcratewin.%player%} to "6"
- if {_rankupcrate.%player%} is between 97 and 100:
- set {rankupcratewin.%player%} to "7"
- if {rankupcratewin.%player%} is "1":
- send "{@crate} &7Du vandt &a50.000$" to player
- add 50000 to player's balance
- if {rankupcratewin.%player%} is "2":
- send "{@crate} &7Du vandt &a70.000$" to player
- add 70000 to player's balance
- if {rankupcratewin.%player%} is "3":
- send "{@crate} &7Du vandt &a150.000$" to player
- add 150000 to player's balance
- if {rankupcratewin.%player%} is "4":
- send "{@crate} &7Du vandt &a10.000.000$" to player
- add 10000000 to player's balance
- if {rankupcratewin.%player%} is "5":
- send "{@crate} &7Du vandt &a1.300.000$" to player
- add 1300000 to player's balance
- if {rankupcratewin.%player%} is "6":
- send "{@crate} &7Du vandt &a3.000.000$" to player
- add 3000000 to player's balance
- if {rankupcratewin.%player%} is "7":
- send "{@crate} &7Du vandt &a4.000.000$" to player
- add 4000000 to player's balance
- play "LEVEL_UP" to player at volume 0.5
- else:
- send "{@crate} &7Du skal holde en &aRankup Key &7i hånden"
- stop
- else:
- stop
- on left click on ender chest:
- if event-block is {crate.loc.diamond}:
- cancel event
- if {crate.running.%player%} is not set:
- open chest with 3 rows named "&b&lDiamond Crate" to player
- wait 3 ticks
- if inventory name of player's current inventory is "&b&lDiamond Crate":
- format slot 9 of player with wait music disc named "&a11.000.000$" with lore "&eChance &c35%%" to be unstealable
- format slot 10 of player with wait music disc named "&a13.500.000$" with lore "&eChance &c20%%" to be unstealable
- format slot 11 of player with wait music disc named "&a15.000.000$" with lore "&eChance &c15%%" to be unstealable
- format slot 12 of player with wait music disc named "&a17.000.000$" with lore "&eChance &c11%%" to be unstealable
- format slot 13 of player with wait music disc named "&a18.500.000$" with lore "&eChance &c8%%" to be unstealable
- format slot 14 of player with wait music disc named "&a27.500.000$" with lore "&eChance &c5,5%%" to be unstealable
- format slot 15 of player with wait music disc named "&a32.500.000$" with lore "&eChance &c4%%" to be unstealable
- format slot 16 of player with nether star named "&a75.000.000$" with lore "&eChance &c1%%" to be unstealable
- format slot 17 of player with dragon egg named "&a100.000.000$" with lore "&eChance &c0,5%%" to be unstealable
- loop numbers between 0 and 26:
- set {_slot} to loop-value
- if slot {_slot} of player's current inventory is air:
- format slot {_slot} of player with 1 black stained glass pane named " " to be unstealable
- else:
- stop
- if event-block is {crate.loc.gold}:
- cancel event
- if {crate.running.%player%} is not set:
- open chest with 3 rows named "&6&lGold Crate" to player
- wait 3 ticks
- if inventory name of player's current inventory is "&6&lGold Crate":
- format slot 9 of player with gold music disc named "&a8.000.000$" with lore "&eChance &c35%%" to be unstealable
- format slot 10 of player with gold music disc named "&a9.500.000$" with lore "&eChance &c20%%" to be unstealable
- format slot 11 of player with gold music disc named "&a11.000.000$" with lore "&eChance &c15%%" to be unstealable
- format slot 12 of player with gold music disc named "&a12.500.000$" with lore "&eChance &c11%%" to be unstealable
- format slot 13 of player with gold music disc named "&a14.000.000$" with lore "&eChance &c8%%" to be unstealable
- format slot 14 of player with gold music disc named "&a20.000.000$" with lore "&eChance &c5,5%%" to be unstealable
- format slot 15 of player with gold music disc named "&a23.500.000$" with lore "&eChance &c4%%" to be unstealable
- format slot 16 of player with nether star named "&a50.000.000$" with lore "&eChance &c1%%" to be unstealable
- format slot 17 of player with dragon egg named "&a75.000.000$" with lore "&eChance &c0,5%%" to be unstealable
- loop numbers between 0 and 26:
- set {_slot} to loop-value
- if slot {_slot} of player's current inventory is air:
- format slot {_slot} of player with 1 black stained glass pane named " " to be unstealable
- else:
- stop
- on rightclick on entity:
- if name of clicked entity is "&6&lKeys":
- if {crate.running.%player%} is not set:
- open chest with 3 rows named "&8Key-Shop" to player
- wait 3 ticks
- if inventory name of player's current inventory is "&8Key-Shop":
- format slot 0 of player with 1 black stained glass pane named "&r" to be unstealable
- format slot 8 of player with 1 black stained glass pane named "&r" to be unstealable
- format slot 9 of player with 1 black stained glass pane named "&r" to be unstealable
- format slot 17 of player with 1 black stained glass pane named "&r" to be unstealable
- format slot 18 of player with 1 black stained glass pane named "&r" to be unstealable
- format slot 26 of player with 1 black stained glass pane named "&r" to be unstealable
- format slot 12 of player with 1 tripwire hook named "&6Gold Key" with lore "||&aBeskrivelse:|| &7Klik her for at købe || &71 gold key||&r||&aPris|| &7$65.000.000:||&r||" to run [execute console command "keyshop gold %player%"]
- format slot 14 of player with 1 tripwire hook named "&bDiamond Key" with lore "||&aBeskrivelse:|| &7Klik her for at købe || &71 diamond key||&r||&aPris|| &7$80.000.000:||&r||" to run [execute console command "keyshop diamond %player%"]
- loop numbers between 0 and 26:
- set {_slot} to loop-value
- if slot {_slot} of player's current inventory is air:
- format slot {_slot} of player with 1 green stained glass named "&r" to be unstealable
- else:
- stop
- command /keyshop [<text>] [<offline player>]:
- permission: *
- executable by: console
- trigger:
- if arg-1 is "gold":
- if arg-2's balance is greater than or equal to 65000000:
- remove 65000000 from arg-2's balance
- add 1 tripwire hook named "&6Gold Key" to arg-2's inventory
- send "&8[&eCrate&8] &7Du har købt 1 &6Gold Key"
- else:
- send "&8[&eCrate&8] &7Du har ikke penge nok til at købe en &6Gold &7Key" to arg-2
- if arg-1 is "diamond":
- if arg-2's balance is greater than or equal to 80000000:
- remove 80000000 from arg-2's balance
- add 1 tripwire hook named "&bDiamond Key" to arg-2's inventory
- send "&8[&eCrate&8] &7Du har købt 1 &bDiamond Key"
- else:
- send "&8[&eCrate&8] &7Du har ikke penge nok til at købe en &bDiamond Key" to arg-2
- on inventory close:
- if {crate.running.bombe.%player%} is set:
- wait 0.25 second
- open chest with 5 rows named "&cBombe Crate" to player
- on right click on chest:
- if event-block is {crate.loc.bombe}:
- cancel event
- if player is holding a name tag of unbreaking 10 named "&cBombe Key":
- if {crate.running.%player%} is not set:
- remove 1 name tag of unbreaking 10 named "&cBombe Key" from player's inventory
- open chest with 5 rows named "&cBombe Crate" to player
- wait 3 ticks
- set {crate.running.bombe.%player%} to true
- set {crate.running.%player%} to true
- loop 18 times:
- wait 3 ticks
- if inventory name of player's current inventory is "&cBombe Crate":
- format slot 0 of player with Green stained glass pane named " " to be unstealable
- format slot 8 of player with Green stained glass pane named " " to be unstealable
- format slot 9 of player with Green stained glass pane named " " to be unstealable
- format slot 17 of player with Green stained glass pane named " " to be unstealable
- format slot 18 of player with Green stained glass pane named " " to be unstealable
- format slot 26 of player with Green stained glass pane named " " to be unstealable
- format slot 27 of player with Green stained glass pane named " " to be unstealable
- format slot 35 of player with Green stained glass pane named " " to be unstealable
- format slot 36 of player with Green stained glass pane named " " to be unstealable
- format slot 44 of player with Green stained glass pane named " " to be unstealable
- loop numbers between 0 and 44:
- set {_slot} to loop-value-2
- if slot {_slot} of player's current inventory is air:
- format slot {_slot} of player with 1 black stained glass named " " to be unstealable
- set {_bombecrateslot.%player%} to a random integer between 1 and 8
- if {_bombecrateslot.%player%} is 1:
- format slot 13 of player with orange stained glass pane named " " to be unstealable
- format slot 21 of player with orange stained glass pane named " " to be unstealable
- format slot 23 of player with orange stained glass pane named " " to be unstealable
- format slot 31 of player with orange stained glass pane named " " to be unstealable
- if {_bombecrateslot.%player%} is 2:
- format slot 13 of player with magenta stained glass pane named " " to be unstealable
- format slot 21 of player with magenta stained glass pane named " " to be unstealable
- format slot 23 of player with magenta stained glass pane named " " to be unstealable
- format slot 31 of player with magenta stained glass pane named " " to be unstealable
- if {_bombecrateslot.%player%} is 3:
- format slot 13 of player with red stained glass pane named " " to be unstealable
- format slot 21 of player with red stained glass pane named " " to be unstealable
- format slot 23 of player with red stained glass pane named " " to be unstealable
- format slot 31 of player with red stained glass pane named " " to be unstealable
- if {_bombecrateslot.%player%} is 4:
- format slot 13 of player with yellow stained glass pane named " " to be unstealable
- format slot 21 of player with yellow stained glass pane named " " to be unstealable
- format slot 23 of player with yellow stained glass pane named " " to be unstealable
- format slot 31 of player with yellow stained glass pane named " " to be unstealable
- if {_bombecrateslot.%player%} is 5:
- format slot 13 of player with purple stained glass pane named " " to be unstealable
- format slot 21 of player with purple stained glass pane named " " to be unstealable
- format slot 23 of player with purple stained glass pane named " " to be unstealable
- format slot 31 of player with purple stained glass pane named " " to be unstealable
- if {_bombecrateslot.%player%} is 6:
- format slot 13 of player with blue stained glass pane named " " to be unstealable
- format slot 21 of player with blue stained glass pane named " " to be unstealable
- format slot 23 of player with blue stained glass pane named " " to be unstealable
- format slot 31 of player with blue stained glass pane named " " to be unstealable
- if {_bombecrateslot.%player%} is 7:
- format slot 13 of player with pink stained glass pane named " " to be unstealable
- format slot 21 of player with pink stained glass pane named " " to be unstealable
- format slot 23 of player with pink stained glass pane named " " to be unstealable
- format slot 31 of player with pink stained glass pane named " " to be unstealable
- if {_bombecrateslot.%player%} is 8:
- format slot 13 of player with white stained glass pane named " " to be unstealable
- format slot 21 of player with white stained glass pane named " " to be unstealable
- format slot 23 of player with white stained glass pane named " " to be unstealable
- format slot 31 of player with white stained glass pane named " " to be unstealable
- set {_bombecrateprize.%player%} to a random integer between 1 and 100
- if {_bombecrateprize.%player%} is between 1 and 40:
- format slot 22 of player with 8 eye of ender named "&4&lLille Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
- set {_bombecratewin.%player%} to "lillebombe"
- if {_bombecrateprize.%player%} is between 40 and 70:
- format slot 22 of player with 6 eye of ender named "&4&lMellem Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
- set {_bombecratewin.%player%} to "mellembombe"
- if {_bombecrateprize.%player%} is between 70 and 90:
- format slot 22 of player with 4 eye of ender named "&4&lStor Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
- set {_bombecratewin.%player%} to "storbombe"
- if {_bombecrateprize.%player%} is between 90 and 100:
- format slot 22 of player with 2 eye of ender named "&4&lNuke Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
- set {_bombecratewin.%player%} to "nukebombe"
- play "NOTE_PLING" to player at volume 0.5
- wait 8 ticks
- wait 3 ticks
- if {_bombecratewin.%player%} is "lillebombe":
- make console execute command "/bomb give %player% lille 8"
- if {_bombecratewin.%player%} is "mellembombe":
- make console execute command "/bomb give %player% mellem 6"
- if {_bombecratewin.%player%} is "storbombe":
- make console execute command "/bomb give %player% stor 4"
- if {_bombecratewin.%player%} is "nukebombe":
- make console execute command "/bomb give %player% nuke 2"
- play "LEVEL_UP" to player at volume 0.5
- wait 2 seconds
- delete {bombecratewin.%player%}
- wait 3 ticks
- delete {crate.running.%player%}
- delete {crate.running.bombe.%player%}
- close player's inventory
- else:
- send "{@crate} &7Du er allerede i gang med at åbne en &eCrate!"
- else:
- send "{@crate} &7Du skal holde en &cBombe Key &7i hånden"
- stop
- on left click on chest:
- if event-block is {crate.loc.bombe}:
- cancel event
- if {crate.running.%player%} is not set:
- open chest with 4 rows named "&c&lBombe Crate" to player
- wait 3 ticks
- if inventory name of player's current inventory is "&c&lBombe Crate":
- format slot 10 of player with a book named "&4&lLille Bombe" with lore "&eChance &c40%%" to be unstealable
- format slot 19 of player with 8 eye of ender named "&4&lLille Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
- format slot 12 of player with a book named "&4&lMellem Bombe" with lore "&eChance &c30%%" to be unstealable
- format slot 21 of player with 6 eye of ender named "&4&lMellem Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
- format slot 14 of player with a book named "&4&lStor Bombe" with lore "&eChance &c20%%" to be unstealable
- format slot 23 of player with 4 eye of ender named "&4&lStor Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
- format slot 16 of player with a book named "&4&lNuke Bombe" with lore "&eChance &c10%%" to be unstealable
- format slot 25 of player with 2 eye of ender named "&4&lNuke Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
- loop numbers between 0 and 35:
- set {_slot} to loop-value
- if slot {_slot} of player's current inventory is air:
- format slot {_slot} of player with 1 black stained glass named " " to be unstealable
- else:
- stop
- on inventory click:
- if {crate.running.bombe.%player%} is set:
- cancel event
- on place:
- if event-block is a tripwire hook named "&bDiamond Key":
- cancel the event
- if event-block is a tripwire hook named "&6Gold Key":
- cancel the event
- on quit:
- delete {crate.running.%player%}
- #bombe
- delete {crate.running.bombe.%player%}
- delete {bombecratewin.%player%}
- #rankup
- delete {crate.running.rankup.%player%}
- delete {rankupcratewin.%player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement