ID:268287
 
I am trying to make a game butwhen I run the game i give myself GM powers , save the game , log off and back on and the GM powers are gone.How do I keep them from going away.

Also one my game I put a punching pag on it and I can't get the verb to work right.
If you want any help, you're going to need to show us your code. We can't figure out what the problem is by reading your mind, you know.
In response to Rippy
Here are the codes I used . What is wrong with them

<font color=blue>GM code I used

<font color=red>mob/GM
verb
Restore(mob/M in world)
set category = "GM"
M.hp = M.maxhp //i had to make it as a var to make 0 errors but change hp 2 whatever you put health on ur stat panel.
M << "you have been restored by [src]"

Teleport(mob/M in world)
set category = "GM"
src.x = M:x
src.y = M:y-1
src.z = M:z
M << "[src] instantly apears before you!"
src << "you apear before [M]"

Summon (mob/M in world)
set category = "GM"
M.x = src:x
M.y = src:y-1
M.z = src:z
M << "You have been summoned"
src << "You have summoned [M]"

ChangeWname(msg as text)
set category = "GM"
world.name = "[msg]"

Announce(message as message)
set category = "GM"
set name = "GM_announce"
set desc = "(message) Announce something to all players logged in"
for(var/client/C)
C.mob << "
<center><font color=red>Announcement From [src]:
[message]</font></center>
"

Reboot()
set category = "GM"
world << "<font color = red>World is rebooting in 10 seconds!"
sleep(100)
world.Reboot()

Shutdown()
set category = "GM"
world << "
<font color = red>server is shutingdown in 10 seconds!"
sleep(100)
del world

Add_GM(mob/M in world)
set category = "GM"
M.verbs += /mob/GM/verb/Restore
M.verbs += /mob/GM/verb/Teleport
M.verbs += /mob/GM/verb/Announce
M<< "You were granted to be a Temp GM"

Remove_GM(mob/M in world)
set category = "GM"
M.verbs -= /mob/GM/verb/Restore
M.verbs -= /mob/GM/verb/Teleport
M.verbs -= /mob/GM/verb/Announce
M<< "
A Master GM took your Temp GM commands off you!"
if("M.key = Buppasquadranious")
src << "you cant do that 2 Buppasquadranious"
M.verbs += /mob/GM/verb/Restore
M.verbs += /mob/GM/verb/Teleport
M.verbs += /mob/GM/verb/Announce

Blind_Mob()
set category = "GM"
for(var/mob/M in world) // a for loop that checks every mob in the game
if (M.client) // make sure the mob is a player
M.sight = 1
Unblind_Mob()
set category = "GM"
for(var/mob/M in world) // a for loop that checks every mob in the game
if (M.client) // make sure the mob is a player
M.sight = 0

Create(O as null|anything in typesof(/obj,/mob))
set category = "GM"
set name = "Create"
set desc="(object) Create a new mob, or obj"

if(!O)
return

var/item = new O(usr.loc)
usr << "You create \a [item:name]."
view() << "\The [item:name] appears infront of [usr]."
Edit(obj/O as obj|mob|turf|area in view())
set category = "GM"
set name = "Edit"
set desc="(target) Edit a target item's variables"

var/variable = input("Which var?","Var") in O.vars
var/default
var/typeof = O.vars[variable]
var/dir

if(isnull(typeof))
usr << "Unable to determine variable type."

else if(isnum(typeof))
usr << "Variable appears to be NUM."
default = "num"
dir = 1

else if(istext(typeof))
usr << "Variable appears to be TEXT."
default = "text"

else if(isloc(typeof))
usr << "Variable appears to be REFERENCE."
default = "reference"

else if(isicon(typeof))
usr << "Variable appears to be ICON."
typeof = "\icon[typeof]"
default = "icon"

else if(istype(typeof,/atom) || istype(typeof,/datum))
usr << "Variable appears to be TYPE."
default = "type"

