Need help ASAP with skript

Status
This thread has been locked.

potlaggerino

Feedback score
0
Posts
7
Reactions
0
Resources
0
Hello there i am in the making of a skript plugin and im making Special wands so everything is going well i have commands and stuff ( i know the basics of skript) but if i try this the cooldown works all fine but if i try right clicking it works but it works with everything: Swords, random blocks but i only want it to so u can right click it with a blaze rod named &eLightning Wand
Could anyone help me please?

Regards, potlag

Here is my code btw:

on rightclick:
if player's tool is blaze rod:
if {cooldown.%player%} is false:
if name of tool is "&eLighting Wand":
strike lightning at targeted block
set {cooldown.%player%} to true
wait 3 seconds
set {cooldown.%player%} to false
if {cooldown.%player%} is true:
message "Ur still on cooldown"
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Keenan

Have A Great Day!
Supreme
Feedback score
4
Posts
503
Reactions
105
Resources
0
tanke out the . after the cooldown?
 

Keenan

Have A Great Day!
Supreme
Feedback score
4
Posts
503
Reactions
105
Resources
0
the :'s ?
 

PhaseClan

Tinkerer
Premium
Feedback score
10
Posts
484
Reactions
219
Resources
0
I would recommend putting it on pastebin or hastebin so we can make sure you're tabs/spacing is correct.

And is there an error?
 

lAkjtzAZ0

Deactivated
Feedback score
16
Posts
1,071
Reactions
1,013
Resources
0
I'm fairly positive it's because you're doing the cooldown in the right-click. It is waiting 3 seconds in the right-click "function", and if you right click before the 3 seconds, it will repeat the function without having waited. There is a basic cooldown skript in skript's example projects that works wonderfully.
 

potlaggerino

Feedback score
0
Posts
7
Reactions
0
Resources
0
I'm fairly positive it's because you're doing the cooldown in the right-click. It is waiting 3 seconds in the right-click "function", and if you right click before the 3 seconds, it will repeat the function without having waited. There is a basic cooldown skript in skript's example projects that works wonderfully.
Alright, imma check it out
 

PhaseClan

Tinkerer
Premium
Feedback score
10
Posts
484
Reactions
219
Resources
0
This should work just fine. Don't set the variable to false, just delete it and check if it's set or not.
 

PhaseClan

Tinkerer
Premium
Feedback score
10
Posts
484
Reactions
219
Resources
0
Could u explain to me what u mean by check if its set?
If you delete it, that means it's not reset. Whereas you're checking if it's true or false, which I don't recommend doing. Delete it when it's supposed to be false, and check whether it's set instead of checking if it's true.
 
Status
This thread has been locked.
Top