#Sword Enchant

1 messages · Page 1 of 1 (latest)

leaden valley
#

I made this skript for a sword enchant, but the chance system is broken.

on damage: attacker is a player victim is a cow set {_chance} to random integer between 1 and 10 if {_chance} = 3: if lore of attacker's tool contains "&7Vampire I": heal attacker by 1 send "&cYou used Vampire I" to attacker

pallid torrent
#

indent the code after your chance condition

leaden valley
#

so like

on damage: set {_chance} to random integer between 1 and 10 if {_chance} = 3: attacker is a player victim is a cow if lore of attacker's tool contains "&7Vampire I": heal attacker by 1 send "&cYou used Vampire I" to attacker

pallid torrent
#

what

#

you just moved code around

leaden valley
#

sorry I dont understand you

pallid torrent
#

do the chance stuff after the victim condition

leaden valley
#

I am pretty new to skripting

coarse kestrelBOT
pallid torrent
#

might help

leaden valley
#

Ill check it out

pallid torrent
#

but you see how you have 1 extra tab after the if lore line

leaden valley
#

yes

pallid torrent
#

that’s what you have to do for the other one too

leaden valley
#

ohhhh

#

hold up

#

which is the other one?

#

oh nvm I got it