#Cooldown on enderpearl or golden apples

1 messages · Page 1 of 1 (latest)

drowsy barn
#

set the cooldown of ender pearl for player to 2.5 seconds

keen torrent
#

set item cooldown of ender pearl for player to 2.5 seconds

#

set item cooldown of golden apple for player to 10 seconds
set item cooldown of enchanted golden apple for player to 10 seconds

#

@drowsy barn

drowsy barn
#

ty

#

lemme try it

#

nope

keen torrent
drowsy barn
#

set item cooldown of ender pearl for player to 2.5 seconds

#

set item cooldown of ender pearl for player to 2.5 seconds

keen torrent
#

the whole thing

drowsy barn
#

?

keen torrent
#

like thisd

#
on damage:
    if name of attacker's tool is "&4&lStasis":
        if damage cause is not projectile:
            set item cooldown of ender pearl for victim to 10 seconds
            set {binded::%victim's uuid%} to now
on teleport:
    if event-teleport cause is ender pearl:
        if (difference between {binded::%player's uuid%} and now) is less than 10 seconds:
            cancel event
            send action bar "&5You can't teleport at this time!" to player
            play sound "entity.enderman.hurt" with volume 5 to player
#

the whole thing

drowsy barn
#

that is the whole thing

keen torrent
#

no event?

drowsy barn
#

i just want cooldown to some items

keen torrent
#

wdym like

#

after they use it

#

put it on cooldown

drowsy barn
#

throw enderpearl wait 2.5 sec and throw again

keen torrent
#

gimme 2 mins

#

gotta do something

#

then i can help you

keen torrent
#

so you want a

#

on right click:

drowsy barn
#

basicly this

#

but updating and changed

#

and i have never working with cooldowns

keen torrent
#

then in the event you need to check if the player is holding an ender pearl

#

so
if player's tool is an ender pearl:

#

wait

brave quarry
#

i can only think of setting a variable to true and deleting it after 2 seconds and when they throw an enderpearl, check whether the variable is true, and if it is, dont let them throw it, but thats another variable to store, theres probably a better way but if u cant figure it out just do that

#

btw with that action bar thing with the cooldown you can do this

send "%difference between now and {_pearlcooldown}%" to player's action bar```
#

if you want it to count down just send it every 1 second if u want it to count down in intervals of 1 sec

alpine oriole
#

you need an event/command/function

brave quarry
#

ya duh

drowsy barn
#

u guys know diamondfire?

grizzled birch
#

you know this is for Skript help?