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 our 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.

Solved Potion effects

Discussion in 'Skript' started by Gavin Hill, Feb 13, 2019.

  1. Gavin Hill

    Gavin Hill Member

    Joined:
    Jan 27, 2019
    Messages:
    5
    Likes Received:
    0
    Hey so i made a skript so when you attack a player it strikes them and uses mana "our custom currency"

    But i was wondering how can i do this with a potion effect?

    Here is the skript


    on damage of a player:
    if attacker is player:
    if tool of attacker is enchanted with smite:
    set {_smite.chance} to a random integer between 1 and 30
    set {Mana.%attacker%} to {Mana.%attacker%} parsed as integer
    if {_smite.chance} is 2 or 5 or 7 or 10:
    if {Mana.%attacker%} >= 25:
    remove 25 from {Mana.%attacker%}
    send "&aYou just used &eLightning Strike&a on your opponent!" to attacker
    strike lightning effect at the victim
    damage victim by 1.0 hearts
    ignite victim
    loop all entities in radius 3 of victim:
    if loop-entity is not player:
    damage loop-entity by 0.5 hearts
    ignite loop-entity
    else if {Mana.%attacker%} < 25:
    set {_mana} to {Mana.%attacker%} parsed as integer
    send "&cYou do not have enough mana to use this special attack! &bCurrent Mana: %{_mana}%" to attacker
    else:
    stop
     
  2. matvapes

    matvapes Member

    Joined:
    May 15, 2018
    Messages:
    11
    Likes Received:
    0
    Do you mean adding potion effects to the victim whenever they get hit?
     
Loading...