DeadCheck {
if ($2 == rpgbot) { goto end }
if ($2 == chanbot) { goto end }
if ($rini($2,Stats,Health) <= 0) {
if ($rini($2,Stats,Entered) != yes) { halt }
timerattack $+ $2 off
set %money $rand(30,40)
set %money2 $rand(5,10)
set %exp $rini($2,Stats,Level)
set %Exp $calc(%exp * 4)
set %exp2 $round($calc(%exp2 * 0.10),0)
wini $1 $1 Money $calc($rini($1,Stats,Money) + %Money)
wini $2 $2 Money $calc($rini($2,Stats,Money) + %Money2)
wini $1 $1 exp $calc($rini($1,Stats,exp) + %exp)
wini $2 $2 exp $calc($rini($2,Stats,exp) + %exp2)
wini $1 $1 wins $calc($rini($1,Stats,Wins) + 1)
wini $2 $2 wins $calc($rini($1,Stats,Losses) + 1)
wini $2 $2 Entered no
wini $2 $2 Attacking no
set %batlist $remtok($batlist,$2,1,32)
msg # $1 has defeated $2 $+ ! $1 gains %money yen and %exp exp! $2 gained %money2 yen and %exp2 exp!
:end
}
}
Alright, I'm currently making a Naruto bot, and I got in a little bit of confusion. Basically the problem with this script is that it will say that the person is preparing to attack, but after the timer is over, the script won't msg the channel that the person actually DID the attack. Nor will it decrease hp or increase exp.