Discord Thread 0 Errors but dont working as i want, Mushroom that have cooldown in using after use

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.
ok so
code_language.skript:
applescript
on right click with crimson fungus:
    if name of event-item is "&b&lGrzyb Prędkosci &7(PPM)":
      set {_waited} to difference between {name::%uuid of player%::speedmushroom} and now
      set {name::%uuid of player%::speedmushroom} to now
what do you think we have to do next? <@852635850356555836>

Posted by: eult from the skUnity Discord.
 
yes for that we need to use if statment
to check if it has been 600s sense the last use

Posted by: eult from the skUnity Discord.
 
code_language.skript:
c++
on right click with crimson fungus:
    if name of event-item is "&b&lGrzyb Prędkosci &7(PPM)":
      set {_waited} to difference between {name::%uuid of player%::speedmushroom} and now
      set {name::%uuid of player%::speedmushroom} to now
      if {_waited} is less than 600s:
        # put here some effects and set {_waited } it again to now?

Posted by: bartizer from the skUnity Discord.
 
yes almost
well
code_language.skript:
applescript
on right click with crimson fungus:
    if name of event-item is "&b&lGrzyb Prędkosci &7(PPM)":
      set {_waited} to difference between {name::%uuid of player%::speedmushroom} and now
      if {_waited} is less than 600s:
        stop
      else:
        apply swiftness 2 to the player for 3 minutes
        set {name::%uuid of player%::speedmushroom} to now

Posted by: eult from the skUnity Discord.
 
Status
Not open for further replies.