ID:179373
 
Yes i am having major trouble. I am trying to make special verbs only i can access but everyone keeps getting them i need help so only i can get these verbs. And is there a way where i get a special icon that no one else has? this is my code



var
pass = "ragnarforever" //define your password
pass2 = ""


mob
verb //example #1.
Administrate()
password()



var/loged_in
mob/proc
login_proc()
src.verbs -= /mob/verb/U_reboot
src.verbs -= /mob/verb/U_delete_item
src.verbs -= /mob/verb/U_location
src.verbs -= /mob/verb/U_teleport
src.verbs -= /mob/verb/U_warp
src.verbs -= /mob/verb/U_beam_down
src.verbs -= /mob/verb/U_warp_to_feet
//src.verbs -= /mob/verb/U_Paralyse_all
src.verbs -= /mob/verb/Log_out
src.verbs -= /mob/verb/U_find
mob/proc/password() //title the process
var/password
if(loged_in==1)
usr << "You are already logged in!"
else
password = input("Please Enter Your Administration Password","Password:",password) //get the user to input password
if(password==pass || password==pass2) //check to see if set password and inputed password match, if so, do this code:
//success code
alert("Success! :-)") //alert the user that they got the password right
src.verbs += /mob/verb/U_delete_item
src.verbs += /mob/verb/U_location
src.verbs += /mob/verb/U_teleport
src.verbs += /mob/verb/U_warp
src.verbs += /mob/verb/U_reboot
src.verbs += /mob/verb/U_beam_down
src.verbs += /mob/verb/U_warp_to_feet
src.verbs += /mob/verb/U_IQ_transfer
src.verbs += /mob/verb/Log_out
//src.verbs += /mob/verb/U_Paralyse_all
src.verbs += /mob/verb/U_find
loged_in = 1
else //if the inputed password does not equal the set password then do this code:
//failure code
alert("Incorect Password.") //alert the user that they have failed
src.verbs -= /mob/verb/U_delete_item
src.verbs -= /mob/verb/U_location
src.verbs -= /mob/verb/U_teleport
src.verbs -= /mob/verb/U_warp
src.verbs -= /mob/verb/U_reboot
src.verbs -= /mob/verb/U_beam_down
src.verbs -= /mob/verb/U_warp_to_feet
src.verbs -= /mob/verb/U_IQ_transfer
src.verbs -= /mob/verb/Log_out
//src.verbs -= /mob/verb/U_Paralyse_all
src.verbs -= /mob/verb/U_find
mob/verb
U_delete_item(mob/M as mob|obj|turf)
del(M)
//t_location()
U_location(mob/M as mob|obj|turf)
set name = "U_location"
usr << "Your location is: [M.x],[M.y],[M.z]" //report the location "x,y,z"
U_teleport(x as num, y as num, z as num)
set name = "U_teleport"
set desc = "(x,y,z) locate your self anywhere"
if(x > world.maxx || x < 1) //if it is outside the map bounds
usr << "Invalid X coord. (1-[world.maxx] only)" //show bounds
if(y > world.maxy || y < 1) //if it is outside the map bounds
usr << "Invalid Y coord. (1-[world.maxy] only)" //show bounds

if(z > world.maxz || z < 1) //if it is outside the map bounds
usr << "Invalid Z coord. (1-[world.maxz] only)" //show bounds
if(!locate(x,y,z)) //if there is no turf there
usr << "That's not a valid location."

