It should set it self already, I changed the skript to this:In the break event, you would change the asterisk to the %player's uuid%. Changing the booster globally would look kinda like this:
Code:command enableboost: permission: boost.admin trigger: set {active.booster::*} to "true" # Changes every boost for every player to "true". You could use a loop to make it only affect only online players # Add another other num/values needed to make a boost work for a player here
Code:
# {type.booster::*} = Booster Type
# {active.booster::*} = Booster active or not
# {time.booster::*} = Time left on booster
command boostergive <integer> [<player>]:
aliases: /bgive
permission: op
trigger:
if arg-1 is 2, 5, 10, 20 or 30:
if arg-2 is not set:
give player 1 orange dye named "&b%arg-1%x &eBooster &f| &b5 minutes"
else:
give arg-2 1 orange dye named "&b%arg-1%x &eBooster &f| &b5 minutes"
else:
send "&6&lBOOSTER &8» &c[ERROR] &fUnknown booster integer."
command booster:
trigger:
if {active.booster::*} is true:
send "&6&lBOOSTER &8» &fYou have a booster active: &b%{type.booster::*}%&fx Booster, &b%{time.booster::*}% &fminutes remaining."
else:
send "&6&lBOOSTER &8» &fYou do not have a booster active."
on rightclick with orange dye:
if {active.booster::*} is true:
send "&6&lBOOSTER &8» &c[ERROR] &fYour &b%{type.booster::*}%&fx Booster is already active. &b%{time.booster::*}% &fminutes remaining until you can use another one."
else:
if name of player's tool is "&b2x &eBooster &f| &b5 minutes":
set {type.booster::*} to 2
else if name of player's tool is "&b5x &eBooster &f| &b5 minutes":
set {type.booster::*} to 5
else if name of player's tool is "&b10x &eBooster &f| &b5 minutes":
set {type.booster::*} to 10
else if name of player's tool is "&b20x &eBooster &f| &b5 minutes":
set {type.booster::*} to 20
else if name of player's tool is "&b30x &eBooster &f| &b5 minutes":
set {type.booster::*} to 30
else:
stop
remove 1 orange dye named "&b%{type.booster::*}%x &eBooster &f| &b5 minutes" from player
set {active.booster::*} to true
set {time.booster::*} to 5
send "&6&lBOOSTER &8» &fYou enabled your booster! &b%{time.booster::*}% &fminutes remaining."
while {time.booster::*} is more than 0:
wait 1 minute
remove 1 from {time.booster::*}
send "&6&lBOOSTER &8» &b%{time.booster::*}% &fminute(s) remaining on your booster."
set {active.booster::*} to false
clear {type.booster::*}
send "&6&lBOOSTER &8» &fYour booster period is now over."