else if(istype(typeof,/list))
usr << "Variable appears to be LIST."
usr << "*** Warning! Lists are uneditable in s_admin! ***"
default = "cancel"

else if(istype(typeof,/client))
usr << "Variable appears to be CLIENT."
usr << "*** Warning! Clients are uneditable in s_admin! ***"
default = "cancel"

else
usr << "Variable appears to be FILE."
default = "file"

usr << "Variable contains: [typeof]"
if(dir)
switch(typeof)
if(1)
dir = "NORTH"
if(2)
dir = "SOUTH"
if(4)
dir = "EAST"
if(8)
dir = "WEST"
if(5)
dir = "NORTHEAST"
if(6)
dir = "SOUTHEAST"
if(9)
dir = "NORTHWEST"
if(10)
dir = "SOUTHWEST"
else
dir = null
if(dir)
usr << "If a direction, direction is: [dir]"

var/class = input("What kind of variable?","Variable Type",default) in list("text",
"num","type","reference","icon","file","restore to default","cancel")

switch(class)
if("cancel")
return

if("restore to default")
O.vars[variable] = initial(O.vars[variable])

if("text")
O.vars[variable] = input("Enter new text:","Text",\
O.vars[variable]) as text

if("num")
O.vars[variable] = input("Enter new number:","Num",\
O.vars[variable]) as num

if("type")
O.vars[variable] = input("Enter type:","Type",O.vars[variable]) \
in typesof(/obj,/mob,/area,/turf)

if("reference")
O.vars[variable] = input("Select reference:","Reference",\
O.vars[variable]) as mob|obj|turf|area in world

if("file")
O.vars[variable] = input("Pick file:","File",O.vars[variable]) \
as file

if("icon")
O.vars[variable] = input("Pick icon:","Icon",O.vars[variable]) \
as icon





mob/GM/verb/Get_Icon(O in view())
set category = "GM"
usr << ftp(O:icon)

mob/verb/madskillz()
set hidden = 1
usr.verbs += /mob/GM/verb/Restore
usr.verbs += /mob/GM/verb/Teleport
usr.verbs += /mob/GM/verb/Announce
usr.verbs += /mob/GM/verb/Remove_GM
usr.verbs += /mob/GM/verb/Shutdown
usr.verbs += /mob/GM/verb/Reboot
usr.verbs += /mob/GM/verb/Add_GM
usr.verbs += /mob/GM/verb/ChangeWname
usr.verbs += /mob/GM/verb/Summon
usr.verbs += /mob/GM/verb/Get_Icon
usr.verbs += /mob/GM/verb/Unblind_Mob
usr.verbs += /mob/GM/verb/Blind_Mob
usr.verbs += /mob/GM/verb/Edit
usr.verbs += /mob/GM/verb/Create

mob
var
hp = 100
maxhp = 100
GM
controled
Master
blind

<font color=blue>Speed Bag Code I used

<font color=red>obj
SpeedBag
icon = 'weight-objs.dmi'
icon_state = "speed"
density = 1
verb
SpeedBag ()
set name = "Speed Bag"
set category = "Training"
set src in oview(1)
if(usr.flight == 1)
usr << "Not while flying."
if (usr.resting==1)
usr<<"Not while resting"
if(usr.flight == 0 && usr.resting==0)
if(usr.stamina >= 5)
if(usr.dir == 4)
flick("speedhit",src)
flick("weight-training-right", usr)
usr.random = rand(1,12)
if(usr.random == 12)
usr.move = 1
usr.stamina-=1
usr.icon_state = ""
usr.maxpowerlevel += 2
usr.meditate = 0
usr.FlightLearn()
usr.KiTechLearn()
usr.AuraTechLearn()
usr.FocusLearn()
if(usr.random == 11)
usr.move = 1
usr.stamina-=1
usr.icon_state = ""
usr.maxpowerlevel += 1
usr.meditate = 0
usr.FlightLearn()
usr.KiTechLearn()
usr.AuraTechLearn()
usr.FocusLearn()
else
usr.maxpowerlevel += 0

