Solved Potion effects

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

Gavin Hill

New Member
Jan 27, 2019
6
0
0
20
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
 
Status
Not open for further replies.