ID:159450
 
1. Im having troubles with the Saving verb, I've Read everything about it in the Guide still nothing

2. How do you customize Verb tabs? i.e.
mob/verb/World_Chat(msg as text)
world << "([usr]) - Says: (( [msg] ))"

I wanna put that in A tab that says "Social"

3. I can't figure out how to deduct the mobs/usr's hp when they get attack, this is what I have. (It doesnt work)

mob/verb/Attack(M as mob in view(1))
view() << "[usr] Attacks [M] for [D]!"
exp += 1

proc/HurtMe(D)
hp = hp - D
if(hp < 0)
view() << "[src] dies!"
del src


Any Help and/or Advice Appreciated. Ty.
1.
mob
proc
Save()
var/savefile/save
save = new ("players/[usr.key]")
save["mob"] << usr
save["x"] << usr.x
save["y"] << usr.y
save["z"] << usr.z
Delete()
if(fexists("players/[usr.key]"))
fdel("players/[usr.key].sav")
Load()
if(fexists("players/[usr.key]"))
var/savefile/load
load = new ("players/[usr.key]")
load["mob"] >> usr
load["x"] >> usr.x
load["y"] >> usr.y
load["z"] >> usr.z

2.
mob/verb/World_Chat(msg as text)
set category = "Social"
world << "([usr]) - Says: (( [msg] ))"


3.
mob/verb/Attack(mob/M in view(1))
var/D = rand(1,50)//replace this with how you want damage to be determined
view() << "[usr] Attacks [M] for [D]!"
M.hp -= D
if(M.hp < 0)
view() << "[M] dies!"
del M // this right here means if you kill M then it gets deleted from the world so don't kill real players
exp += 1