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!

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

need help with my skript

Discussion in 'Requests' started by 3dpixelartman, Mar 21, 2022.

  1. 3dpixelartman

    3dpixelartman Member

    Joined:
    Jun 23, 2021
    Messages:
    23
    Likes Received:
    0
    Code (Text):
    1. on right click with stick:
    2.     if {man::%player%} is above 6:
    3.         if name of tool of player is "&c&lWand Of Escape":
    4.             chance of 95%:
    5.                 apply speed 2 to player for 8 seconds
    6.                 apply jump boost 2 to player for 8 seconds
    7.                 apply invisibility 1 to player for 8 seconds
    8.                 apply regeneration 2 to player for 8 seconds
    9.                 send "&aYou got giving the ability to escape"
    10.                 remove 6 from {man::%player%}
    11.             else:
    12.                 apply slowness 10 to player for 3 seconds
    13.         else:
    14.             send "&cYou did not have the mana to do this and the spell backfired"
    15.             apply slowness 10 to player for 3 seconds
    16.      
    17. on right click with stick:
    18.     if {man::%player%} is above 6:
    19.         if name of tool of player is "&a&lWand Of Attack":
    20.             chance of 95%:
    21.                 apply strength 2 to player for 8 seconds
    22.                 apply speed 2 to player for 8 seconds
    23.                 apply resistance 2 to player for 8 seconds
    24.                 send "&aYou got giving the ability to attack"
    25.                 remove 6 from {man::%player%}
    26.             else:
    27.                 apply weakness 5 to player for 8 seconds
    28.                 send "&cYour spell backfired"
    29.         else:
    30.             send "&cYou did not have the mana to do this and the spell backfired"
    31.             apply weakness 5 to player for 8 seconds
    32.          
    33. on right click with stick:
    34.     if name of tool of player is "&d&lWand Of Regen":
    35.         if {man::%player%} is above 6:
    36.             apply regeneration 3 to player for 5 seconds
    37.             remove 6 from {man::%player%}
    38.         else:
    39.             send "&cYou did not have the mana to do this and the spell backfired"
    40.             apply poison 4 to player for 5 seconds
    41.            
    42. on join:
    43.     while player is online:
    44.         if {man::%player%} is 20:
    45.             wait 2 seconds
    46.         else:
    47.             add 1 to {man::%player%}
    48.             wait 2 seconds
    49.            
    50. on right click with milk:
    51.     send "&cThe spell for this is disabled right now"  
    52.        
    53. command /wands:
    54.     permission: skript.wands
    55.     permission message: "&cYou cant do this"
    56.     trigger:
    57.         give player 1 stick named "&d&lWand Of Regen"
    58.         give player 1 stick named "&a&lWand Of Attack"
    59.         give player 1 stick named "&c&lWand Of Escape"
    60.        
    61. on death:
    62.     chance of 4%
    63.     drop nether star named "&1&lWand fragment"
    64.    
    65. on join:
    66.   while player is online:
    67.     set line 7 of player's scoreboard to "&m&7--------------------"
    68.     set line 6 of player's scoreboard to "&cW&6e&el&ac&bo&dm&ce &6t&eo &aM&bi&dn&ci&6d&eu&ap&be"
    69.     set line 5 of player's scoreboard to "&9Members online: &a%{online}%"
    70.     set line 4 of player's scoreboard to "&9Total members: &a%{totaljoins}%"
    71.     set line 3 of player's scoreboard to "&bMana: %{man::%player%}%/20✎"
    72.     set line 2 of player's scoreboard to "&7minidupe.minehut.gg"
    73.     set line 1 of player's scoreboard to "&m&7--------------------"
    74.     wait 1 second
    75.    
    76.    
    77. on join:
    78.     add 1 to {online}
    79. on quit:
    80.     subtract 1 from {online}
    81.     wait 1 second
    82.    
    83. options:
    84.     JoinResetPerm: mini.admin
    85.     JoinResetPermm: You cant do this!
    86.  
    87. on join:
    88.     if {joins::*} does not contain player's uuid:
    89.         add player's uuid to {joins::*}
    90.         broadcast "&b%player%&r joined for the first time. &8[&b##%size of {joins::*}%&8]"
    91.         add 1 to {totaljoins}
    92.  
    93.  
    94. command /resetJoins:
    95.     permission: {@JoinResetPerm}
    96.     permission message: {@JoinResetPermm}
    97.     trigger:
    98.         delete {joins::*}
    99.         send "&cDeleted all unique joins."
    100.        
    101. on load:
    102.     set {online} to 0
    when its right-clicked by any spell it says you don't have the mana for this even when i have the mana and gives all 3 spells disability at once and how do you clear all effects with skript
     
  2. Orangesanta8415

    Supporter

    Joined:
    Nov 21, 2020
    Messages:
    40
    Likes Received:
    0
    It's not working because you haven't yet set the variable {man::%player%}. It can't compare a value to something it doesn't have.

    Try:
    Code (Text):
    1. on join:
    2.     if {man::%player%} is not set:
    3.         set {man::%player%} to 20
     

Share This Page

Loading...