ID:166710
 
I need help giving a certain amount of experience for certain mondsters o.o
Um, there are many ways but one of the best places would be to put the experience giving in the death proc. eg:
mob/NPC/var/tmp/expgive=1//default value is 1
mob/NPC
XX
icon='XX.dmi'
expgive=32//when this mob is dead, it gives 32 exp
YY
icon='YY.dmi'
//when this mob is dead, it gives 1 exp

mob/proc/deathproco(mob/Killer)
if(istype(src,/mob/NPC)&&expgive)Killer.exp+=expgive//if it has the expgive value as TRUE, it adds the expgive to the killer's exp


Ofcourse you should avance on that if you want, like taking level into consideration and such

- GhostAnime
mob
var/hp; exp
monster
var
exp_given
Red_Slime
exp_given = 1 //Amount of exp
Father_Slime
exp_given = 5 //Amount of exp
Super_Slime
exp_given = 10//Amount of exp
DeathCheck(mob/attacker)
.=..()
if(. && istype(attacker)) //If I die...
attacker.exp += exp_given // <-- Tada!

mob/proc/DeathCheck(mob/attacker)
if(hp <= 0)
// What happens when they die?
return 1


I think that is pretty straight forward