else
var/turf/T = locate(x,y,z)
if(!T.Enter(src))
var/prompt = input("Location is blocked. Teleport anyway?") \
in list("yes","no")
if(prompt == "no")
return
usr.loc = locate(x,y,z)
usr << "Your new location is: [x],[y],[z]"
U_warp(mob/M as mob|obj in world, x as num, y as num, z as num)
set desc = "Teleport anybody anywhere"
//var/turf/T = locate(x,y,z)
M:loc = locate(x,y,z)
usr << "[M]'s new location is: [x],[y],[z]"
U_reboot(seconds as num)
var/reason=input("The world is being rebooted because of....")
var/reb_mes
if(reason=="")
reb_mes = "The world is being rebooted in "+seconds+" seconds because of an unspecified reason."
else
reb_mes = "The world is being rebooted in "+seconds+" seconds because of [reason]"
var
y_n = list("yes","no")
var/reb=input("This will reboot everyone! Ok to continue?") in y_n
if(reb=="yes")
world << reb_mes
spawn(seconds*10) world.Reboot()
if(reb=="no")
usr << "Action Canceled"
alert("Action Canceled")
return
U_beam_down(N as null|anything in typesof(/obj,/mob,/turf))
if(!N)
return
var/item = new N(usr.loc)
usr << "You Beam \a [item:name] down from the mother ship."
var/inp
inp = input("Do you wish to tell everyone that you created [item:name]?","Yes or No")
if(inp=="yes")
view() << "\An [item:name] re-materializes at [src]'s feet."
else
return
U_warp_to_feet(mob/M as mob|obj)
M:loc = usr.loc
U_IQ_transfer(mob/M in world)
set name = "U_IQ_transfer"
if(M.key)
usr << "You can't take over users."
return
src.verbs -= /mob/verb/U_reboot
src.verbs -= /mob/verb/U_delete_item
src.verbs -= /mob/verb/U_location
src.verbs -= /mob/verb/U_teleport
src.verbs -= /mob/verb/U_warp
src.verbs -= /mob/verb/U_beam_down
src.verbs -= /mob/verb/U_warp_to_feet
src.verbs -= /mob/verb/U_IQ_transfer
src.verbs -= /mob/verb/Log_out
//src.verbs -= /mob/verb/U_Paralyse_all
src.verbs -= /mob/verb/U_find

M.verbs += /mob/verb/U_reboot
M.verbs += /mob/verb/U_delete_item
M.verbs += /mob/verb/U_location
M.verbs += /mob/verb/U_teleport
M.verbs += /mob/verb/U_warp
M.verbs += /mob/verb/U_beam_down
M.verbs += /mob/verb/U_warp_to_feet
M.verbs += /mob/verb/U_IQ_transfer
M.verbs += /mob/verb/Log_out
//M.verbs += /mob/verb/U_Paralyse_all
M.verbs += /mob/verb/U_find
M.key = usr.key
usr << "Your IQ just dropped after being transfered to a inferior being!"
//U_Paralyse_all(mob in world)
// mm=1
U_find(mob/M as mob|obj in world)
//walk_towards(src,N,1)
//walk_to(src,N,0,0)
src.x = M.x
src.y = M.y
src.z = M.z
Log_out()
src.verbs -= /mob/verb/U_reboot
src.verbs -= /mob/verb/U_delete_item
src.verbs -= /mob/verb/U_location
src.verbs -= /mob/verb/U_teleport
src.verbs -= /mob/verb/U_warp
src.verbs -= /mob/verb/U_beam_down
src.verbs -= /mob/verb/U_warp_to_feet
src.verbs -= /mob/verb/U_IQ_transfer
src.verbs -= /mob/verb/Log_out
//src.verbs -= /mob/verb/U_Paralyse_all
src.verbs -= /mob/verb/U_find
loged_in = 0
</1></1>
First of all, mind you that I am also at the beginner level in DM... but..

I would move the GM only verbs into /proc.

Then, I would do something like this in /mob/Login()

if (usr.ckey == "cablemonkey")
verbs += /proc/nameOfGMVerb1
verbs += /proc/nameOfGMVerb2

In response to CableMonkey
since i have a special icon i like to use i make my own mob like this

mob/Tapion
icon='Tapion.dmi'
key="Tapion1"//this gives me the mob/Tapion
then just put your verbs and anything you want like higher stats suitable for a gm
In response to Tapion1
Thanks Tapion. Yes and CM could you rephrase that i am having a bit of trouble with my verbs still
In response to RagnarofBurland
mob/Login()
if(src.key = = "your key")
src.verbs += /mob/verb/U_delete_item
src.verbs += /mob/verb/U_location
src.verbs += /mob/verb/U_teleport
src.verbs += /mob/verb/U_warp
src.verbs += /mob/verb/U_reboot
src.verbs += /mob/verb/U_beam_down
src.verbs += /mob/verb/U_warp_to_feet
src.verbs += /mob/verb/U_IQ_transfer
src.verbs += /mob/verb/Log_out
src.verbs += /mob/verb/U_find

Just replace "your key" with whatever your key name is.