Skript help (Cooldown)

Status
This thread has been locked.

Syvi

Banned
Feedback score
0
Posts
122
Reactions
42
Resources
0
Hello, I am trying to make a cooldown for my skript.

command /claim:
description: Claim your welcome back gift
permission: minequest.lookup
trigger:
execute command "give %player% diamond 2"
if {cooldown.%player%} isn't set:
set {cooldown.%player%} to true
message "&eYou have claimed your gift!"
wait 30 seconds
clear {cooldown.%player%}
else:
message "&cYou can only use this command once!"

is the skript.
The players can type /claim and the cooldown won't count. What am I doing wrong? It only saends the "You can only use this command once!" message, but they still get the 2x diamonds.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Kayla

Deactivated
Feedback score
2
Posts
63
Reactions
52
Resources
0
Try this? This should give you an idea.

command /claim:
description: Claim your welcome back gift
permission: minequest.lookup
trigger:
if {cooldown.%player%} is true:
stop
cancel event
if {cooldown.%player%} isn't set:
set {cooldown.%player%} to false
if {cooldown.%player%} is false:
set {cooldown.%player%} to true
execute command "give %player% diamond 2"
message "&eYou have claimed your gift!"
wait 30 seconds
set {cooldown.%player%} to false
 

Syvi

Banned
Feedback score
0
Posts
122
Reactions
42
Resources
0
Try this? This should give you an idea.

command /claim:
description: Claim your welcome back gift
permission: minequest.lookup
trigger:
if {cooldown.%player%} is true:
stop
cancel event
if {cooldown.%player%} isn't set:
set {cooldown.%player%} to false
if {cooldown.%player%} is false:
set {cooldown.%player%} to true
execute command "give %player% diamond 2"
message "&eYou have claimed your gift!"
wait 30 seconds
set {cooldown.%player%} to false

I get
21n2hy9.jpg

I don't know if I did something wrong.

command /claim:
description: Claim your welcome back gift
permission: minequest.lookup
trigger:
if {cooldown.%player%} is true:
stop
cancel event
if {cooldown.%player%} isn't set:
set {cooldown.%player%} to false
if {cooldown.%player%} is false:
set {cooldown.%player%} to true
execute command "give %player% diamond 2"
message "&eYou have claimed your gift!"
wait 30 seconds
set {cooldown.%player%} to false


Could you perhaps make it a pastebin, so it's correct spacing? I don't know if that's the reason.
 
Banned forever. Reason: Scamming/Attempting to Scam (https://builtbybit.com/threads/pacific-scam-report.542094/)

Kayla

Deactivated
Feedback score
2
Posts
63
Reactions
52
Resources
0

I get
gYcRD4p.png

I don't know if I did something wrong.

command /claim:
description: Claim your welcome back gift
permission: minequest.lookup
trigger:
if {cooldown.%player%} is true:
stop
cancel event
if {cooldown.%player%} isn't set:
set {cooldown.%player%} to false
if {cooldown.%player%} is false:
set {cooldown.%player%} to true
execute command "give %player% diamond 2"
message "&eYou have claimed your gift!"
wait 30 seconds
set {cooldown.%player%} to false


Could you perhaps make it a pastebin, so it's correct spacing? I don't know if that's the reason.
 

Syvi

Banned
Feedback score
0
Posts
122
Reactions
42
Resources
0


Thank you for the quick reply. I pasted it in and I get 1 error.

"A command event cannot be cancelled (skript.sk, line 18: cancel event')
 
Banned forever. Reason: Scamming/Attempting to Scam (https://builtbybit.com/threads/pacific-scam-report.542094/)

Syvi

Banned
Feedback score
0
Posts
122
Reactions
42
Resources
0
Simply delete "cancel event" :)



Thank you that works.
One last thing. How do I make a message be executed when they type /claim again, when it's on cooldown? So I can say "You have already claimed your gift!"
 
Banned forever. Reason: Scamming/Attempting to Scam (https://builtbybit.com/threads/pacific-scam-report.542094/)

Syvi

Banned
Feedback score
0
Posts
122
Reactions
42
Resources
0
If you still need help let me know :)

Is it possible to make a skript that removes Fortune 3 and Fortune 2 entirely from the enchantment table?
They are too OP for my server, so I'd like to only have Fortune 1 there. :)
 
Banned forever. Reason: Scamming/Attempting to Scam (https://builtbybit.com/threads/pacific-scam-report.542094/)

Ben Glencross

Feedback score
0
Posts
5
Reactions
0
Resources
0
Is it possible to make a skript that removes Fortune 3 and Fortune 2 entirely from the enchantment table?
They are too OP for my server, so I'd like to only have Fortune 1 there. :)

I don't believe that is possible no, you could disable the enchant being gotten though. You would probably need a skript addon to achieve this however, and that's not really my forte.
 

Syvi

Banned
Feedback score
0
Posts
122
Reactions
42
Resources
0
I don't believe that is possible no, you could disable the enchant being gotten though. You would probably need a skript addon to achieve this however, and that's not really my forte.

Ah alright, np
 
Banned forever. Reason: Scamming/Attempting to Scam (https://builtbybit.com/threads/pacific-scam-report.542094/)
Status
This thread has been locked.
Top