Hello Im kinda new at skript so..
Im trying to make a custom potion, problem is that the potion can runs out even if the player is offline
and I want that it only runs out when player is online
Skript:
on consume:
if name of player's tool is "&e&lTea":
if {custompot::%player%} is not set:
message "&e&lTea &aActivated." to player
set {custompot::%player%} to true
wait 60 seconds
clear {custompot::%player%}
message "&cYour Potion &e&lTea &cExpired." to player
else if {custompot::%player%} is true:
cancel event
message "&cYou have this potion effect already!" to player
Im trying to make a custom potion, problem is that the potion can runs out even if the player is offline
and I want that it only runs out when player is online
Skript:
on consume:
if name of player's tool is "&e&lTea":
if {custompot::%player%} is not set:
message "&e&lTea &aActivated." to player
set {custompot::%player%} to true
wait 60 seconds
clear {custompot::%player%}
message "&cYour Potion &e&lTea &cExpired." to player
else if {custompot::%player%} is true:
cancel event
message "&cYou have this potion effect already!" to player