1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Skript place holder?

Discussion in 'Skript' started by Yerakuuun, Jan 28, 2022.

Thread Status:
Not open for further replies.
  1. Yerakuuun

    Yerakuuun Member

    Joined:
    Jan 28, 2022
    Messages:
    2
    Likes Received:
    0
    New to skript forum(Not skript,I have already used it for least a year),I am not getting any helps on discord as all guys trying to help me failed :/
    The code:





    Code (Text):
    1. on right click:
    2.     if name of player's tool is "&a騎士劍":
    3.         if {KnightSwordLVL1::%player%} is not set:
    4.             if {CantUseAbility::%player%} is not set:
    5.                 set {Mana::%player%} to placeholder "%%aureliumskills_mana%%" from the player
    6.                 wait 1 tick
    7.                 if {Mana::%player%} is number between 80 and 100000000:
    8.                     set {KnightSwordLVL1::%player%} to 1
    9.                     send "&a使用了技能'砸擊'!" to player
    10.                     set {DamageUnavalible::%player%} to 1
    11.                     make console execute command "/mana remove %player% 80"
    12.                     wait 1 second
    13.                     clear {DamageUnavalible::%player%}
    14.                     play sound "block.anvil.place" with pitch 0.1 to the player
    15.                     loop all entities in radius 3 around event-player:
    16.                         loop-entity is not a player
    17.                         damage loop-entity by 6 hearts
    18.                     wait 15 second
    19.                     send "&a技能'砸擊'充能完畢。"
    20.                     play sound "block.note_block.bell" with pitch 0.1 to the player
    21.                     wait 1 tick
    22.                     play sound "block.note_block.bell" with pitch 0.6 to the player
    23.                     wait 1 tick
    24.                     play sound "block.note_block.bell" with pitch 1 to the player
    25.                     wait 1 tick
    26.                     play sound "block.note_block.bell" with pitch 1 to the player
    27.                     wait 1 tick
    28.                     play sound "block.note_block.bell" with pitch 2 to the player
    29.                     clear {KnightSwordLVL1::%player%}
    30.                 else:
    31.                     send "&c你的魔力不足以使用技能'砸擊'!" to the player
    32.                     play sound "entity.enderman.teleport" with pitch 0.1 to the player
    33.             else if {CantUseAbility::%player%} is set:
    34.                 send "&c技能'砸擊'被封鎖了!"
    35.                 play sound "entity.enderman.teleport" with pitch 0.1 to the player
    36.         else if {KnightSwordLVL1::%player%} is set:
    37.             send "&c技能'砸擊'正在冷卻中!"
    38.             play sound "entity.enderman.teleport" with pitch 0.1 to the player
    39.  
    40. command /wantoknowmana:
    41.     trigger:
    42.         set {Mana::%player%} to placeholder "%%aureliumskills_mana%%" from the player
    43.         send "%{Mana::%player%}%" to the player


    Yeah, it is a server for Hong Kong/Taiwanese players.
    The problem is , no error was presented by skript system it self,
    But the
    Code (Text):
    1. if {Mana::%player%} is number between 80 and 120:
    one killed me, the command "/wanttoknowmana" is for debugging, I confirmed the var was set.
    But the ability can't be used since the system can't detect the var is between 80 to 100000000.
    It keep telling me mana not enough, maybe owing to the var is a decimal like 110.0 or 21.9.

    Skript placeholder,Ersatz and Skellett-Legacy was present in my server, and the mana system is from Aurelium skills.Skript is the newest version , server is 1.16.5 .
     
    #1 Yerakuuun, Jan 28, 2022
    Last edited: Jan 28, 2022
  2. Tenfont

    Tenfont Member

    Joined:
    Mar 28, 2021
    Messages:
    24
    Likes Received:
    2
    remove number
    Code (Skript):
    1. if {Mana::%player%} is between 80 and 120:
    --- Double Post Merged, Jan 28, 2022, Original Post Date: Jan 28, 2022 ---
    Also use local variables, since you aren't using the global variable anyways
    Code (Skript):
    1. set {_mana} to placeholder "%%aureliumskills_mana%%" from the player
     
  3. Yerakuuun

    Yerakuuun Member

    Joined:
    Jan 28, 2022
    Messages:
    2
    Likes Received:
    0
    'Pretty shame lol, but I am not getting the "{_mana}" 's underline phase function...
    So i should change all {Mana::%player%) to {_mana}?
    --- Double Post Merged, Jan 28, 2022 ---
    Tried to put all {Mana::%player%) to {_mana} and used another phase,it still keep telling me not enough mana.
    Maybe the reason is the variable is a decimal like 110.0 or 21.9,I will edit the first page.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...