#skript of custom blade

1 messages · Page 1 of 1 (latest)

trim wyvern
#

send it in a code block please (wrap it in ```)
what about it doesn’t work? explainpls
also use list vars instead of dot vars (all dots in vars should be replaced with ::)

unkempt echo
#
  if name of player's tool = "&fМеч Альфа Волка":
    if player's level >= 60:
      if player is op:
        set {player's uuid%.sweepAttackGun.cooldown} to 0 seconds
      else:
        set {player's uuid%.sweepAttackGun.cooldown} to 20 seconds
      if difference between now and {player's uuid%.sweepAttackGun.lastUsed} is greater than or equal to {player's uuid%.sweepAttackGun.cooldown}:
        set {player's uuid%.sweepAttackGun.lastUsed} to now
        shoot white particles from location of player to location of player + 5 blocks in direction of player's facing direction
        deal 15 damage to all entities within 1 block of location of player + 5 blocks in direction of player's facing direction
      else:
        send "Вы должны подождать %{difference between now and {player's uuid%.sweepAttackGun.lastUsed}} секунд перед использованием этого предмета снова!" to player
    else:
      send "У вас недостаточно уровня, чтобы использовать этот предмет!" to player
not usable```
trim wyvern
#

what about it doesn't work?
like specifically is it not checking the right item name, not setting the cooldown...?

unkempt echo
#

Idk

#

Not type errors

#

only type true

#

but doesnt work

#

name need a eng lang??

trim wyvern
#

its a bit difficult to understand the issue
wdym by 'type true' and 'type errors'?
dropping it into a parser, i can see there are a few syntax issues that need to be fixed
you have to wrap player's uuid in a % but you are forgetting one percentage sign on the left side of each time the variable is called

unkempt echo
#

oh

#

wait 1 min

#
  if name of player's tool = "&fМеч Альфа Волка":
    if player's level >= 60:
      if player is op:
        set {%player's uuid%.sweepAttackGun.cooldown} to 0 seconds
      else:
        set {%player's uuid%.sweepAttackGun.cooldown} to 20 seconds
      if difference between now and {player's uuid%.sweepAttackGun.lastUsed} is greater than or equal to {%player's uuid%.sweepAttackGun.cooldown}:
        set {%player's uuid%.sweepAttackGun.lastUsed} to now
        shoot white particles from location of player to location of player + 5 blocks in direction of player's facing direction
        deal 15 damage to all entities within 1 block of location of player + 5 blocks in direction of player's facing direction
      else:
        send "Вы должны подождать %{difference between now and {%player's uuid%.sweepAttackGun.lastUsed}} секунд перед использованием этого предмета снова!" to player
    else:
      send "У вас недостаточно уровня, чтобы использовать этот предмет!" to player
not usable```
#

Did I understand correctly?

trim wyvern
#

yes, you did it properly
reload to see if there are any issues (pasted it into a parser and no errors for me)

unkempt echo
#

ok ty)

#

not working

#

-_-

#
  if name of player's tool = "Меч Альфа Волка":
    if player's level >= 60:
      if player is op:
        set {%player's uuid%.sweepAttackGun.cooldown} to 0 seconds
      else:
        set {%player's uuid%.sweepAttackGun.cooldown} to 20 seconds
      if difference between now and {%player's uuid%.sweepAttackGun.lastUsed} is greater than or equal to {%player's uuid%.sweepAttackGun.cooldown}:
        set {%player's uuid%.sweepAttackGun.lastUsed} to now
        shoot white particles from location of player to location of player + 5 blocks in direction of player's facing direction
        deal 15 damage to all entities within 1 block of location of player + 5 blocks in direction of player's facing direction
      else:
        send "Вы должны подождать %{difference between now and {%player's uuid%.sweepAttackGun.lastUsed}} секунд перед использованием этого предмета снова!" to player
    else:
      send "У вас недостаточно уровня, чтобы использовать этот предмет!" to player```
trim wyvern
#

we need some more information
what are the errors? what doesn't work properly? explainpls

unkempt echo
#

I dnt know

#

If i reload sk it type this

trim wyvern
#

that means there are no errors
so what about it doesn't work?

unkempt echo
#

I has 60 lvl and this dnt work

trim wyvern
#

then try to debug it
use broadcast statements to see what conditions aren't passing
make sure your tool is properly named (no coloring allowed since you don't check the unformatted name)

trim wyvern
#

like put a broadcast "test" after checking the player's tool condition and if they are op
this is your job now to figure out the rest of the issues (this is a logic issue, not a syntax issue anymore)

vast lake
#

also, it's recommended to really use list variables. And, you should also put the player as the index. Ie, {cooldown::sweepAttack::%player's UUID%}

trim wyvern
unkempt echo
trim wyvern
#

look at the warning message
you didnt indent it properly (all sections need to be indented)

unkempt echo
#

what i need doing

trim wyvern
#

read the error
you must place it after an if statement
like:

  do stuff
else:
  ...
vast lake
# unkempt echo

Probably the indentation for that if/else pair is messed up, or you have an error for the if statement too. fix that, then it should expect an else

unkempt echo
#
  if player's tool's name contains "fff":
    broadcast "test"
  if player's level >= 60:
    if player is op:
      set {%player's uuid%.sweepAttackGun.cooldown} to 0 seconds
    else:
      set {%player's uuid%.sweepAttackGun.cooldown} to 20 seconds
    if difference between now and {%player's uuid%.sweepAttackGun.lastUsed} is greater than or equal to {%player's uuid%.sweepAttackGun.cooldown}:
      set {%player's uuid%.sweepAttackGun.lastUsed} to now
      shoot white particles from location of player to location of player + 5 blocks in direction of player's facing direction
      deal 15 damage to all entities within 1 block of location of player + 5 blocks in direction of player's facing direction
    else:
      send "Вы должны подождать %{difference between now and {%player's uuid%.sweepAttackGun.lastUsed}} секунд перед использованием этого предмета снова!" to player
  else:
    send "У вас недостаточно уровня, чтобы использовать этот предмет!" to player```
#

not working -_-

vast lake
#

what do you mean by "not working"?

unkempt echo
#

errors not has

vast lake
#

okay, then whats the issue?

unkempt echo
#

custom skill dont useing

vast lake
#

then one of your conditions fails

unkempt echo
#

no one has

trim wyvern
#

can you try debugging it with a broadcast to see where the code is breaking?

unkempt echo
#

bc not typing

#
  if player's tool's name contains "fff":
    broadcast "test"
  if player's level >= 60:
    if player is op:
      set {%player's uuid%.sweepAttackGun.cooldown} to 0 seconds
    else:
      set {%player's uuid%.sweepAttackGun.cooldown} to 20 seconds
    if difference between now and {%player's uuid%.sweepAttackGun.lastUsed} is greater than or equal to {%player's uuid%.sweepAttackGun.cooldown}:
      set {%player's uuid%.sweepAttackGun.lastUsed} to now
      shoot white particles from location of player to location of player + 5 blocks in direction of player's facing direction
      deal 15 damage to all entities within 1 block of location of player + 5 blocks in direction of player's facing direction
    else:
      send "Вы должны подождать %{difference between now and {%player's uuid%.sweepAttackGun.lastUsed}} секунд перед использованием этого предмета снова!" to player
  else:
    send "У вас недостаточно уровня, чтобы использовать этот предмет!" to player```
vast lake
#

Think I can see an issue in difference between now and {%player's uuid%.sweepAttackGun.lastUsed}
now is a time__stamp__, but the variable is a time__span__

#

you should set the variable to now when they use it, then you can check if the time since is less than the cooldown duration

unkempt echo
#

can u retype sk?

vast lake
#

also, looking at the full line,

difference between now and {%player's uuid%.sweepAttackGun.lastUsed} is greater than or equal to {%player's uuid%.sweepAttackGun.cooldown}
Why are you comparing the variable to itself?

unkempt echo
#

I do stupied

vast lake
# unkempt echo can u retype sk?

I'm not gonna do it for you, but here's an example:

  if time since {} < 10 seconds:
    send "You must wait 10s before doing this!" to player

  else:
    set {} to now
    #ability code here```
unkempt echo
trim wyvern
#

x8 provided an example of how to do it, you have to use what he gave you as a template and fix the issue yourself
for starters, {} needs to be the proper variable

unkempt echo
#

yo i checked my skript-reflect plugin and seen cleared folder

#

and skripts are true

#

sry