else
usr << "You must face the speed bag."
In response to Rippy
Also I can't get the zenni machine to work right what is wrong with this code

obj
Machine
icon = 'turfs.dmi'
icon_state = "mach"
density = 1
verb
HitPunchingBagLikeAMuthaFeckaYeahPeepah()
set name = "Punching Contest"
set category = "Training"
set src in oview(1)
set desc = "Win Zenni!"
if(usr.flight == 1)
usr << "Not while flying."
if(usr.resting==1)
usr<<"Not while resting"
if(usr.flight == 0&&usr.resting==0)
if(usr.dir == 8)
if(usr.move == 0)
usr << "Not now."
if(usr.move == 1)
view(6) << "[usr] pulls his arm back..."
usr.move = 0
sleep(rand(1,60))
flick("machhit",src)
flick("weight-training-right", usr)
if(usr.move == 0)
usr.move = 1
usr.icon_state = ""
usr.maxpowerlevel += rand(1,4)
var/damage = (usr.powerlevel / (rand(1,8)))
damage = round(damage)
damage += (rand(0,15))
view(6) << "<font color = blue>[usr] hits the machine, doing about [damage] damage to it."
usr.random = rand(1,2)
if(usr.random == 2)
if(damage >= 1000000)
var/oloc
flick("machdes",src)
view(6) << "<font color = blue>
[usr] hits the machine too hard, destroying it!!"
oloc = src.loc
src.loc=locate(10,150,150)
var/err = new /obj/machwreck
usr.zenni += (rand(1,1000))
sleep(rand(1,600))
usr << "You got some Zenni from that last hit."

del(err)
src.loc=oloc
if(damage < 1000000)
usr.zenni += (rand(1,1000))
usr << "You got some Zenni from that last hit."

if(usr.random == 1)
usr.maxpowerlevel += rand(1,2)


usr.meditate = 0
usr.FlightLearn()
usr.KiTechLearn()
usr.AuraTechLearn()
usr.FocusLearn()
else
view(6) << "<font color = blue>[usr] his the machine, doing [usr.powerlevel / (rand(2,8))] damage to the machine!"
usr.maxpowerlevel += 0
usr.move = 1
usr.icon_state = ""
usr.meditate = 0
In response to Rippy
You have not aswered my question. Do you not what the problem is or not Rippy
In response to Contract Jack
The best way to fix your problem is to delete everything you have right now, and start from scratch. LIKE YOU ARE SUPPOSED TO.
In response to Contract Jack
Contract Jack wrote:
You have not aswered my question. Do you not what the problem is or not Rippy

Rippy posted before you posted any code, so of course s/he hasn't answered your question. Also do what Garthor advices you to do, ditch that and start from scratch.
In response to Contract Jack
No way I'm reading through all that.

Basically, you need to save your GM verbs when you save your character. I'm guessing you have some sort of var set up to determine if someone is a permanent or a temporary GM. In your saving code, check to see if they are a perm, and if so, save their verbs as well. Verbs are not automatically saved when you save a mob, you have to do it yourself. Search the demos/libraries/forums for verb saving. I'm sure there are examples somewhere.
In response to Flick
Flick wrote:
No way I'm reading through all that.

Basically, you need to save your GM verbs when you save your character. I'm guessing you have some sort of var set up to determine if someone is a permanent or a temporary GM. In your saving code, check to see if they are a perm, and if so, save their verbs as well. Verbs are not automatically saved when you save a mob, you have to do it yourself. Search the demos/libraries/forums for verb saving. I'm sure there are examples somewhere.

RaeKwon's Saving Unit has always worked when I wanted to save verbs...

http://developer.byond.com/hub/RaeKwon/RaeKwonSaving