ID:145454
 
Admin Code:
var/reboot=0

mob
Login()
if(usr.key=="Mxjerrett") // Change this to your key
usr.verbs += typesof(/mob/Admin/verb/)

mob
Admin
verb
Boot(mob/M in world)
set category = "Admin"
world << "<center><font color=green>[M] was booted by [src]"
del(M)
Summon(mob/M in world)
set category = "Admin"
M.x = src.x; M.y = src.y; M.z = src.z; if(M.client) M.client.eye = M;
Teleport(mob/M in world)
set category = "Admin"
src.x = M.x; src.y = M.y; src.z = M.z; src.client.eye = src;
Reboot(var/a as num) // This makes a delayed reboot.
set category="Admin"
if(a!=abs(a)||a>1000) return
if(reboot==0) reboot(a)
else reboot=0
Shut_Down()
set category = "Admin"
switch(alert("Are you sure?","Shut Down","Yes","No"))
if("Yes")
world << "<center><b>WORLD IS SHUTTING DOWN IN 5 SECONDS..."
sleep(50)
del(world)

Announce(message as text)
set category = "Admin"
set name = "Announce"
set desc = "What do you wish to announce?"
world << "<center>----------------------------------------------------------------- <br><font color=red><B>[src] the GM announces:</font><br><font color=green><B>[message]</font><br>----------------------------------------------------------------- </center>"


Intangible()
set category = "Admin"
switch(alert("Going Intangible", "Walk Through Walls","Ok","Cancel"))
if("Ok")
density = 0
else if("Cancel")
return

UnIntangible()
set category = "Admin"
switch(alert("Going Solid", "Get Back Density","Ok","Cancel"))
if("Ok")
density = 1
else if("Cancel")
return

Send_To_Jail(mob/M in world)
set category = "Admin"
var/a=input("In How Many Seconds")as null|num
if (!a) return
M <<"[usr.name] sent you to jail for [a] seconds"
if (a) M.lloc = M.loc // saves last spot
M.loc = locate(4,9,1) //cahnge the 1,1,1 to the location of your jail
M.jail = 1
sleep(a*10)
M.loc = M.lloc // places them at the origanal spot
M.jail = 0




mob/var/lloc



proc/reboot(var/a=30)
reboot=1
world<<"<font color=Red><font size=3><b>Game is rebooting in [a] seconds."
for(var/X=1,X<a,X++)
if(reboot==0)
world<<"<font color=Red"><font size=3><b>Game reboot halted."
return
sleep(10)
world<<"<font color=Red><font size=3><b>Game is now rebooting."
world.Reboot()

AFK Code
mob/var //vars needed to work verbs in the game
afk = 0
jail = 0
mob/verb/AFK(mob/M)
set category = "Commands"
if(usr.jail)usr<<"You cannot go AFK in jail sorry"
if(usr.jail)return
if(!usr.afk)
usr.overlays += 'afk.dmi' //overlays means it will go on top of your mob underlays will go behind your mob...
usr.afk = 1
world << "<font color = red><b>[usr] is Afk." //goes to everyone in the game..
M.lloc = M.loc // saves last spot
M.loc = locate(4,9,1) //cahnge the 1,1,1 to the location of your jail
else
usr.afk = 0
usr.overlays -= 'afk.dmi' //afk.dmi means the whole icon
world << "<font color = red><b>[usr] is back."
M.loc = M.lloc // places them at the origanal spot





mob/Move()
if(!src.afk)
return..()



Problem description:

these two codes i posted have a problem everytime i make a verb that somehow does something to your mob it makes it so other people can do it to your mob too how do i fix this.
mob/verb/AFK(mob/M)
set category = "Commands"
if(usr.jail)usr<<"You cannot go AFK in jail sorry"
if(usr.jail)return
if(!usr.afk)
usr.overlays += 'afk.dmi' //overlays means it will go on top of your mob underlays will go behind your mob...
usr.afk = 1
world << "<font color = red><b>[usr] is Afk." //goes to everyone in the game..
M.lloc = M.loc // saves last spot
M.loc = locate(4,9,1) //cahnge the 1,1,1 to the location of your jail
else
usr.afk = 0
usr.overlays -= 'afk.dmi' //afk.dmi means the whole icon
world << "<font color = red><b>[usr] is back."
M.loc = M.lloc // places them at the origanal spot


Your calling M because why? AFk is meant to be for the usr change evrything in this to usr and
mob/verb/AFK(mob/M)
to
mob/verb/AFK()
In response to A.T.H.K
Your calling M because why? AFk is meant to be for the usr change evrything in this to usr and
mob/verb/AFK(mob/M)
to
mob/verb/AFK()


This is what happens when you use someone elses programming... Notice the "//Change this to your key"?

In response to Exophus
Mx, stop copy/pasting tutorials/librarys, please. EVERYTHING is wrong with that library, it seems...
In response to Mysame
Before:
            Intangible()
set category = "Admin"
switch(alert("Going Intangible", "Walk Through Walls","Ok","Cancel"))
if("Ok")
density = 0
else if("Cancel")
return

UnIntangible()
set category = "Admin"
switch(alert("Going Solid", "Get Back Density","Ok","Cancel"))
if("Ok")
density = 1
else if("Cancel")
return

After:
mob/admin/verb/Ignore_Dens()
if(!fly){density=0;usr<<"You begin to fly.";fly++}
else {density=1;usr<<"You land on the ground.";fly--}

mob/var/fly


As you can see, these two verbs that wasted you about 10 lines could be done in a simple 3 line code.
Please don't use demo's but learn from them.
In response to DivineO'peanut
thx i have been trying to fix that