mob
var
Caps = 0
verb
Drop_Caps(how_much as num) // ask how much to drop
if(how_much <= usr.Caps && how_much > 0)
var/obj/Caps/C = new(usr.loc)
C.amount = how_much
usr.Caps -= how_much
else
usr << "You cant drop that amount of Caps."
Give_Caps(mob/M as mob in oview(1),how_much as num)
if(how_much <= usr.Caps && how_much > 0)
M.Caps += how_much // give the mob you are giving the gold to, the amount of gold specified.
usr.Caps -= how_much //take away the amount of gold from the user
else
usr << "You cant give that amount of Caps"
obj
Caps
icon = 'Caps.dmi'
var
amount
verb
Get()
set src in oview(1)
usr.Caps += amount
del(src)
mob
Stat()
stat("Level","[src.Level]")
stat("Health","[src.Health]/[src.MaxHealth]")
stat("Experience","[src.Experience]/[src.MaxExperience]")
stat("Caps:",Caps)
Problem description:
the verb "Get" will pick up the caps but it wont add to the Caps in the stats, and there arent any errors.
usr.Caps += amount??
it won't add because the amount is 0 >_>
var
amount = 1