ID:268052
 
                            if(src.name == "Eviltroll")
if(src.hp <= 0)
src.hp = src.hp
usr.gold+=src.gold
usr.killedmonster+=1
usr.kills+=1
usr << "<font color = red>Good job, [usr]."
usr << "<font color = red>Experience + [src.str]"
usr << "<font color = red>Gold + [src.gold]"
src.gold = 0
if(usr.class == "Troll")
if(usr.maxpowerlevel >= 200000)
usr.verbs+=new/mob/tech/verb/Trollattack()
usr << "<B>You killed Eviltroll! You can now attack stronger!"


the problem is when i kill the eviltroll i dont learn the verb any assistance please?
Don't put usr in procs.
In response to Garthor
Garthor wrote:
Don't put usr in procs.

then what?
In response to Vash_616
Then come up with an object-oriented method for enemies.
In response to Garthor
thats stupid to do. it works with everything else and all the enemies just not that one.
In response to Vash_616
Because you made a stupid mistake as a result of having to write redundant code which would be extremely well suited to an object-oriented approach.

Make a new type of mob, call it enemy. So you have mob/enemy. Then, make a mob/enemy/troll, mob/enemy/orc, mob/enemy/DrEvil, whatever. mob/enemy has a proc which checks contents to see what to drop, each of the types of mob/enemy adds things to drop in New().