#Help with a cooldown for clicking
1 messages Β· Page 1 of 1 (latest)
i got pinged from this location
maybe for a little help................
do I know you??

yeah I have no clue what im doing ngl, im new to this whole skript thing...........
Maybe?
step 1: put the code in code blocks so people can actually read the indentation without discord messing with it
ah ok
Haven't Skripted in like 7 months, I've forgotten everything what in gods name compelled you to ping me for help
π mb mb "I am actively learning to code and enjoy playing digital video games within the vast world wide of web, also Canada π¨π¦"
whenever you want the cooldown, add set {cooldownName::%player's uuid%} to now
hm
C#, I ain't coding skript
then check if difference between {cooldownName::%player's uuid%} and now is less than 10 seconds:
or whatever the time is for it
if the difference is less than X seconds, it's still on cd
if its not, it is now off cooldown and you would be able to use it
hmm
if you want like enderpearl cooldown shit there's item cooldown syntax; just depends on whether or not you're basing this on items or generic stuff
ah, I need mostly just based on whether u click a block
so do the former
problem, now I cant use the composter at all
it just sends must wait 10 seconds
bc you didn't use difference, and you need to set the variable to when it was last used
not 10 seconds
.
set {cooldown::%player%::composter} to now
use player uuids instead of player names
in the event they change their name, data will be lost and unused and unnecessary variables will be added to the variables file
?
%player% is their username, while the uuid is like a serial number, a account-specific id
I have no clue what that means but yeah π
in my case,
send "Hello %player%" to player = Hello x8ight
send "your uuid is: %player's uuid%" to player = your uuid is: 7345734aars-36346....
so when you store a variable as {variable::%player%} it's actually stored as {variable::x8ight}. but If I were to change my username to NoPulp, then any time you tried to access my {variable::%player%} it would instead go to {variable::NoPulp}, and not find the data already contained in {variable::x8ight}.
but since a player's UUID is specific to that Minecraft account, storing stuff in {variable::%player's uuid%} will always allow a player to get their data unless they log on on a completely different account
because %uuids% isnt a thing skript can do. if you think about it, uuid**s** would be all the uuids that exist, one for each minecraft account.
you need to specify a player's uuid, like (event-)player's uuid or loop-player's uuid
hm
so like
add 1 to {mined::%player's uuid%::diamondOre}
send "You have mined a total of %{mined::%player's uuid%::diamondOre}% diamonds!" to player```
if held item of player is leather pants named "&7Dirty Clothes": wait so why dosent skript detect this
because in line 11 it should like see whether u are holding it, but it dosent do anything and gives u the item instead
Do i do a stop at the end?
oh okπ
weirdly skript is telling me to make all of them 8 spaces
not like how I have it above
every time you go right it ahs to be consistent