Title was meant to be named "Cant get ability with time limit to work with other skript"
I'm an amateur at skript and this is the first time I've ever tried to write something like this. I'm trying to make a right-click-ability compatible with one of my skripts installed. I tried putting them like this:
The ability's variable is activated by this:
My code's probably littered with errors as it's my first try, but I can't exactly find what's wrong with the code.
I'm an amateur at skript and this is the first time I've ever tried to write something like this. I'm trying to make a right-click-ability compatible with one of my skripts installed. I tried putting them like this:
Code:
on mine of coal ore:
if {ore} is true:
cancel the event
give player 1 coal named "&7Coal" with lore "&7&lCOMMON"
set {_exp} to a random integer from 0 and 2
if {_exp} is 0:
send action bar "&a+0 exp" to player
if {_exp} is 1:
send action bar "&a+1 exp" to player
give 1 exp to the player
if {_exp} is 2:
send action bar "&a+2 exp" to player
give 2 exp to the player
set {bedrock.%player%} to true
set event-block to bedrock
wait 5 seconds
set event-block to coal ore
set {bedrock.%player%} to false
if player's tool is golden pickaxe:
if name of tool is "&e&lMidas Touch":
if {midas::%player%} is true:
play raw sound "entity.player.levelup" at player with pitch 5 volume 10
give player 3 gold ingots named "&aGold Ingot"
The ability's variable is activated by this:
Code:
on right-click:
if player's tool is golden pickaxe:
if name of tool is "&e&lMidas Touch":
{cooldown::%player%} is true:
{midas::%player%} is true:
send action bar "&7⋙ &eSkill already active! &7⋘" to player
cancel event
stop
cancel event
send action bar "&7⋙ &cYour item is charging! &7⋘" to player
stop
else:
set {cooldown::%player%} to true
set {midas::%player%} to true
send action bar "&6⋙ &eMidas Touch active! &6⋘" to player
wait 7 seconds
set {midas::%player%} to false
send action bar "&6⋙ &eMidas Touch has worn off. &6⋘" to player
wait 10 seconds
clear {cooldown::%player%}
send action bar "&7⋙ Midas Touch is now ready. &7⋘" to player
My code's probably littered with errors as it's my first try, but I can't exactly find what's wrong with the code.