FUNCTION Character_Attack()
Local/str = usr.Strength / 3
Local/mindamage1 = usr.Min_Damage + str
Local/resist = M.Defense + M.ArmorClass
Local/resist2 = resist / 3
Local/mindamage2 = mindamage1 - resist2
Local/maxdamage1 = usr.Max_Damage + str
Local/maxdamage2 = maxdamage1 - resist2
Local/chance = usr.Dexerity + M.Agility
Local/chance2 = rnd((1-chance))
Local/damage = rnd((mindamage2-maxdamage2))
Local/damage2 = rnd((1-5))
if chance2 <= usr.Dexerity
if damage <= 0
damage = 0
endif
sleep(2)
`view() << sound('Hit.wav')
` usr << "red You hit [M] for blue[damage]red points of damage."
`oview(usr) << "red[usr] hit [M] for blue[damage]red points of damage."
M.HP -= damage
print "Damage done ";damage
` M.AGG = 1
` usr.attacking = 0
` usr.Postattacking(M)
` M.DeathCheck()
endif
endfunction
Whats wrong with that coding?
A 1 man team