ID:149018
 
How would I make it so you would get certain amount of gold and Exp for these monsters? could you please edit the code, but if not explain how I do it.


mob/monster/slime
icon = 'monsters.dmi'
icon_state = "slime"
health = 25
maxhealth = 25
var/mob/characters/P

New()
.=..()
spawn(10)
Wander(10)

proc/Wander()
while(src)
if (P in oview(5))
step_towards(src,P)
else
step_rand(src)
for(P in view(src))
break
sleep(5)
spawn(40)
Wander()

Bump(mob/M)
if (istype(M,/mob/characters))
NPCAttack(M)
proc/NPCAttack(mob/M)
M.damage(M)

mob/monster
Move(atom/newloc)
if(!newloc) return ..() // Move(null)
if(!loc) return ..() // Move from null
if(newloc.type!=loc.type)
return 0 // don't move to any other kind of turf
return ..()


mob/monster/skull
icon = 'monsters.dmi'
icon_state = "skulls"
health = 50
maxhealth = 50

var/mob/characters/P

New()
.=..()
spawn(20)
Wander(20)

proc/Wander()
while(src)
if (P in oview(5))
step_towards(src,P)
else
step_rand(src)
for(P in view(src))
break
sleep(5)
spawn(20)
Wander()

Bump(mob/M)
if (istype(M,/mob/characters))
NPCAttack(M)
proc/NPCAttack(mob/M)
M.damage(M)
Hmm...check out Nadrew's leveling system/demo (I forget)