ID:264874
 
Code:
mob
verb
Attack(mob/M as mob in oview(1))
var
damage = usr.strength - M.defence
if(damage <= 0)
usr << "[M] absorbs your attack!"
M << "You absorb [usr]'s attack."
else
M.health -= damage
view() << "[usr] attacks [M] for [damage] HP!"
M:deathcheck()

mob
proc
deathcheck()
if(src.health <= 0)
view() << "[src] was killed by [usr]!"
usr.experience += 5
del(src)


Problem description:
ok pretty simple. can someone please tell me how to make the mob attacking have an attack icon. if your up for some extra credit please let me know how to make the mob being attacked have a "being hit" icon.
um, please dont tell me to read any tutorials because this in itself is a tutorial section.
Thank you
Add this string right after the absorb or hit string

M.icon_state = "Hit"
Basically, add the hit state in the icon file, name it attack. And create a backup thing most people have as oicon_state or base_icon_state, and a backup for the icon like, base_icon. If this is not already implemented, tell me so and I'll give you some help on it.
In response to Thelavaking
Have a look at the flick() proc in the reference.
Your deathcheck won't work.
You're calling it wrongly, you've defined it wrongly, and you're abusing :.
Also, your concept of "this section of the forum is a tutorial" is mindblowingly wrong, and I would indeed advice on reading up a bit, like this tutorial, part
"V. Procs, arguments, spawn()s, and returns"
especially.