//Lords of Koroko-Softskydestruction, Friday, March 17, 2006.
mob
icon = 'person.dmi'
var
HP = 30
wealth = 0
Del()
var/mob/obj/gold/G = new(loc)
G.amount = rand(1,100)
..()
Login()
icon_state = gender
..()
Bug
icon = 'bug.dmi'
proc
Deathcheck()
if (HP <= 0)
world << "[src] dies!"
del(src)
verb
attack(mob/M as mob in oview(1))
if (M.HP <= 0)
usr << "[M] is already dead!"
else
usr << "You attack [M]!"
oview() << "[usr] attacks [M]"
var/damage = rand(1,10)
world << "[damage] damage!"
M.HP -= damage
M.Deathcheck()
say(msg as text)
world << "[usr]: [msg]"
obj
gold
icon = 'gold.dmi'
var
amount
verb
get()
set src in view(1)
usr << "You pick up [amount] gold."
usr.wealth += amount
amount -= amount
turf
grass
icon = 'grass.dmi'
world
turf = /turf/grass
Problem description:
I can't get the gold to dissapear after it is taken.
It tryed put a "if" statement in the Gold object, after
amount -= amount
It said:
if (amount = 0)
del(src)
All this does is make the gold goto 0, but it is still there.
Also how would I go about setting differnt HP's for the Bug and the PC? Right now they are both set at 30.
Right now you have
mob/var/hp=30
So it'll be 30 hp on ALL monsters. Now, to change it, change it for all mobs seperately. Thus;
Like that, the bug's HP will be 50.
Alos, after advancing with ZBT's tutorial, read the DM Guide. It might be confusing at first, but it's the best thing there is.