Hi!
I'm doing a skript so when you use mage sword a random effect applies to a player you're attacking. This is my code.
For some reason, it doesn't work and it only applies poison. How to fix it?
I'm doing a skript so when you use mage sword a random effect applies to a player you're attacking. This is my code.
Code:
on damage:
if attacker is player:
if victim is player:
if attacker's tool is a wooden sword of sharpness 1 named "&ki &c&l&nMage Sword&r &ki" with lore "&cThis magic sword will", "&cattack your opponents" and "&cusing effects.":
set {_randomf.%attacker%} to a random integer between 1 and 7
if {_randomf.%attacker%} is 1:
apply poison to victim for 10 seconds
if {_randomf.%attacker%} is 2:
apply blindness to victim
if {_randomf.%attacker%} is 3:
apply invisibility to victim for 2 seconds
if {_randomf.%attacker%} is 4:
apply weakness to victim for 3 seconds
if {_randomf.%attacker%} is 5:
apply slowness to victim
if {_randomf.%attacker%} is 6:
apply slow falling to victim
if {_randomf.%attacker%} is 7:
apply nausea to victim