Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /crate [<integer>]:
- permission: *
- trigger:
- if arg-1 is set:
- if arg-1 is a integer:
- if arg-1 is between 1 and 4:
- if arg-1 is 1:
- give player 1 chest named "&aEmerald Crate"
- send "&aDu modtog en emerald crate!"
- else if arg-1 is 2:
- give player 1 chest named "&bDiamond Crate"
- send "&aDu modtog en diamond crate!"
- else if arg-1 is 3:
- give player 1 chest named "&eKing Crate"
- send "&aDu modtog en king crate!"
- else if arg-1 is 4:
- give player 1 chest named "&5Legend Crate"
- send "&aDu modtog en legend crate!"
- else:
- send "&7&m----------&b&lCrates&7&m----------"
- send " "
- send "&a1. Emerald Crate"
- send "&b2. Diamond Crate"
- send "&e3. King Crate"
- send "&54. Legend Crate"
- else:
- send "&cDet skal være et heltal!"
- else:
- send "&b/crate <integer>"
- send "&7&m----------&b&lCrates&7&m----------"
- send " "
- send "&a1. Emerald Crate"
- send "&b2. Diamond Crate"
- send "&e3. King Crate"
- send "&54. Legend Crate"
- on leftclick on a chest:
- # Preview på hvad du kan vinde
- if event-block contains {crates.emerald::*}:
- open chest with 3 rows named "&eEmerald Prizes" to player
- format slot 10 of player with paper named "&b100 kr" with lore "&7Chance: &b50%" to be unstealable
- format slot 11 of player with diamond sword named "&aEmerald Sword!" with lore "&7Chance: &b25%" to be unstealable
- format slot 12 of player with paper named "&b5000 kr" with lore "&7Chance: &b10%" to be unstealable
- format slot 13 of player with book named "&aEmerald Rank" with lore "&7Chance: &b5%" to be unstealable
- # Diamond, King osv..
- on rightclick on a chest:
- # Handle Emerald Crate
- if event-block contains {crates.emerald::*}:
- if player is holding a trip wire hook named "&aEmerald Key":
- if player's inventory is not full:
- remove trip wire hook named "&aEmerald Key" from player's inventory
- open chest with 3 rows named "&aEmerald Crate" to player
- chance of 5%:
- format slot 13 of player with book named "&aEmerald Rank" to close
- give player 1 book named "&aEmerald Rank"
- send "&bDu vandt emerald rank!"
- stop
- chance of 10%:
- format slot 13 of player with paper named "&b5000 kr" to close
- add 5000 to player's balance
- send "&bDu vandt 5000 kr!"
- stop
- chance of 25%:
- format slot 13 of player with diamond sword named "&aEmerald Sword!" to close
- give player 1 diamond sword named "&aEmerald Sword"
- send "&bDu vandt et Diamond Sword!"
- stop
- # Dårligste ting kommer her.
- format slot 13 of player with paper named "&b100 kr" to close
- add 100 to player's balance
- send "&bDu vandt 100 kr!"
- else:
- send "&cDer er ikke nok plads i din inventory!"
- else:
- send "&cDu skal bruge en Emerald key for dette!"
- set {_knock} to random number between 0.1 and 0.4
- push player backwards at speed {_knock}
- if event-block contains {crates.diamond::*}:
- if player is holding a trip wire hook named "&bDiamond Key":
- if player's inventory is not full:
- remove trip wire hook named "&bDiamond Key" from player's inventory
- open chest with 3 rows named "&bDiamond Key" to player
- chance of 5%:
- format slot 13 of player with book named "&bDiamond Rank" to close
- give player 1 book named "&bDiamond Rank"
- send "&bDu vandt emerald rank!"
- stop
- chance of 10%:
- format slot 13 of player with paper named "&b5000 kr" to close
- add 5000 to player's balance
- send "&bDu vandt 5000 kr!"
- stop
- chance of 25%:
- format slot 13 of player with diamond sword named "&bDiamond Sword!" to close
- give player 1 diamond sword named "&bDiamond Sword"
- send "&bDu vandt et Diamond Sword!"
- stop
- # Dårligste ting kommer her.
- format slot 13 of player with paper named "&b50 kr" to close
- add 50 to player's balance
- send "&bDu vandt 50 kr!"
- else:
- send "&cDer er ikke nok plads i din inventory!"
- else:
- send "&cDu skal bruge en Diamond key for dette!"
- set {_knock} to random number between 0.1 and 0.4
- push player backwards at speed {_knock}
- if event-block contains {crates.king::*}:
- if player is holding a trip wire hook named "&eKing Key":
- if player's inventory is not full:
- remove trip wire hook named "&eKing Key" from player's inventory
- open chest with 3 rows named "&eKing Crate" to player
- chance of 5%:
- format slot 13 of player with book named "&eKing Rank" to close
- give player 1 book named "&eKing Rank"
- send "&bDu vandt king rank!"
- stop
- chance of 10%:
- format slot 13 of player with paper named "&b5000 kr" to close
- add 5000 to player's balance
- send "&bDu vandt 5000 kr!"
- stop
- chance of 25%:
- format slot 13 of player with diamond sword named "&eKing Sword!" to close
- give player 1 diamond sword named "&eKing Sword"
- send "&bDu vandt et Diamond Sword!"
- stop
- # Dårligste ting kommer her.
- format slot 13 of player with paper named "&b100 kr" to close
- add 100 to player's balance
- send "&bDu vandt 100 kr!"
- else:
- send "&cDer er ikke nok plads i din inventory!"
- else:
- send "&cDu skal bruge en King key for dette!"
- set {_knock} to random number between 0.1 and 0.4
- push player backwards at speed {_knock}
- if event-block contains {crates.legend::*}:
- if player is holding a trip wire hook named "&5Legend Key":
- if player's inventory is not full:
- remove trip wire hook named "&5Legend Key" from player's inventory
- open chest with 3 rows named "&5Legend Crate" to player
- chance of 5%:
- format slot 13 of player with book named "&5Legend Rank" to close
- give player 1 book named "&eLegend Rank"
- send "&bDu vandt legend rank!"
- stop
- chance of 10%:
- format slot 13 of player with paper named "&b5000 kr" to close
- add 5000 to player's balance
- send "&bDu vandt 5000 kr!"
- stop
- chance of 25%:
- format slot 13 of player with diamond sword named "&bDiamond Sword!" to close
- give player 1 diamond sword named "&bDiamond Sword"
- send "&bDu vandt et Diamond Sword!"
- stop
- # Dårligste ting kommer her.
- format slot 13 of player with paper named "&b50 kr" to close
- add 50 to player's balance
- send "&bDu vandt 50 kr!"
- else:
- send "&cDer er ikke nok plads i din inventory!"
- else:
- send "&cDu skal bruge en Legend key for dette!"
- set {_knock} to random number between 0.1 and 0.4
- push player backwards at speed {_knock}
- on block place:
- if player is holding a chest named "&aEmerald Crate":
- if player has permission "crate.place.emerald":
- add event-block to {crates.emerald::*}
- send "&bDu placerede en Emerald Crate!"
- else:
- send "&cDu har ikke adgang til dette!"
- else if player is holding a chest named "&bDiamond Crate":
- if player has permission "crate.place.diamond":
- add event-block to {crates.diamond::*}
- send "&bDu placerede en Diamond Crate!"
- else:
- send "&cDu har ikke adgang til dette!"
- else if player is holding a chest named "&eKing Crate":
- if player has permission "crate.place.king":
- add event-block to {crates.king::*}
- send "&bDu placerede en King Crate!"
- else:
- send "&cDu har ikke adgang til dette!"
- else if player is holding a chest named "&5Legend Crate":
- if player has permission "crate.place.legend":
- add event-block to {crates.legend::*}
- send "&bDu placerede en Legend Crate!"
- else:
- send "&cDu har ikke adgang til dette!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement