Need help for my custom item skript

  • 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 comminuty!

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

RedDiamond

Member
Nov 30, 2020
21
0
1
24
I really need help for this one, so I've made a custom items that do stuff with a cooldown, but when I run it on minehut it didn't want to do any of the effects and just skip to the 'else' part anyone know why?
Code:
options:
  prefix: &8[&a&lKrypBox&8]

variables:
  {Cooldown.%player%} = 0

#Fire Wand
on rightclick holding a blaze rod:
  if uncolored name of player's tool is "Fire Wand":
    if {Cooldown.%player%} = 0:
      set {Cooldown.%player%} to 1
      play sound "entity.blaze.shoot" with volume 1 to the player
      make the player shoot a fireball at speed 4
      wait 1.5 seconds
      set {Cooldown.%player%} to 0
    else if {Cooldown.%player%} = 1:
      message "{@prefix} &cYou Can Only Shoot Fireball Every 1.5 Seconds!" to player

#Launcher
on rightclick holding a fishing rod:
  if uncolored name of player's tool is "Launcher":
    if {Cooldown.%player%} = 0:
      set {Cooldown.%player%} to 1
      play sound "entity.slime.jump" with volume 1 to the player
      push the player upwards at speed 1
      push the player forwards at speed 1.5
      wait 3 seconds
      set {Cooldown.%player%} to 0
    else if {Cooldown.%player%} = 1:
      message "{@prefix} &cYou Can Only Launch Every 3 Seconds!" to player

any help will be appreciate
 
a variable containing %player% cannot be defined in variables: section. Try setting it on join: instead, such as:
Code:
on join:
  set {blahclbajsiefjjsrfj_%player%} to 0
 
a variable containing %player% cannot be defined in variables: section. Try setting it on join: instead, such as:
Code:
on join:
  set {blahclbajsiefjjsrfj_%player%} to 0
Thx this really help me, its just weird I try it on my localhost and its work, but not with minehut. anyways thx
 
Status
Not open for further replies.