1st Code:
obj
var
sellamount = 0
Pokeball
obj
Pokeball
name = "Pokeball"
icon = 'Npcs.dmi'
icon_state = "Pokeball"
sellamount=100
Pokeball=1
verb
Pick_Up_Pokeball()
set category="Item Commands"
set src in oview(1)
src.Move(usr)
usr << "[usr.name] gets [src.name]."
Drop_Pokeball()
set category="Item Commands"
src.Move(usr.loc)
usr << "[usr.name] drops [src.name]."
Catch_Pokemon(var/mob/M as mob in oview()) //The catch verb.
set category="Poke-Commands"
if(src.Pokeball==1)
if(istype(M,/mob/Pokemon))
usr << "You successfully caught [M]!"
M.loc = usr.contents2
del (src)
else
usr << "You can't catch [M]!"
mob/var
contents2[] = list()
statpanel("Inventory")
stat("List of Items:")
stat("",contents)
stat("Pokemon:")
stat("",contents2)
Problem description: Pokemon get caught, but disappear...
2nd Code:
Save()
var/savefile/Q = new("World/Players/[usr.ckey].sav")
Q["X"] << src.x
Q["Y"] << src.y
Q["Z"] << src.z
Q["Name"] << src.name
Q["Icon"] << src.icon
Q["IconState"] << src.icon_state
Q["dir"] << src.dir
Q["admin"] << src.admin
Q["rank"] << src.rank
Q["gender1"] << src.gender1
Q["trainer"] << src.trainer
Write(Q)
usr << "<b><font color=blue>Game saved!"
mob
proc
Load()
if(fexists("World/Players/[usr.ckey].sav"))
var/savefile/Q = new("World/Players/[usr.ckey].sav")
Read(Q)
Q["X"] >> src.x
Q["Y"] >> src.y
Q["Z"] >> src.z
Q["Name"] >> src.name
Q["Icon"] >> src.icon
Q["IconState"] >> src.icon_state
Q["dir"] >> src.dir
Q["admin"] >> src.admin
Q["rank"] >> src.rank
Q["gender1"] >> src.gender1
Q["trainer"] >> src.trainer
usr.Move(locate(src.x,src.y,src.z))
world << "<b><font color=green>Login:</b> <i>[src] has Logged In.</font>"
else
usr<<"<font color=red><b>Error - No save file. Try clicking New."
Code Problem: Doesn't save the admin verbs. So when I click load, it doesn't load the verbs, and I have to click new everytime after coding myself in.
This one should work for you.
If not I don't know.