ID:140397
 
Code: verb
Attack(mob/M as mob in oview(1))
M.attacked = 1
var/damage = usr.str
damage -= M.def
if(damage > 0)
M << "[usr] attacks you and does [damage] damage"
usr << "You attack [M] for [damage] damage"
M.hp-=damage
else
M << "[usr]'s attack bounces off of you!"
usr << "Your attack bounces off of [src]!"
M.Deathcheck()
usr.Levelup()



Problem description:what do i add and were to make a
"Attack"icon State go when i click attack


Don't rip, and more importantly, don't rip hideous code.
you should go to the reference page and look up flick()

http://www.byond.com/docs/ref/

if you have an icon set to an object or mob, flick will temporarily change that icon state. You can learn to use it at the above link.