Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /givebooster [<players>] [<text>]:
- permission: OPGods.Booster
- trigger:
- if arg 1 is set:
- if arg 2 is "one":
- give arg-1 nether star named "&e&n1x booster for 15m&r &8(&aRight click to activate&8)"
- if arg 1 is set:
- if arg 2 is "two":
- give arg-1 nether star named "&e&n2x booster for 15m&r &8(&aRight click to activate&8)"
- if arg 1 is set:
- if arg 2 is "three":
- give arg-1 nether star named "&e&n3x booster for 15m&r &8(&aRight click to activate&8)"
- if arg 1 is set:
- if arg 2 is "four":
- give arg-1 nether star named "&e&n4x booster for 15m&r &8(&aRight click to activate&8)"
- if arg 1 is set:
- if arg 2 is "five":
- give arg-1 nether star named "&e&n5x booster for 15m&r &8(&aRight click to activate&8)"
- on right click:
- player is holding an nether star named "&e&n5x booster for 15m&r &8(&aRight click to activate&8)":
- # You needed to start it here :)
- # start the cooldown
- set {one.%player%.lastused} to now
- set {_waited} to difference between {one.%player%.lastused} and now
- if {_waited} is less than 15 minutes:
- message "&aYou have to wait &c&n%difference between 15 minutes and {_waited}%&r &ebefore you can use a booster again!"
- stop
- remove 1 nether star named "&e&n5x booster for 15m&r &8(&aRight click to activate&8)" from player's inventory
- message "&8[&aOPGods&8] &e&n5x Booster&r &ahas been applied for &c&n15 minutes!"
- execute console command "/manuaddp %player% opgods.booster.5"
- every 1 second:
- if {one.%player%.lastused} is set:
- remove 1 from {one.%player%.lastused}
- if {one.%player%.lastused} is less than 1 second:
- execute console command "/manudelp %player% opgods.booster.5"
- clear {one.%player%.lastused}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement