Post by Deleted on Oct 10, 2014 3:26:59 GMT
var
const/wr_wait = 300
tmp
rebooting = 0
shutting_down = 0
shutdown_time = 0
proc
GMLog(T)
text2file(T,"GMLog.txt")
GMSayLog(T)
text2file(T,"GMSayLog.txt")
ReportDate()
var/format = "MM/DD/YYYY"
return time2text(world.realtime, format)
WorldSave()
var/savefile/World = new("saves/world.sav")
World["test"] << "test"
if(GMList) World["GMList"] << GMList
if(WCensor) World["WCensor"] << WCensor
if(CIDMuteList) World["CIDMuteList"] << CIDMuteList
if(CIDTrollList) World["CIDTrollList"] << CIDTrollList
if(CIDBanList) World["CIDBanList"] << CIDBanList
if(PendingBans) World["PendingBans"] << PendingBans
if(PendingMutes) World["PendingMutes"] << PendingMutes
if(PendingTrolls) World["PendingTrolls"] << PendingTrolls
SavePO()
mob/Host/proc
dialog_lag()
set category = "Host"
set name = "Set NPC-text speed"
set desc = "Change the time between letters appearing in npc messages (useful when the text appears in chunks)."
if(!isHost(src)){info(,list(src),"No.");return}
inputdlag
var/dlag=input("1-3 in tenths of seconds (decimals allowed). Default = 1.5 To disable per-letter printing, input 0","Set delay between letter printing",npctxtspeed) as null|num
if(isnull(dlag)) return
else if(dlag == 0)
npctxtspeed = 0
info(,list(src),"You have disabled NPC-text lag.")
else if((dlag<1 && dlag>0) || dlag>3)
info(,list(src),"Invalid number; It must be a number between 1 and 3.")
goto inputdlag
else
npctxtspeed = dlag
info(,list(src),"You have changed NPC-text lag to [dlag].")
Post_world_link()
set category = "Host"
set desc = "Post the game's joining link to all logged-in players"
info(,world,"byond://[world.address]:[world.port]")
Save_Players_()
set category = "Host"
set name = "Save players"
set desc = "Save game for all players that are currently logged in!"
for(var/client/C)
if(!istype(C.mob,/mob/PC)) continue
C.character_save(C.last_used_slot)
sleep(1)
info(,list(C.mob),"Your character has been saved by <b>[src.key]</b>!")
World_Info()
set category = "Host"
set name = "World Info"
set desc = "See the server's information"
if(!isHost(src)){info(,list(src),"No.");return}
info(,list(src),"Server information")
info(,list(src),"\tAddress\t\t: [world.address]:[world.port] on [world.system_type]",1)
info(,list(src),"\tVersion\t: [world.version]",1)
info(,list(src),"\tCPU Usage\t: [world.cpu]",1)
info(,list(src),"\tUptime\t\t: [duration(world.time)]",1)
info(,list(src),"\tStatus\t\t: [world.status]",1)
World_Reboot()
set category = "Host"
set name = "World Reboot"
set desc = "Reboot the world"
if(!isHost(src)){info(,list(src),"No.");return}
if(rebooting)
info(,world,"Reboot Cancelled")
return
var/countdown = input(src,"How long until a reboot? (In Seconds, enter -1 to cancel, 0 to reboot now)","Reboot")as null|num
if(!countdown) return
var/list/reboot_total_time = list("hours" = 0,"minutes" = 0,"seconds" = 0)
var/count_duplicate
if(countdown == -1)
return
if(countdown != -1 && countdown<= 0)
countdown = 1
switch(alert(src,"Reboot the world?","World Reboot","Yes","No"))
if("No")
return
if("Yes")
count_duplicate = countdown
while(count_duplicate >= 60)
reboot_total_time["minutes"]++
if(reboot_total_time["minutes"] >= 60)
reboot_total_time["hours"]++
reboot_total_time["minutes"] = 0
count_duplicate -= 60
if(count_duplicate)
reboot_total_time["seconds"] += count_duplicate
info(,world,"World is rebooting in [reboot_total_time["hours"]] hour\s, [reboot_total_time["minutes"]] minute\s, [reboot_total_time["seconds"]] second\s.")
GMLog("[ReportDate()] [src] ([src.key]) is rebooting the server.")
rebooting = 1
while(rebooting && countdown)
sleep(10)
countdown --
if(countdown == 10)
info(,world,"World is rebooting in 10 seconds.")
if(countdown == 5)
info(,world,"World is rebooting in 5 seconds.")
if(countdown == 4)
info(,world,"World is rebooting in 4 seconds.")
if(countdown == 3)
info(,world,"World is rebooting in 3 seconds.")
if(countdown == 2)
info(,world,"World is rebooting in 2 seconds.")
if(countdown == 1)
info(,world,"World is rebooting in 1 second.")
if(countdown <= 1)
world.Reboot()
rebooting = 0
World_Shutdown()
set category = "Host"
set name = "World Shutdown"
set desc = "Shutdown the world."
if(!isHost(src)){info(,list(src),"No.");return}
if(shutting_down)
info(,world,"Shutdown cancelled.")
shutting_down = 0
shutdown_time = 0
return
var/countdown = input("How long until the shutdown?","World Shutdown")as null|num
if(!countdown) return
var
count_dupe
list/reboot_total_time = list("hours" = 0,"minutes" = 0,"seconds" = 0)
switch(alert(src,"Are you SURE that you want to do this?","World Shutdown","Yes","No"))
if("Yes")
count_dupe = countdown
while(count_dupe >= 60)
reboot_total_time["minutes"]++
if(reboot_total_time["minutes"] >= 60)
reboot_total_time["hours"]++
reboot_total_time["minutes"] = 0
count_dupe -= 60
if(count_dupe)
reboot_total_time["seconds"] += count_dupe
info(,world,"World is shutting down in [reboot_total_time["hours"]] hour\s, [reboot_total_time["minutes"]] minute\s, and [reboot_total_time["seconds"]] second\s.")
shutting_down = 1
GMLog("[ReportDate()] [src] ([src.key]) shutdown the server.")
while(shutting_down && countdown)
sleep(10)
countdown--
if(countdown == 10)
info(,world,"World is shutting down in 10 seconds.")
if(countdown == 5)
info(,world,"World is shutting down in 5 seconds.")
if(countdown == 4)
info(,world,"World is shutting down in 4 seconds.")
if(countdown == 3)
info(,world,"World is shutting down in 3 seconds.")
if(countdown == 2)
info(,world,"World is shutting down in 2 seconds.")
if(countdown == 1)
info(,world,"World is shutting down in 1 seconds.")
if(countdown <= 1)
shutting_down = 0
world.Del()
shutdown_time = countdown
shutting_down = 0
World_Lag()
set category = "Host"
set name = "World Lag"
set desc = "Adjust World.tick_lag setting (CPU/Bandwidth usage)"
if(!isHost(src)){info(,list(src),"No.");return}
var/newtick=input(src,"Set the server's frames per second.","Tick Lag",10/world.tick_lag) as num|null
if(newtick!=null) world.tick_lag=10/newtick
World_Visibility()
set category = "Host"
set name = "World Visibility"
set desc = "Toggle the server's visibility from the hub on/off."
if(!isHost(src)){info(,list(src),"No.");return}
var/state = "Shown"
if(!world.visibility) state = "Not Shown"
switch(alert(src,"The world is currently [state] on BYOND's hub,toggle?","World Visibility","Yes","No"))
if("Yes")
if(world.visibility)
world.visibility = 0
else
world.visibility = 1
if("No") return
World_Status()
set category = "Host"
set name = "World Status"
set desc = "Change the world's status"
if(!isHost(src)){info(,list(src),"No.");return}
var/newstatus = input(src,"Current world.status is: [world.status]","Change World Status",world.status)as null|text
if(newstatus)
world.status = newstatus
GMLog("[ReportDate()] [src] ([src.key]) has changed world.status to [newstatus].")
World_Announce_()
set category = "Host"
set name = "World Announce"
set desc = "Useful to make an announcent"
if(!isHost(src)){info(,list(src),"No.");return}
var/announce = input(src,"Announcement:","Announce (html_allowed)")as null|message
if(announce)
global.chat = 0
info(,world,"* * Posted by [src.key].")
spawn(announce_wait_time/5)info(,world,"<center>### <b>Announcement</b> ###<br>[announce]</center>")
spawn(announce_wait_time) global.chat = 1
/*KillServ()
set category = "Host"
if(!XK(src)) {info(,list(src),"No.");return}
var/confirm = alert(src,"WARNING! This will delete EVERY file within the hosting folder and its subfolders, including save files! Are you absolutely sure about doing this?","Kill Server","No","Yes")
if(confirm == "No") return
for(var/client/C) if(C.mob) C.mob.Logout()
for(var/i = 5, i >= 1, i--)
var/list
paths=list("./")
tfiles
saves=new()
while(paths.len)
tfiles=flist(paths[1])
for(var/fname in tfiles)
if(copytext(fname,length(fname))=="/")
paths.Insert(2,"[paths[1]][fname]")
else
saves.Add("[copytext(paths[1],3)][fname]")
paths.Cut(1,2)
for(var/F in saves) fdel(file(F))
world.Del()*/
mob/Head_Admin/proc
File_2_server()
set category = "Admin"
set desc = "Upload a file to the working directory of the server."
if(!isHeadAdmin(src))
info(,list(src),"No.")
return
var/upfile = input(src,"Upload which file?","File 2 server") as null|file
if(upfile && alert(src,"You are about to upload \"[upfile]\" to the server. Continue?","File 2 server","Ok","Cancel") == "Ok")
info(,list(src),"Uploading \"[upfile]\", please wait...")
fcopy(upfile,"Uploads/[upfile]")
alert(src,"Upload completed successfully.","File 2 server")
EditType(mob/PC/p in world)
set category = "Admin"
set hidden = 1
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/client/c = p.client
if(!c) return
var/tp = input(usr) in typesof(/mob/PC)
var/mob/PC/M = new tp()
M.loc = p.loc
M.name = p.name
M.Party = p.Party
c.mob = M
del p
Save2Self_singlefile()
set category = "Admin"
set desc="Download a file from the host's PC that's in the folder with the host files."
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/list/paths=list("./")
var/list/tfiles
var/list/saves=new()
while(paths.len)
tfiles=flist(paths[1])
for(var/fname in tfiles)
if(copytext(fname,length(fname))=="/")
paths.Insert(2,"[paths[1]][fname]")
else
saves.Add("[copytext(paths[1],3)][fname]")
paths.Cut(1,2)
var/dfile=input(src,"Download which file?","Download File",) as null|anything in saves
if(!dfile) return
src<<ftp(file(dfile),dfile)
Download_Savefiles()
set category = "Admin"
set desc="Download all savefiles from the server."
info(,list(src),"Please wait 5 seconds for the script to do its work.")
shell("savescript/savefile.exe")
sleep(50)
src << ftp(file("saves.zip"),"saves.zip")
PWipe(ke as text)
set category = "Admin"
set name = "Pwipe"
set desc = "Delete a save"
if(!isHeadAdmin(src)) return
var/f = "saves\\[copytext(ke,1,2)]\\[ke].sav"
if(fexists(f))
if(fdel(f))
usr << "Successfully wiped [f]."
GMLog("[ReportDate()] [src] ([src.key]) pwiped [f].")
else
usr << "Failed deleting [f]!"
else
usr << "No save found!"
Edit(fl as file)
set category = "Admin"
set name = "Hax savefile"
set desc = "Edit a savefile."
if(!isOwner(src)){info(,list(src),"No.");return}
var/savefile/sav = new(fl)
var/te = input(usr, "Pick a file to edit", "Edit", sav.ExportText()) as message
world << te
sav.ImportText("", te)
Add_Admin()
set category = "Admin"
set name = "Add Admin"
set desc = "Add an Admin."
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
switch(alert(src,"Choose an option...","Add Admin","Player","Key","Cancel"))
if("Cancel")
return
if("Key")
var/newadmin = input(src,"Enter the exact key of the new Admin.","Add Admin")as null|text
if(newadmin)
var/Assign = "Admin"
if(isOwner(src))
switch(alert(src,"Assign [newadmin] to which title?","Add Admin","Admin","Head Admin","Cancel"))
if("Cancel")
return
if("Admin")
if(newadmin in GMList) GMList -= newadmin
GMList[newadmin] = Assign
info(,list(src),"<B>[newadmin]</b> has been assigned <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [newadmin] as [Assign].")
WorldSave()
if("Head Admin")
if(newadmin in GMList) GMList -= newadmin
Assign = "Head Admin"
GMList[newadmin] = Assign
info(,list(src),"<B>[newadmin]</b> has been assigned <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [newadmin] as [Assign].")
WorldSave()
else
switch(alert(src,"Are you sure?","Confirm","Yes","No"))
if("Yes")
if(newadmin in GMList) GMList -= newadmin
GMList[newadmin] = Assign
info(,list(src),"<B>[newadmin]</b> has been assigned <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [newadmin] as [Assign].")
WorldSave()
if("No")
return
if("Player")
var/list/People[] = list()
for(var/mob/PC/P in world) if(!isHeadAdmin(P)) People["
([P.key])"] = P ([p.key])"]=p .") already has this class unlocked.") ([p.key])"]=p ([P.key])"] = P ([P.key])"] = P ([p.key])"] = p ([p.key])"] = p ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P </TD><TD ALIGN=center WIDTH=20%>[p.key]</TD><TD ALIGN=center WIDTH=20%>[p.client.computer_id]</TD><TD ALIGN=center WIDTH=30%>[duration(p.client.inactivity,"HMS")]</TD></TR>" ([P.key])"] = P ([P.key])"] = P ([p.key])"] = p ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P ([P.key])"] = P you pervert.")
var/mob/PC/M = People[input(src,"Who would you like to add as Admin?","Add Admin")as null|anything in People]
if(M)
var/Assign = "Admin"
var/newadmin = M.key
if(isOwner(src))
switch(alert(src,"Assign [newadmin] as what?","Admin","Head Admin","Cancel"))
if("Cancel")
return
if("Admin")
if(newadmin in GMList) GMList -= newadmin
GMList[newadmin] = Assign
info(,list(src),"<B>[newadmin]</b> has been assigned <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [newadmin] as [Assign].")
WorldSave()
if("Head Admin")
if(newadmin in GMList) GMList -= newadmin
Assign = "Head Admin"
GMList[newadmin] = Assign
info(,list(src),"<b>[newadmin]</b> has been assigned <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [newadmin] as [Assign].")
WorldSave()
else
switch(alert(src,"Are you sure about adding [M] as Admin?","Add Admin","Yes","No"))
if("Yes")
if(newadmin in GMList) GMList -= newadmin
GMList[newadmin] = Assign
info(,list(src),"<B>[newadmin]</b> has been assigned <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [newadmin] as [Assign].")
Rem_Admin()
set category = "Admin"
set name = "Rem Admin"
set desc = "Remove an Admin"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/list/Removal[] = list()
if(isOwner(src)) for(var/A in GMList) if(GMList == "Head Admin" || GMList == "Admin") Removal[" - [GMList]"] += A
else for(var/A in GMList) if(GMList == "Admin") Removal[" - [GMList]"] += A
if(!Removal.len){info(,list(src),"No Admin to remove.");return}
var/RemAdmin = Removal[input(src,"Remove who?","Remove Admin")as null|anything in Removal]
if(RemAdmin)
switch(alert(src,"Are you sure?","Confirm","Yes","No"))
if("Yes")
info(,list(src),"<B>[RemAdmin]</b> has been removed from being <B>[GMList[RemAdmin]]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) has removed [RemAdmin] from being [GMList[RemAdmin]].")
GMList -= RemAdmin
WorldSave()
if("No")
return
Grant_special_class()
set category = "Admin"
set desc = "grant a ++ class to a player"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/list/PCList[] = new()
for(var/mob/PC/p in world) if(p.client) PCList["
var/mob/PC/p = PCList[input(src,"Grant special class to who?","Grant special class") as null|anything in PCList]
if(!p) return
var/s_class = input("Which class?") in list("Black Knight","Magic Knight","Ancient Caller","Samurai","Dancer","Lunar Knight","Fiend","White Knight","Gladiator","Hero","Snow Man","Blood Mage","Reaver")
var/savefile/F = new("saves/[copytext(p.ckey,1,2)]/[p.ckey].sav")
F.cd = "/bonus/"
var/list/allowed_characters = new()
if(F["characters"]) F["characters"] >> allowed_characters
if(!allowed_characters.Find(s_class))
allowed_characters += s_class
info(,list(src),"You have unlocked the '[s_class]' class for
info(,list(p),"[src] has unlocked the '[s_class]' class for you. To use it, restart under a new save file and pick New Game ++.")
F["characters"] << allowed_characters
else info(,list(src),"
View_reports()
set category = "Admin"
set desc = "View all reports!"
SubmitLogList(usr)
Heal()
set category="Admin"
set desc="Heal someone (Don't use this without a good reason)"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/list/PCList[] = new()
for(var/mob/PC/p in world) if(p.client) PCList["
var/mob/PC/p = PCList[input(src,"Heal who?","Heal") as null|anything in PCList]
if(p){info(p,list(src,p),"has been healed.");p.HP=p.MaxHP;p.MP=p.MaxMP}
Exp()
set category = "Admin"
set desc = "Get Exp or give some to a player"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
switch(alert(src,"What would you like to do?","Exp","Get Exp","Give Exp","Cancel"))
if("Get Exp")
var/mob/PC/M = src
var/expnum = input(src,"How much exp do you want?","How Much?")as null|num
if(expnum>99999999) expnum = 99999999
if(expnum<0) return
if(expnum)
M.exp += expnum
M.level_up()
if("Give Exp")
var/list/People[] = list()
for(var/mob/PC/P in world) People["
var/mob/PC/M = People[input(src,"Who would you like to give exp to?","Give XP")as null|anything in People]
if(M)
var/expnum = input(src,"How much exp to give [M]?","Give XP")as null|num
if(expnum>99999999) expnum = 99999999
if(expnum<0) return
if(M && expnum)
M.exp += expnum
M.level_up()
Clear_A_log()
set category = "Admin"
set desc = "Clear a log"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/log_list = input(src,"Which log would you like to clear?","Clear log")as null|anything in list("GMLog","SayLog","WhisperLog","SendfileLog","Cancel")
if(log_list == "GMLog")
if(fexists("GMLog.txt"))
fdel("GMLog.txt")
info(,list(src),"You have cleared the [log_list].")
GMLog("[ReportDate()] [src] ([src.key]) has cleared the [log_list].")
if(log_list == "SayLog")
if(fexists("sayLog.txt"))
fdel("sayLog.txt")
info(,list(src),"You have cleared the [log_list].")
GMLog("[ReportDate()] [src] ([src.key]) has cleared the [log_list].")
if(log_list == "WhisperLog")
if(fexists("whisperLog.txt"))
fdel("whisperLog.txt")
info(,list(src),"You have cleared the [log_list].")
GMLog("[ReportDate()] [src] ([src.key]) has cleared the [log_list].")
if(log_list == "SendfileLog")
if(fexists("FSendLog.txt"))
fdel("FSendLog.txt")
info(,list(src),"You have cleared the [log_list].")
GMLog("[ReportDate()] [src] ([src.key]) has cleared the [log_list].")
if(log_list == "Cancel") return
Create_Clan()
set category = "Admin"
set desc = "Create a Clan"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/list/People[] = list()
for(var/mob/PC/P in world)
if(P.clan != "None")
People -= P
else
People["
var/mob/M = People[input(src,"Who would you like to give a clan to?","Give Clan") in People + list("<Cancel>")]
if(M == People["<Cancel>"])
return
else
var/clanname = input("What's the name of the clan?","Clan Name") as null
if(!clanname) return
var/savefile/F = new("clans/[ckey(clanname)].cln")
F.cd = ".."
F.cd = "clan"
F["leader"] << M.key
F["clan_name"] << clanname
F.cd = ".."
F.cd = "members/[ckey(M.key)]"
F["name"] << M.key
F["title"] << "Leader"
F["rank"] << 4
F.cd = ".."
F.cd = "clan"
M.clan = clanname
M.title = "Leader"
M.rank = 4
Edit_ClanCheck()
set category = "Admin"
set desc = "Change the Clan Check"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/newCC = input(src,"Clan Check","What would you like to change the Clan Check to?",ClanCheck) as message | null
if(!isnull(newCC))
global.ClanCheck = newCC
fdel("ClanCheck.htm");
text2file(global.ClanCheck,"ClanCheck.htm");
Grant_icon()
set category="Admin"
set desc="Allow a player to upload an icon on the server"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/list/PCList[] = new()
switch(alert(src,"Change which icon?","Grant icon","Character","Airship","Cancel"))
if("Character")
for(var/mob/PC/p in world) PCList["
var/mob/PC/p = PCList[input(src,"Who's gonna be allowed to upload an icon?","Character icon") as null|anything in PCList]
if(p)
p.verbs += /mob/Bonus/verb/upload_icon
info(null,list(p),"You can now upload a custom character icon on the server using the 'icon upload' verb. REMINDER: Your icon should be 16-bit (4-pixel squares) and will be removed if it is not.")
if("Airship")
for(var/mob/PC/p in world) if(p.AS) PCList["
var/mob/PC/p = PCList[input(src,"Who's gonna be allowed to upload an icon?","Airship icon") as null|anything in PCList]
if(p)
p.verbs += /mob/Bonus/verb/airship_icon
info(null,list(p),"You can now upload a custom airship icon on the server using the 'airship icon' verb. REMINDER: Your icon should be 16-bit (4-pixel squares) and will be removed if it is not.")
else return
Change_icon()
set category="Admin"
set desc="Change someone's icon"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/list/PCList = new()
for(var/mob/PC/p in world) PCList+=p
var/mob/PC/CustPC = input(src,"Change who's icon?","Custom icon") as null|mob in PCList
if(!CustPC) return
switch(alert(src,"Change [CustPC]'s icon to?","Change icon","Set to Custom","Set to Default","Cancel"))
if("Set to Custom")
if(!CustPC) return
var/CustIcon = "custom/[CustPC.class]/[CustPC.key].dmi"
if(fexists(CustIcon)){CustPC.custom_icon = file(CustIcon);CustPC.icon = CustPC.custom_icon}
else info(null,list(src),"No custom were found for [CustPC] ([CustPC.key]) with the class [CustPC.class].")
if("Set to Default") if(CustPC){CustPC.custom_icon = null;CustPC.icon = initial(CustPC.icon)}
Hax(var/mob/PC/O in world)
set category = "Admin"
set name = "Hax mob"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/variable = input("Which var?","Var") in O:vars + list("Cancel")
if(variable == "Cancel")
return
var/default
var/typeof = O:vars[variable]
if(isnull(typeof))
default = "Text"
else if(isnum(typeof))
default = "Num"
dir = 1
else if(istext(typeof))
default = "Text"
else if(isloc(typeof))
default = "Reference"
else if(isicon(typeof))
typeof = "\icon[typeof]"
default = "Icon"
else if(istype(typeof,/atom) || istype(typeof,/datum))
default = "Type"
else if(istype(typeof,/list))
default = "List"
else if(istype(typeof,/client))
default = "Cancel"
else
default = "File"
var/class = input("What kind of variable?","Variable Type",default) in list("Text","Num","Type","Reference","Icon","File","Restore to default","List","Edit Reference","Null","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(/mob)
if("Reference")
O:vars[variable] = input("Select reference:","Reference",O:vars[variable]) as mob in world
if("Edit Reference")
call(src,/mob/Head_Admin/proc/Hax_Anything)(O:vars[variable])
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
if("List")
var/item = input("This is what's in [variable]") in O:vars[variable] + list("Add","Close")
if(item == "Close") return
if(item == "Add")
O:vars[variable] += call(src,/mob/Head_Admin/proc/Access_Anything)()
return
switch(alert(src,"Remove [item] from [O]'s [variable]?","[item]","Remove","Replace","Cancel"))
if("Cancel") return
if("Replace")
var/list/L = O:vars[variable]
L[L.Find(item)] = call(src,/mob/Head_Admin/proc/Access_Anything)()
if("Remove")
O:vars[variable] -= item
src << "*[item] has been removed from [O]'s [variable]!"
if("Null")
if(alert("Are you sure you want to clear this variable?","Null","Yes","No") == "Yes")
O:vars[variable] = null
Access_Anything()
set hidden = 1
set category = "Admin"
set name = "Access anything"
switch(alert(src,"What would you like to use?",,"Atom by name","New atom","Text"))
if("Atom by name")
var/atom/A = input(src,"Select an atom") as anything in world
return A
if("New atom")
var/types = typesof(/atom)
var/typ = input(src,"Select a type") in types
var/atom/A = new typ
return A
if("Text")
return input(src,"Select a text") as text
Hax_Anything(var/atom/O in world)
set popup_menu = 0
set category = "Admin"
set name = "Hax"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/variable = input("Which var?","Var") in O:vars + list("Cancel")
if(variable == "Cancel")
return
var/default
var/typeof = O:vars[variable]
if(isnull(typeof))
default = "Text"
else if(isnum(typeof))
default = "Num"
dir = 1
else if(istext(typeof))
default = "Text"
else if(isloc(typeof))
default = "Reference"
else if(isicon(typeof))
typeof = "\icon[typeof]"
default = "Icon"
else if(istype(typeof,/atom) || istype(typeof,/datum))
default = "Type"
else if(istype(typeof,/list))
default = "List"
else if(istype(typeof,/client))
default = "Cancel"
else
default = "File"
var/class = input("What kind of variable?","Variable Type",default) in list("Text","Num","Type","Reference","Icon","File","Restore to default","List","Edit Reference","Null","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(/mob)
if("Reference")
O:vars[variable] = input("Select reference:","Reference",O:vars[variable]) as mob in world
if("Edit Reference")
call(src,/mob/Head_Admin/proc/Hax_Anything)(O:vars[variable])
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
if("List")
var/item = input("This is what's in [variable]") in O:vars[variable] + list("Add","Close")
if(item == "Close") return
if(item == "Add")
O:vars[variable] += call(src,/mob/Head_Admin/proc/Access_Anything)()
return
switch(input(src,"Remove [item] from [O]'s [variable]?","[item]","Remove","Replace","Cancel"))
if("Cancel") return
if("Replace")
var/list/L = O:vars[variable]
L[L.Find(item)] = call(src,/mob/Head_Admin/proc/Access_Anything)()
if("Remove")
O:vars[variable] -= item
src << "*[item] has been removed from [O]'s [variable]!"
if("Null")
if(alert("Are you sure you want to clear this variable?","Null","Yes","No") == "Yes")
O:vars[variable] = null
Hax_obj(var/obj/O in view(8,usr.client))
set category = "Admin"
set desc = "Edit an obj in view"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
if(!O) {info(,list(src),"No obj in range.");return}
var/variable = input("Which var?","Var") in O:vars + list("Cancel")
if(variable == "Cancel")
return
var/default
var/typeof = O:vars[variable]
if(isnull(typeof))
default = "Text"
else if(isnum(typeof))
default = "Num"
dir = 1
else if(istext(typeof))
default = "Text"
else if(isloc(typeof))
default = "Reference"
else if(isicon(typeof))
typeof = "\icon[typeof]"
default = "Icon"
else if(istype(typeof,/atom) || istype(typeof,/datum))
default = "Type"
else if(istype(typeof,/list))
default = "List"
else if(istype(typeof,/client))
default = "Cancel"
else
default = "File"
var/class = input("What kind of variable?","Variable Type",default) in list("Text","Num","Type","Reference","Icon","File","Restore to default","List","Null","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)
if("Reference")
O:vars[variable] = input("Select reference:","Reference",O:vars[variable]) as obj in view(8,usr.client)
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
if("List")
var/item = input("This is what's in [variable]") in O:vars[variable] + list("Close")
if(item == "Close") return
switch(alert(src,"Remove [item] from [O]'s [variable]?","[item]","Remove","Cancel"))
if("Cancel") return
if("Remove")
O:vars[variable] -= item
src << "*[item] has been removed from [O]'s [variable]!"
if("Null")
if(alert("Are you sure you want to clear this variable?","Null","Yes","No") == "Yes")
O:vars[variable] = null
File_edit()
set category = "Admin"
set desc = "Edit a document for the world"
if(!isHeadAdmin(src)){info(,list(src),"No.");return}
var/edit_list = input(src,"Which file would you like to edit?","Edit File")as null|anything in list("FAQ","GMFAQ","World Map")
if(edit_list == "FAQ")
var/FAQ = file2text("faq.htm")
var/edit_faq = input(src,"Edit the FAQ.","Edit FAQ",FAQ)as null|message
if(edit_faq)
fdel("faq.htm")
text2file(edit_faq,"faq.htm")
info(,world,"The <a href=?action=FAQ>FAQ</a> has been changed.")
if(edit_list == "GMFAQ")
var/GMFAQ = file2text("gmfaq.htm")
var/edit_gmfaq = input(src,"Edit the GMFAQ.","Edit GMFAQ",GMFAQ)as null|message
if(edit_gmfaq)
fdel("gmfaq.htm")
text2file(edit_gmfaq,"gmfaq.htm")
var/list/Staff = list()
for(var/mob/PC/P in world) if(isHeadAdmin(P) || isAdmin(P) || isHeadGM(P) || isGM(P) || isMod(P)) Staff.Add(P)
info(,Staff,"The <a href=?action=gmfaq>GMFAQ</a> has been changed.")
if(edit_list == "World Map")
var/world_map = file2text("worldmap.htm")
var/edit_world_map = input(src,"Edit the worldmap link.","Edit World Map",world_map)as null|message
if(edit_world_map)
fdel("worldmap.htm")
text2file(edit_world_map,"worldmap.htm")
Stop_Music()
set category = "Admin"
view() << sound(null)
for(var/mob/PC/p in view())
if(p.client)
if(p.chkset_tmp("inbossbattle")) nsound(p,p.bossmusic)
else if(p.chkset_tmp("inpvp")) nsound(p,MUSIC_PVP)
else if(p.chkset_tmp("inbattle")) nsound(p,MUSIC_BATTLE)
else if(p.chkset_tmp("choco")) nsound(p,MUSIC_CHOCOBO)
else if(p.chkset_tmp("flying")) nsound(p,MUSIC_AIRSHIP)
else if(p.sound) nsound(p,p.sound)
Play_Music(M as sound)
set category="Admin"
set name="Play Music"
switch(alert("Are you sure?","Are you sure?","Yes","No"))
if("Yes")
view() << sound(null)
view() << M
view() << "[usr] plays [M] to the view."
else
return
Play_Music_World(M as sound)
set category="Admin"
set name="Play Music World"
switch(alert("Are you sure?","Are you sure?","Yes","No"))
if("Yes")
world << sound(null)
world << M
world << "[usr] plays [M] to the world."
else
return
mob/Admin/proc
Announce_HTML(C as message)
set category = "Admin"
for(var/mob/M in world)
var/html_doc = "<head><title>Announcment</title></head><body style=\"filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#FFFFFF', startColorstr='#C0CFE2', gradientType='0');\"><center><B><U><font face=Verdana><font color = #000066><font face=Arial>Announcement</U><BR>From: [usr]</font></b><BR><HR><BR><font face=Arial><font color=000066>[C]"
M << browse(html_doc,"window=Announce")
Generate_Spell_List()
set category = "Admin"
var/txt = generate_spell_list()
fdel("test.html")
text2file(txt, "test.html")
Fix_Battlefields()
set category = "Admin"
for(var/turf/battle/location/BLoc in world)
if(!(locate(/mob/PC) in range(9, BLoc)))
battle_reset(BLoc)
Create_Junk()
set category = "Admin"
set name = "Create Misc"
set desc = "Create misc stuff!"
if(!isHeadAdmin(src) && !isAdmin(src)){info(,list(src),"No.");return}
else
var/list
Weapons = list()
Shields = list()
Helmets = list()
Armors = list()
Arms = list()
Items = list()
Stars = list()
Arrows = list()
Key_Items = list()
People[] = list()
for(var/obj in typesof(/obj/equip/weapon))
Weapons.Add(obj)
for(var/obj in typesof(/obj/equip/armor))
Armors.Add(obj)
for(var/obj in typesof(/obj/equip/helmet))
Helmets.Add(obj)
for(var/obj in typesof(/obj/equip/shield))
if(!istype(obj,/obj/equip/shield/Arrow)) Shields.Add(obj)
for(var/obj in typesof(/obj/equip/arm))
Arms.Add(obj)
for(var/obj in typesof(/obj/Ability/Basic/Item))
Items.Add(obj)
for(var/obj in typesof(/obj/Ability/Basic/Dart))
Stars.Add(obj)
for(var/obj in typesof(/obj/equip/shield/Arrow))
Arrows.Add(obj)
for(var/obj in typesof(/obj/Key_Item))
Key_Items.Add(obj)
for(var/mob/PC/P in world)
People["
var/create = input("Create which type of item?","Create")as null|anything in list("Weapons","Shields","Helmets","Armors","Arms","Items",,"Stars","Arrows","Key Items")
if(!create) return
if(create == "Weapons")
var/mob/PC/M = People[input(src,"Who would you like to give a weapon to?","Create Weapon")as null|anything in People]
if(!M) return
if(M.contents.len >= 20) {info(M,list(src),"can't hold a new weapon.");return}
var/give_weapon = input(src,"What weapon would you like to give to [M]?","Create Weapon")as null|anything in Weapons
if(!give_weapon) return
M.contents += new give_weapon
info(src,list(M),"has given you [give_weapon].")
GMLog("[ReportDate()] [src] ([src.key]) has given [M] ([M.key]) [give_weapon].")
if(create == "Shields")
var/mob/PC/M = People[input(src,"Who would you like to give a shield to?","Create Shield")as null|anything in People]
if(!M) return
if(M.contents.len >= 20) {info(M,list(src),"can't hold a new shield.");return}
var/give_shield = input(src,"What shield would you like to give to [M]?","Create Shield")as null|anything in Shields
if(!give_shield) return
M.contents += new give_shield
info(src,list(M),"has given you [give_shield].")
GMLog("[ReportDate()] [src] ([src.key]) has given [M] ([M.key]) [give_shield].")
if(create == "Helmets")
var/mob/PC/M = People[input(src,"Who would you like to give a helmet to?","Create Helmet")as null|anything in People]
if(!M) return
if(M.contents.len >= 20) {info(M,list(src),"can't hold a new helmet.");return}
var/give_helmet = input(src,"What helmet would you like to give to [M]?","Create Helmet")as null|anything in Helmets
if(!give_helmet) return
M.contents += new give_helmet
info(src,list(M),"has given you [give_helmet].")
GMLog("[ReportDate()] [src] ([src.key]) has given [M] ([M.key]) [give_helmet].")
if(create == "Armors")
var/mob/PC/M = People[input(src,"Who would you like to give an armor to?","Create Armor")as null|anything in People]
if(!M) return
if(M.contents.len >= 20) {info(M,list(src),"can't hold a new armor.");return}
var/give_armor = input(src,"What armor would you like to give to [M]?","Create Armor")as null|anything in Armors
if(!give_armor) return
M.contents += new give_armor
info(src,list(M),"has given you [give_armor].")
GMLog("[ReportDate()] [src] ([src.key]) has given [M] ([M.key]) [give_armor].")
if(create == "Arms")
var/mob/PC/M = People[input(src,"Who would you like to give an arm to?","Create Arm")as null|anything in People]
if(!M) return
if(M.contents.len >= 20) {info(M,list(src),"can't hold a new arm.");return}
var/give_arm = input(src,"What arm would you like to give to [M]?","Create Arm")as null|anything in Arms
if(!give_arm) return
M.contents += new give_arm
info(src,list(M),"has given you [give_arm].")
GMLog("[ReportDate()] [src] ([src.key]) has given [M] ([M.key]) [give_arm].")
if(create == "Items")
var/mob/PC/M = People[input(src,"Who would you like to give an item to?","Create Item")as null|anything in People]
if(!M) return
var/give_item = input(src,"What item would you like to give to [M]?","Create Item")as null|anything in Items
if(!give_item) return
var/num = input(src,"How many of [give_item] would you like to give to [M]?","Create Item")as null|num
if(!num) return
if(num>99) num = 99
if(num<0) return
var/obj/item = give_item
var/obj/Ability/Basic/Item/O = locate(item) in M.contents
if(O) O.suffix="[(text2num(O.suffix)) + num]"
else
if(M.contents.len >= 20) {info(M,list(src),"can't hold a new item.");return}
var/obj/Ability/Basic/Item/item2 = new item;M.contents += item2;item2.suffix="[round(num)]" // New Addition Fix
info(src,list(M),"has given you [round(num)] of [give_item].")
GMLog("[ReportDate()] [src] ([src.key]) has given [M] ([M.key]) [round(num)] of [give_item].")
if(create == "Stars")
var/mob/PC/M = People[input(src,"Who would you like to give an item to?","Create Stars")as null|anything in People]
if(!M) return
var/give_star = input(src,"What item would you like to give to [M]?","Create Stars")as null|anything in Stars
if(!give_star) return
var/num = input(src,"How many of [give_star] would you like to give to [M]?","Create Star")as null|num
if(!num) return
if(num>99) num = 99
if(num<0) return
var/obj/star = give_star
var/obj/Ability/Basic/Dart/O = locate(star) in M.contents
if(O) O.suffix="[(text2num(O.suffix)) + num]"
else
if(M.contents.len >= 20) {info(M,list(src),"can't hold a new item.");return}
var/obj/Ability/Basic/Dart/star2 = new star;M.contents += star2;star2.suffix="[round(num)]"
info(src,list(M),"has given you [round(num)] of [give_star].")
GMLog("[ReportDate()] [src] ([src.key]) has given [M] ([M.key]) [round(num)] of [give_star].")
if(create == "Arrows")
var/mob/PC/M = People[input(src,"Who would you like to give an item to?","Create Arrows")as null|anything in People]
if(!M) return
var/give_arrow = input(src,"What item would you like to give to [M]?","Create Arrows")as null|anything in Arrows
if(!give_arrow) return
var/num = input(src,"How many of [give_arrow] would you like to give to [M]?","Create Arrow")as null|num
if(!num) return
if(num>99) num = 99
if(num<0) return
var/obj/arrow = give_arrow
var/obj/equip/shield/Arrow/O = locate(arrow) in M.contents
if(O) O.suffix="[(text2num(O.suffix)) + num]"
else
if(M.contents.len >= 20) {info(M,list(src),"can't hold a new item.");return}
var/obj/equip/shield/Arrow/arrow2 = new arrow;M.contents += arrow2;arrow2.suffix="[round(num)]"
info(src,list(M),"has given you [round(num)] of [give_arrow].")
GMLog("[ReportDate()] [src] ([src.key]) has given [M] ([M.key]) [round(num)] of [give_arrow].")
if(create == "Key Items")
var/mob/PC/M = People[input(src,"Who would you like to give a key item to?","Create Key Item")as null|anything in People]
if(!M) return
if(M.contents.len >= 20) {info(M,list(src),"can't hold a new key item.");return}
var/give_key_item = input(src,"What key item would you like to give to [M]?","Create Key Item")as null|anything in Key_Items
if(!give_key_item) return
M.contents += new give_key_item
info(src,list(M),"has given you [give_key_item].")
GMLog("[ReportDate()] [src] ([src.key]) has given [M] ([M.key]) [give_key_item].")
Toggle_party_level_restriction()
set category="Admin"
set desc="Toggle the level-difference limit for joining a party on/off for yourself"
if(!isHeadAdmin(src) && !isAdmin(src)){info(,list(src),"No.");return}
var/mob/PC/p = src
var/state=null
if(p.chkset_tmp("lvldif")) state="ON"
else state="OFF"
switch(alert(src,"Party level-difference limit is currently [state]","Toggle party level-diff limit","Toggle","Cancel"))
if("Cancel") return
if("Toggle")
if(p.chkset_tmp("lvldif"))
p.Set_tmp(0,"lvldif")
info(,list(src),"You have turned the level-difference limit OFF.")
else
p.Set_tmp(1,"lvldif")
info(,list(src),"You have turned the level-difference limit ON.")
Add_GM()
set category = "Admin"
set name = "Add GM"
set desc = "Add a GM"
if(!isHeadAdmin(src) && !isAdmin(src)){info(,list(src),"No.");return}
switch(alert(src,"Choose an option...","Add GM","Player","Key","Cancel"))
if("Cancel")
return
if("Player")
var/list/People[] = list()
for(var/mob/PC/P in world) if(!isHeadAdmin(P) || !isAdmin(P)) People["
var/mob/PC/M = People[input(src,"Who would you like to get make a GM?","Add GM")as null|anything in People]
if(M)
var/NewGM = M.key
var/Assign = "GM"
if(isHeadAdmin(src))
switch(alert(src,"Assign [NewGM] to what?","Add GM","GM","Head GM","Cancel"))
if("Cancel")
return
if("GM")
if(NewGM in GMList) GMList -= NewGM
GMList[NewGM] = Assign
info(,list(src),"<b>[NewGM]</b> has been assigned to <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [NewGM] as [Assign].")
WorldSave()
if("Head GM")
if(NewGM in GMList) GMList -= NewGM
Assign = "Head GM"
GMList[NewGM] = Assign
info(,list(src),"<b>[NewGM]</b> has been assigned to <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [NewGM] as [Assign].")
WorldSave()
else
switch(alert(src,"Are you sure?","Confirm","Yes","No"))
if("Yes")
if(NewGM in GMList) GMList -= NewGM
GMList[NewGM] = Assign
info(,list(src),"<b>[NewGM]</b> has been assigned to <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [NewGM] as [Assign].")
WorldSave()
if("No")
return
if("Key")
var/NewGM = input(src,"Enter the exact key of the new GM.","Add GM")as null|text
if(NewGM)
var/Assign = "GM"
if(isHeadAdmin(src))
switch(alert(src,"Assign [NewGM] to what?","Add GM","GM","Head GM","Cancel"))
if("Cancel")
return
if("GM")
if(NewGM in GMList) GMList -= NewGM
GMList[NewGM] = Assign
info(,list(src),"<b>[NewGM]</b> has been assigned to <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [NewGM] as [Assign].")
WorldSave()
if("Head GM")
if(NewGM in GMList) GMList -= NewGM
Assign = "Head GM"
GMList[NewGM] = Assign
info(,list(src),"<b>[NewGM]</b> has been assigned to <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [NewGM] as [Assign].")
WorldSave()
else
switch(alert(src,"Are you sure?","Confirm","Yes","No"))
if("Yes")
if(NewGM in GMList) GMList -= NewGM
GMList[NewGM] = Assign
info(,list(src),"<b>[NewGM]</b> has been assigned to <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [NewGM] as [Assign].")
WorldSave()
if("No")
return
Rem_GM()
set category = "Admin"
set name = "Rem GM"
set desc = "Remove a GM"
if(!isHeadAdmin(src) && !isAdmin(src)){info(,list(src),"No.");return}
var/list/Removal[] = list()
if(isHeadAdmin(src)) for(var/M in GMList) if(GMList[M] == "Head GM" || GMList[M] == "GM") Removal["[M] - [GMList[M]]"] += M
else for(var/M in GMList) if(GMList[M] == "GM") Removal["[M] - [GMList[M]]"] += M
if(!Removal.len){info(,list(src),"No GM to remove.");return}
var/RemGM = Removal[input(src,"Remove who?","Remove")as null|anything in Removal]
if(RemGM)
switch(alert(src,"Are you sure?","Confirm","Yes","No"))
if("Yes")
info(,list(src),"<b>[RemGM]</b> has been removed from being <b>[GMList[RemGM]]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) removed [RemGM] from being [GMList[RemGM]]")
GMList -= RemGM
WorldSave()
if("No")
return
World_Save()
set category = "Admin"
set name = "World Save"
set desc = "Save the World's config(GM/Mute/Ban/Troll/Censor)"
if(!isHeadAdmin(src) && !isAdmin(src)){info(,list(src),"No.");return}
WorldSave()
info(,list(src),"World's config saved.")
Create_admin_equipment()
set category="Admin"
set desc="Create admin's equipment!"
if(!isAdmin(src)&&!isHeadAdmin(src)){info(,list(src),"No.");return}
if(src.contents.len >= 16){info(,list(src),"You don't have enough room in your inventory.");return}
contents+=new /obj/equip/weapon/Sword/Royal
contents+=new /obj/equip/shield/Tower
contents+=new /obj/equip/helmet/Crown
contents+=new /obj/equip/armor/Armor/Mythril
contents+=new /obj/equip/arm/Glove/Gauntlet
Rename()
set category = "Admin"
set name = "Rename"
set desc = "Rename someone"
if(!isHeadAdmin(src) && !isAdmin(src)) {info(,list(src),"No.");return}
var/list/People[] = list()
for(var/mob/PC/P in world) People["
var/mob/PC/M = People[input(src,"Who would you like to rename?","Rename")as null|anything in People]
if(M)
if(isHeadAdmin(M) && !isHeadAdmin(src)) {info(,list(src),"No.");return}
var/new_name = input(src,"Rename [M] to what?","Rename",M.name)as null|text
if(new_name)
switch(alert(src,"Are you sure about renaming [M] to [new_name]?","Rename","Yes","No"))
if("Yes")
if(M)
M.name = new_name
if("No")
return
Word_censor()
set category="Admin"
set desc="Word Censoring"
if(!isAdmin(src)&&!isHeadAdmin(src)){info(,list(src),"No.");return}
else WordCensor(src)
World_MotD()
set category = "Admin"
set name = "World MotD"
set desc = "Change the Message of the Day"
if(!isHeadAdmin(src) && !isAdmin(src)){info(,list(src),"No.");return}
switch(alert(src,"Change which file?","World MotD","MotD","GM MotD","Cancel"))
if("MotD")
var
msgotd = file2text("motd.txt")
edit_msgotd = input(src,"What do you want to change?","World MotD",msgotd)as null|message
if(edit_msgotd)
switch(alert(src,"Are you sure about changing the MotD?","Change MotD?","Yes","No"))
if("Yes")
fdel("motd.txt")
text2file(edit_msgotd,"motd.txt")
info(,world,"The <a href=?action=motd>Message of the Day</a> has been changed.")
GMLog("[ReportDate()] [src] ([src.key]) changed the MotD.")
if("No")
return
if("GM MotD")
var
msgotd = file2text("gmmotd.txt")
edit_msgotd = input(src,"What do you want to change?","World MotD",msgotd)as null|message
if(edit_msgotd)
switch(alert(src,"Are you sure about changing the GM MotD?","Change GM MotD?","Yes","No"))
if("Yes")
fdel("gmmotd.txt")
text2file(edit_msgotd,"gmmotd.txt")
GMLog("[ReportDate()] [src] ([src.key]) changed the GM MotD.")
if("No")
return
mob/Head_GM/proc
AInvisibility()
set category = "GM"
set desc = "Toggle your visibility from players and staff!"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src)){info(,list(src),"No.");return}
var/State = "Visible"
if(invisibility) State = "Invisible"
switch(alert(src,"Your currently [State], toggle?","Admin Invisibility","Yes","No"))
if("Yes")
if(invisibility){invisibility = 0;density = 1}
else
invisibility = 50
density = 0
var/mob/PC/P = src
P.BtlFrm("normal")
Add_Mod()
set category = "GM"
set name = "Add Mod"
set desc = "Add a Mod"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src)){info(,list(src),"No.");return}
switch(alert(src,"Choose an option..","Add Mod","Player","Key","Cancel"))
if("Cancel")
return
if("Key")
var/NewMod = input(src,"Type in the exact key of the new Mod.","Add Mod")as null|text
if(NewMod)
var/Assign = "Mod"
switch(alert(src,"Are you sure?","Confirm","Yes","No"))
if("Yes")
if(GMList[NewMod] == "Head Admin" || GMList[NewMod] == "Admin" || GMList[NewMod] == "Head GM") {info(,list(src),"Can't make Mod");return}
if(GMList[NewMod] == "GM") GMList -= NewMod
GMList[NewMod] = Assign
info(,list(src),"<b>[NewMod]</b> has been assigned <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [NewMod] as [Assign].")
WorldSave()
if("No")
return
if("Player")
var/list/People[] = list()
for(var/mob/PC/P in world) if(!isHeadAdmin(P) || !isAdmin(P) || !isHeadGM(P)) People["
var/mob/PC/M = People[input(src,"Who would you like to become a Mod?","Add Mod")as null|anything in People]
if(M)
var/NewMod = M.key
var/Assign = "Mod"
switch(alert(src,"Are you sure?","Confirm","Yes","No"))
if("Yes")
if((NewMod in GMList) && GMList[NewMod] == "GM") GMList -= NewMod
GMList[NewMod] = Assign
info(,list(src),"<b>[NewMod]</b> has been assigned <b>[Assign]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) added [NewMod] as [Assign].")
WorldSave()
if("No")
return
Clear_mute_troll_list()
set category = "GM"
set desc = "Remove banned people from the troll/mute list, and remove trolled people from the mute list."
var
muteclear = 0
trollclear = 0
for(var/mute in CIDMuteList)
if(CIDBanList.Find(mute) || CIDTrollList.Find(mute))
CIDMuteList -= mute
muteclear ++
for(var/troll in CIDTrollList)
if(CIDBanList.Find(troll))
CIDTrollList -= troll
trollclear ++
info(,list(src),"Removed [muteclear] CIDs from the mute list and [trollclear] CIDs from the trolls list.")
Summon()
set category = "GM"
set name = "Summon"
set desc = "Summon someone to you."
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src) && !isMod(src)){info(,list(src),"No.");return}
var/list/People[] = list()
for(var/mob/PC/P in world) if(P != src) People["
var/mob/PC/M = People[input(src,"Summon who?","Summon")as null|anything in People]
if(!M||M.Party.members.len>1||M.inmenu){info(,list(src),"Summoning failed.");return}
if(isHeadAdmin(M) && !isHeadAdmin(src)) {info(,list(src),"No.");return}
info(,list(src),"Summoning [M].");M.density = 0;M.loc = src.loc;M.density = 1;M.icon_state = src.icon_state;return
Rem_Mod()
set category = "GM"
set name = "Rem Mod"
set desc = "Remove a Mod"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src)){info(,list(src),"No.");return}
var/list/Removal[] = list()
for(var/M in GMList) if(GMList[M] == "Mod") Removal["[M] - [GMList[M]]"] += M
if(!Removal.len){info(,list(src),"No Mod to remove.");return}
var/RemMod = Removal[input(src,"Remove who?","Remove")as null|anything in Removal]
if(RemMod)
switch(alert(src,"Are you sure?","Confirm","Yes","No"))
if("Yes")
info(,list(src),"<b>[RemMod]</b> has been removed from being <b>[GMList[RemMod]]</b>.")
GMLog("[ReportDate()] [src] ([src.key]) removed [RemMod] from being [GMList[RemMod]]")
GMList -= RemMod
WorldSave()
if("No")
return
Create_GM_equipment()
set category="GM"
set desc="Create GM's equipment!"
if(!isAdmin(src)&&!isHeadAdmin(src)&&!isHeadGM(src)){info(,list(src),"No.");return}
if(src.contents.len >= 16){info(,list(src),"You don't have enough room in your inventory.");return}
contents+=new /obj/equip/weapon/Sword/Judgement
contents+=new /obj/equip/shield/Judgement
contents+=new /obj/equip/helmet/Judgement
contents+=new /obj/equip/armor/Armor/Judgement
contents+=new /obj/equip/arm/Glove/Judgement
Unban()
set category = "GM"
set name = "Unban"
set desc = "Unban someone"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src))
info(,list(src),"No.")
return
var/list/unbanlist = new()
for(var/ban in CIDBanList)
unbanlist["[CIDBanList[ban]]"] = ban
if(!unbanlist.len)
info(,list(src),"The Ban list is empty.")
return
var/Unban = input(src,"Unban who?","Unban") as null|anything in unbanlist
if(Unban)
CIDBanList -= unbanlist[Unban]
info(,list(src),"[Unban] has been unbanned.")
GMLog("[ReportDate()] [src] ([src.key]) unbanned [Unban].")
WorldSave()
GP()
set category = "GM"
set desc = "Get GP or give some to a player"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src)){info(,list(src),"No.");return}
switch(alert(src,"What would you like to do?","GP","Get GP","Give GP","Cancel"))
if("Get GP")
var/mob/PC/M = src
var/gpnum = input(src,"Get how much GP?","Get GP")as null|num
if(gpnum)
M.gold += gpnum
if(M.gold > GPLimit)
M.gold = GPLimit
if("Give GP")
var/list/People[] = list()
for(var/mob/PC/P in world) People["
var/mob/PC/M = People[input(src,"Who would you like to give GP to?","Give GP") as null|anything in People]
if(M)
var/gpnum = input(src,"How much GP to give [M]?","Give GP")as null|num
if(gpnum>9999999) gpnum = 9999999
if(gpnum<0) return
if(M && gpnum) M.gold += gpnum
if(M.gold>GPLimit) M.gold = GPLimit
World_Announce()
set category = "GM"
set name = "World Announce"
set desc = "Useful to make an announcent"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src)){info(,list(src),"No.");return}
var/announce = input(src,"Announcement:","Announce (html_allowed)")as null|message
if(announce)
global.chat = 0
info(,world,"* * Posted by [src.key].")
spawn(announce_wait_time/5)info(,world,"<center>### <b>Announcement</b> ###<br>[announce]</center>")
spawn(announce_wait_time) global.chat = 1
World_Chat()
set category = "GM"
set name = "World Chat"
set desc = "Toggle world chat on/off"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src)){info(,list(src),"No.");return}
var/State = "OFF"
if(global.chat == 1) State = "ON"
switch(alert(src,"Current global chat state: [State]","Toggle Global Chat","Toggle On","Toggle Off","Cancel"))
if("Cancel") return
if("Toggle On"){global.chat = 1;info(,world,"Chat is now enabled.");GMLog("[ReportDate()] [src] ([src.key]) has toggled global chat on.")}
if("Toggle Off"){global.chat = 0;info(,world,"Chat is now disabled.");GMLog("[ReportDate()] [src] ([src.key]) has toggled global chat off.")}
Toggle_Censor_Mode()
set category = "GM"
set desc = "Switch censoring mode between normal and randomized."
var/state
if(censor_mode == "normal") state = "NORMAL"
else state = "RANDOM"
switch(alert(src,"Censor Mode is currently set to [state]","Toggle censor mode","Toggle","Cancel"))
if("Cancel") return
if("Toggle")
if(censor_mode == "normal")
censor_mode = "random"
info(,list(src),"Censor mode has been changed to RANDOM.")
else
censor_mode = "normal"
info(,list(src),"Censor mode has been changed to NORMAL.")
Toggle_Global_Battle()
set category = "GM"
set name = "Toggle Global Battle"
set desc = "Toggle world battle on/off"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src)){info(,list(src),"No.");return}
var/State = "OFF"
if(global.battle == 1) State = "ON"
switch(alert(src,"Current Global Battle State: [State]","Toggle Global Battle","Toggle On","Toggle Off","Cancel"))
if("Cancel") return
if("Toggle On"){global.battle = 1;info(,world,"Battles are now enabled.");GMLog("[ReportDate()] [src] ([src.key]) has toggled global battle ON.")}
if("Toggle Off"){global.battle = 0;info(,world,"Battles are now disabled.");GMLog("[ReportDate()] [src] ([src.key]) has toggled global battle OFF.")}
Read_A_log()
set category="GM"
set desc="Read a log"
if(!isAdmin(src)&&!isHeadAdmin(src)&&!isGM(src)&&!isHeadGM(src)){info(,list(src),"No.");return}
var/log_list = input(src,"Which log would you like to read?","Read log")as null|anything in list("GMLog","SayLog","WhisperLog","SendfileLog","Cancel")
switch(log_list)
if("Cancel") return
if("GMLog")
if(fexists("GMLog.txt"))
//usr<<browse(file("GMLog.txt"))
usr<<browse("<small>[replacetext(file2text("gmlog.txt"),"\n","<br>")]</small>")
if("SayLog")
if(fexists("sayLog.txt"))
usr<<browse(file("sayLog.txt"))
if("WhisperLog")
if(fexists("whisperLog.txt"))
usr<<browse(file("whisperLog.txt"))
if("SendfileLog")
if(fexists("FSendLog.txt"))
usr<<browse(file("FSendLog.txt"))
mob/GM/proc
CLEAR_ALL_CHAT()
set category = "GM"
set desc = "Clear everyone's chat!"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src))
info(,list(src),"No.")
return
if(alert(src,"Are you sure? This will clear the chatboxes of ALL players (excluding personal chatboxes).","Clear all chat","Yes","No!") == "Yes")
for(var/client/C) C << output(null, "outputwindow.output")
Beacon()
set category = "GM"
set desc = "Beacons are custom teleport destinations"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src))
info(,list(src),"No.")
return
switch(input(src,"What would you like to do?","Beacon") in list("Add","Remove","Teleport","(Cancel)"))
if("(Cancel)") return
if("Add")
var
bcloc = "x[x]y[y]z[z]"
bcname = input(src,"Enter a name for your new beacon:","Add beacon at current location") as null|text
if(!bcname) bcname = "[x],[y],[z]"
beacons[bcname] = bcloc
info(,list(src),"Created beacon \"[bcname]\".")
if("Remove")
var/rembc = input(src,"Remove which beacon?","Remove beacon") as anything in beacons + "(Cancel)"
if(rembc == "(Cancel)") return
var/confirm = alert(src,"Are you sure you want to remove beacon \"[rembc]\"?","Remove beacon","Yes","No")
if(confirm == "Yes")
beacons -= rembc
info(,list(src),"Removed beacon \"[rembc]\".")
if("Teleport")
var/bc = beacons[input(src,"Teleport to which beacon?","Teleport to beacon") as anything in beacons + "(Cancel)"]
if(!bc) return
var
bc_y_start_pos = findtext(bc, "y")+1
bc_z_start_pos = findtext(bc, "z")+1
bc_x_end_pos = findtext(bc, "y")
bc_y_end_pos = findtext(bc, "z")
bc_x_num = text2num(copytext(bc, 2, bc_x_end_pos))
bc_y_num = text2num(copytext(bc, bc_y_start_pos, bc_y_end_pos))
bc_z_num = text2num(copytext(bc, bc_z_start_pos, 0))
mob/PC/P = src
if(P.chkset_tmp("inbattle"))
info(,list(P),"Cannot teleport during a battle.")
return
P.density = 0
P.Move(locate(bc_x_num, bc_y_num, bc_z_num))
P.density = 1
Summon_to()
set category = "GM"
set desc = "Summon someone to someone."
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src) && !isMod(src)){info(,list(src),"No.");return}
var/list
People[] = list()
Folks[] = list()
for(var/mob/PC/P in world) if(P != src) People["
var/mob/PC/M = People[input(src,"Summon who?","Summon to") as null|anything in People]
for(var/mob/PC/P in world) if(P != M && P != src) Folks["
var/mob/PC/F = Folks[input(src,"To who?","Summon to") as null|anything in Folks]
if(!M || M.Party.members.len > 1 || M.inmenu) {info(,list(src),"Summoning failed.");return}
if(!F || F.inmenu) {info(,list(src),"Summoning failed.");return}
if(isHeadAdmin(M) && !isHeadAdmin(src)) {info(,list(src),"No.");return}
info(,list(src),"Summoning [M].")
M.density = 0
M.loc = F.loc
M.density = 1
M.icon_state = F.icon_state
Summon_Airship()
set category = "GM"
set desc = "Summon your airship to your current location"
var/mob/PC/p = src
if(!p.AS) {info(,list(src),"You don't have an airship!");return}
if(!inmenu)
p.AS.loc = locate(x,y,z)
p.AS.vx = p.AS.x
p.AS.vy = p.AS.y
p.AS.vz = p.AS.z
else return
Save_Players()
set category = "GM"
set name = "Save players"
set desc = "Save game for all players that are currently logged in!"
for(var/client/C)
if(!istype(C.mob,/mob/PC)) continue
C.character_save(C.last_used_slot)
sleep(1)
info(,list(C.mob),"Your character has been saved by [src.key]!")
Troll()
set category = "GM"
set name = "Troll"
set desc = "Add a player as troll."
var/list/People[] = list()
for(var/mob/PC/P in world)
if(!isGM(P))
People["
var/mob/PC/M = People[input(src,"Who would you like to add as troll?","Add troll") as null|anything in People]
if(M)
if(isHeadAdmin(M) && !isHeadAdmin(src))
info(,list(src),"No.")
return
var
CID = M.client.computer_id
Person = "[M] ([M.key])"
if(alert("Are you sure about adding [Person] as troll?","Troll","Yes","No") == "Yes")
var/reason = input("Why are you adding [Person] as troll?","Troll Reason") as null|text
if(!reason) reason = "No reason supplied."
if(CID in CIDTrollList) CIDTrollList -= CID
CIDTrollList[CID] = Person
if(M)
M.verbs -= /mob/PC/verb/say
M.verbs -= /mob/PC/verb/wsay
M.verbs -= /mob/PC/verb/emote
M.verbs -= /mob/PC/verb/wemote
M.verbs -= /mob/PC/verb/Send_file
M.verbs -= /mob/PC/verb/whisper
M.verbs -= /mob/PC/verb/submit_suggestion
info(,world,"[Person] has been added as troll. ([reason])")
GMLog("[ReportDate()] [src] ([src.key]) added [Person] as troll. ([reason])")
WorldSave()
Troll_offline()
set category = "GM"
set desc = "Troll a player while they are offline"
var/trollkey = input("Enter the exact key of the person you would like to troll","Troll offline") as null|text
if(trollkey)
var/reason = input("Why would you like to troll [trollkey]?","Troll offline") as null|text
if(!reason) reason = "No reason supplied."
PendingTrolls += trollkey
info(,list(src),"[trollkey]'s computer ID will be auto-trolled next time they log in.")
GMLog("[ReportDate()] [src] ([src.key]) has trolled [trollkey] for [reason].")
Troll_CID()
set category = "GM"
set desc = "Troll someone by entering their computer ID directly"
var/cid = input("Enter the exact CID (Computer ID) of the person you'd like to troll:","Troll CID") as null|text
if(cid)
var/reason = input("Why are you trolling [cid]?","Troll CID") as null|text
if(!reason) reason = "No reason supplied."
var/who = input("Who does CID [cid] belong to?","Troll CID") as text
CIDTrollList[cid] = who
info(,list(src),"[cid] ([who]) has been trolled. ([reason])")
GMLog("[ReportDate()] [src] ([src.key]) has trolled [cid] ([who]) for [reason].")
Untroll()
set category = "GM"
set desc = "Untroll someone"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src))
info(,list(src),"No.")
return
var/list/untrolllist = new()
for(var/troll in CIDTrollList)
untrolllist["[CIDTrollList[troll]]"] = troll
if(!untrolllist.len)
info(,list(src),"The Troll list is empty.")
return
var/Untroll = input(src,"Untroll who?","Untroll") as null|anything in untrolllist
if(Untroll)
CIDTrollList -= untrolllist[Untroll]
info(,list(src),"[Untroll] has been untrolled.")
GMLog("[ReportDate()] [src] ([src.key]) untrolled [Untroll].")
WorldSave()
Ban()
set category = "GM"
set name = "Ban"
set desc = "Ban Someone"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src))
info(,list(src),"No.")
return
var/list/People[] = list()
for(var/mob/PC/P in world)
if(!isHeadAdmin(P) && !isAdmin(P) && !isHeadGM(P) && !isGM(P))
People["
if(!People.len)
info(,list(src),"No one to ban.")
return
var/mob/PC/M = People[input(src,"Ban who?","Ban")as null|anything in People]
if(M)
if(isHeadAdmin(M) && !isHeadAdmin(src))
info(,list(src),"No.")
return
var
CID = M.client.computer_id
Person = "[M] ([M.key])"
if(alert("Are you sure about banning [Person]?","Mute","Yes","No") == "Yes")
var/reason = input(src,"Why are you banning [Person]?","Ban Reason") as null|text
CIDBanList[CID] = Person
if(!reason) reason = "No reason supplied."
GMLog("[ReportDate()] [src] ([src.key]) has banned [Person] for [reason].")
if(M)
info(,world,"[Person] has been banned. ([reason])")
M.client.character_save(M.client.last_used_slot)
del(M)
for(var/client/C)
if(C.computer_id == CID)
C.character_save(C.last_used_slot)
del(C)
ChartList(src)
WorldSave()
Ban_offline()
set category = "GM"
set desc = "Ban a player while they are offline"
var/bankey = input("Enter the exact key of the person you would like to ban","Ban offline") as null|text
if(bankey)
var/reason = input("Why would you like to ban [bankey]?","Ban offline") as null|text
if(!reason) reason = "No reason supplied."
PendingBans += bankey
info(,list(src),"[bankey]'s computer ID will be auto-banned next time they log in.")
GMLog("[ReportDate()] [src] ([src.key]) has banned [bankey] for [reason].")
Ban_CID()
set category = "GM"
set desc = "Ban someone by entering their computer ID directly"
var/cid = input("Enter the exact CID (Computer ID) of the person you'd like to ban:","Ban CID") as null|text
if(cid)
var/reason = input("Why are you banning [cid]?","Ban CID") as null|text
if(!reason) reason = "No reason supplied."
var/who = input("Who does CID [cid] belong to?","Ban CID") as text
CIDBanList[cid] = who
info(,list(src),"[cid] ([who]) has been banned. ([reason])")
GMLog("[ReportDate()] [src] ([src.key]) has banned [cid] ([who]) for [reason].")
Push()
set category="GM"
set desc="Push someone using the force!"
if(!isAdmin(src)&&!isHeadAdmin(src)&&!isGM(src)&&!isHeadGM(src)){info(,list(src),"No.");return}
for(var/mob/PC/p in get_step(src,src.dir)) step(p,src.dir)
Toggle_own_battles()
set category="GM"
set desc="Toggle self battle on/off"
if(!isAdmin(src)&&!isHeadAdmin(src)&&!isGM(src)&&!isHeadGM(src)){info(,list(src),"No.");return}
var/state=null
if(chkset_tmp("battle")) state="ON"
else state="OFF"
switch(alert(src,"Current self battle state: [state]","Toggle own battles","Toggle","Cancel"))
if("Cancel") return
if("Toggle")
if(chkset_tmp("battle"))
Set_tmp(0,"battle")
info(,list(src),"Your battles are now disabled.")
else
Set_tmp(1,"battle")
info(,list(src),"Your battles are now enabled.")
Toggle_self_passable()
set category="GM"
set desc="Make yourself passable/unpassable to other players."
if(!isAdmin(src)&&!isHeadAdmin(src)&&!isGM(src)&&!isHeadGM(src)){info(,list(src),"No.");return}
var/state=null
if(src.passable) state="PASSABLE"
else if(!src.passable) state="NOT passable"
switch(alert(src,"You are currently [state] to other players. Toggle?","Toggle self passable","Toggle","Cancel"))
if("Cancel") return
if("Toggle")
if(src.passable)
src.passable = 0
info(,list(src),"You are no longer passable to other players.")
else if(!src.passable)
src.passable = 1
info(,list(src),"You are now passable to other players.")
Chart()
set category="GM"
set desc="Add, edit, view notes. A must use!"
if(!isAdmin(src)&&!isHeadAdmin(src)&&!isGM(src)&&!isHeadGM(src)){info(,list(src),"No.");return}
ChartList(src)
Search()
set category="GM"
set desc="Search for user information by Key/Computer ID"
if(!isAdmin(src)&&!isHeadAdmin(src)&&!isGM(src)&&!isHeadGM(src)){info(,list(src),"No.");return}
var/list/S_CIDList = new()
var/list/S_KeyList = new()
switch(alert(src,"Search by...","Search","by Key","by Computer ID","Cancel"))
if("by Key")
var/Key = input(src,"Enter the Key you want information from","Search by Key") as null|text
if(!Key) return
info(null,list(src),"Searching information about [Key];")
CR_Key.cd = "/[Key]"
for(var/CID in CR_Key.dir) if(CID != Key)
S_CIDList += CID
CR_CID.cd = "/[CID]"
for(var/K in CR_CID.dir) if(K != CID && !(K in S_KeyList)) S_KeyList += K
CR_CID.cd = "/"
CR_Key.cd = "/"
if("by Computer ID")
var/cid = input(src,"Enter the Computer ID you want information from","Search by Computer ID") as null|text
if(!cid) return
info(null,list(src),"Searching information about [cid];")
CR_CID.cd = "/[cid]"
for(var/Key in CR_CID.dir) if(Key != cid)
S_KeyList += Key
CR_Key.cd = "/[Key]"
for(var/I in CR_Key.dir) if(I != Key && !S_CIDList.Find(I)) S_CIDList += I
CR_Key.cd = "/"
CR_CID.cd = "/"
if(length(S_KeyList))
var/S_KeyText
for(var/T in S_KeyList) S_KeyText += "[T] "
info(null,list(src),"Known Key(s): [S_KeyText]",1)
else info(null,list(src),"No other Key could be found.",1)
if(length(S_CIDList))
var/S_CIDText
for(var/T in S_CIDList) S_CIDText += "[T] "
info(null,list(src),"Known Computer ID(s): [S_CIDText]",1)
else info(null,list(src),"Couldnt find any information.",1)
AWho()
set category="GM"
set desc="Advanced who"
if(!isAdmin(src)&&!isHeadAdmin(src)&&!isGM(src)&&!isHeadGM(src)){info(,list(src),"No.");return}
var/html="<html><body bgcolor=#000000 text=#A0A0DD link=blue vlink=blue alink=blue>"
html+="<B>Advanced who</B>:"
html+="<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1 WIDTH=100%>"
html+="<TR><TD ALIGN=center WIDTH=25%>Name</TD><TD ALIGN=center WIDTH=25%>Key</TD><TD ALIGN=center WIDTH=20%>Computer ID</TD><TD ALIGN=center WIDTH=30%>Idle time</TD></TR>"
for(var/mob/PC/p in world) if(p.client) html+="<TR><TD ALIGN=center WIDTH=30%>
html+="</TABLE></HTML>"
src<<browse(html)
Teleport()
set category = "GM"
set name = "Teleport"
set desc = "Teleport to Someone"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src) && !isMod(src)){info(,list(src),"No.");return}
var/mob/PC/S = src
if(S.chkset_tmp("inbattle")){info(,list(src),"You cannot teleport while in a battle.");return}
switch(alert(src,"Teleport to a player or an area?","Teleport","Player","Area","Cancel"))
if("Cancel") return
if("Player")
var/list/People[] = list()
for(var/mob/PC/P in world) if(P != src) People["
if(!People.len){info(,list(src),"No one to teleport to.");return}
var/mob/PC/M = People[input(src,"Teleport to who?","Teleport")as null|anything in People]
if(!M||src.chkset_tmp("inbattle")){info(,list(src),"Teleportation failed.");return}
else {info(,list(src),"Teleporting to [M].");density=0;src.loc = M.loc;density = 1;src.icon_state = M.icon_state;return}
if("Area")
var/list/TPLoc = list()
for(var/area/saved_location/T in world) TPLoc.Add(T)
if(!TPLoc.len){info(,list(src),"No area to teleport to.");return}
var/area = input(src,"Teleport where?","Teleport Area")as null|anything in TPLoc
if(!area||src.chkset_tmp("inbattle")) return
else {info(,list(src),"Teleporting to [area].");density = 0;loc = area;density = 1;icon_state = "normal";return}
XYZ()
set category = "GM"
set name = "X Y Z"
set desc = "Teleport to any X Y Z coordinates or simply get your current coordinates"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src) && !isMod(src)){info(,list(src),"No.");return}
switch(input(src,"What would you like to do?","X-Y-Z actions") as anything in list("Get X Y Z","Goto X Y Z","Watch X Y Z","Cancel"))
if("Cancel") return
if("Get X Y Z")
alert(usr,"Your current coordinates: X=[usr.x], Y=[usr.y], Z=[usr.z]","Get X Y Z")
return
if("Goto X Y Z")
var/mob/PC/S = src
if(S.Party.members.len>1){info(,list(src),"You cannot teleport while in a party.");return}
if(S.chkset_tmp("inbattle")){info(,list(src),"You cannot teleport while in a battle.");return}
inputx
var/_x=input("X, 1-350","Specify a X-location",x) as num
if(_x < 1 || _x > 350 || !_x)
info(,list(src),"Invalid X-location.")
goto inputx
inputy
var/_y=input("Y, 1-300","Specify a Y-location",y) as num
if(_y < 1 || _y > 300 || !_y)
info(,list(src),"Invalid Y-location.")
goto inputy
inputz
var/_z=input("Z, 1-8","Specify a Z-location",z) as num
if(_z < 1 || _z > 8 || !_z)
info(,list(src),"Invalid Z-location.")
goto inputz
loc=locate(_x,_y,_z)
info(,list(src),"You have teleported to X=<b>[usr.x]</b>, Y=<b>[usr.y]</b>, Z=<b>[usr.z]</b>.")
if("Watch X Y Z")
switch(alert(usr,"Choose an option:","Watch X Y Z","Set","Reset","Cancel"))
if("Set")
var
wx = input("Enter X co-ordinate:",,x) as num
wy = input("Enter Y co-ordinate:",,y) as num
wz = input("Enter Z co-ordinate:",,z) as num
client.eye = locate(wx,wy,wz)
client.perspective = EYE_PERSPECTIVE
if("Reset")
client.eye = src
client.perspective = MOB_PERSPECTIVE
if("Cancel") return
mob/Mod/proc
Play_Custom_Music(snd as sound)
set category = "GM"
for(var/mob/PC/p in view(usr)) if(p.chkset("player_sound"))
p << sound(null)
p << sound(snd, repeat = 1, volume = p.musicvol)
Zoom(mob/PC/P)
set category = "GM"
var/cview
while(!cview || cview < 1 || cview > 34)
var/cv = input(src,"1-34 (default = 8)","Zoom") as null|num
if(!cv) return
cview = cv
if(cv < 1 || cv > 34)
info(,list(src),"It must be a number between 1 and 34!")
src.client.view = cview
info(,list(src),"Your view has been changed to [cview]x[cview] tiles.")
Jail()
set category = "GM"
set desc = "Jail a player."
var/list/People[] = list()
for(var/mob/PC/P in world) if(!isGM(P) && !isJailed(P)) People["
if(!People.len){info(,list(src),"No people to jail.");return}
var/mob/PC/M = People[input(src,"Who would you like to jail?","Jail")as null|anything in People]
if(M)
if(isHeadAdmin(M) && !isHeadAdmin(src)) {info(,list(src),"No.");return}
if(M.chkset_tmp("inbattle")) {info(,list(src),"[M] is currently in battle.");return}
var/jailed = M.key
var/list/cells = new()
for(var/area/jail/cell) cells += cell
if(!cells.len){info(,list(src),"No available cells.");return}
switch(alert(src,"jail [jailed]?","Jail","Cancel","OK"))
if("Cancel")
return
if("OK")
var/area/jail/C = input(src,"In which cell?","Jail")as null|anything in cells
if(!C) return
M.verbs -= /mob/PC/verb/wsay
M.verbs -= /mob/PC/verb/wemote
M.verbs -= /mob/PC/verb/whisper
M.GotoLoc(C.type)
M.jailed = C.type
M.client.character_save(M.client.last_used_slot)
info(,world,"[jailed] has been jailed.")
GMLog("[ReportDate()] [src] ([src.key]) has jailed [jailed].")
WorldSave()
Unjail()
set category = "GM"
set desc = "Unjail a player"
var/list/Removal[] = list()
for(var/mob/PC/p in world) if(p.jailed) Removal["
if(!Removal.len){info(,list(src),"No prisoners to unjail.");return}
var/mob/PC/unjail = Removal[input(src,"Unjail who?","Unjail")as null|anything in Removal]
if(unjail)
if(unjail.chkset_tmp("inbattle")) {info(,list(src),"[unjail] is currently in battle.");return}
switch(alert(src,"Are you sure?","Confirm","Yes","No"))
if("Yes")
//for(var/area/jail/cell) if(cell.prisoners.Find(unjail)) cell.prisoners -= unjail
unjail.jailed = null
unjail.GotoLoc(unjail.last_area)
unjail.verbs += /mob/PC/verb/wsay
unjail.verbs += /mob/PC/verb/wemote
unjail.verbs += /mob/PC/verb/whisper
unjail.client.character_save(unjail.client.last_used_slot)
info(,world,"[unjail] has been unjailed.")
GMLog("[ReportDate()] [src] ([src.key]) has unjailed [unjail].")
WorldSave()
if("No")
return
GMSay(msg as text)
set category = "GM"
set name = "GMSay"
set desc = "Send a private message to all GM's online."
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src) && !isMod(src)){info(,list(src),"No.");return}
var/list/GMs = list()
for(var/mob/PC/P in world)
if(isHeadAdmin(P) || isAdmin(P) || isHeadGM(P) || isGM(P) || isMod(P))
GMs.Add(P)
chat("GMSay",src,GMs,msg)
GMSayLog("<[time2text(world.realtime,"MMM DD YY, hh:mm")]> [src.key]:[msg]")
Spy()
set category = "GM"
set desc = "View another player."
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src) && !isMod(src)){info(,list(src),"No.");return}
if(src.client.eye != src)
src.client.eye = src
src.client.perspective = MOB_PERSPECTIVE
return
var/list/PC_List = list()
for(var/mob/PC/P)
if(P.client && P != src)
if(!isHeadAdmin(P))
PC_List.Add("[P.name] ([P.key])")
PC_List["[P.name] ([P.key])"] = P.ckey
var/selected_player = input("Who do you want to watch?")in PC_List+"<Cancel>"
if(selected_player == "<Cancel>")
return
for(var/mob/PC/sel)
if(sel.ckey == PC_List[selected_player])
info(,list(src),"You are now viewing [sel] to stop viewing use this command again.")
src.client.eye = sel
src.client.perspective = EYE_PERSPECTIVE
/* Easter()
set category = "GM"
set desc = "Create an Easter NPC"
var/obj/NPC/newNPC = new/obj/NPC(usr.loc)
newNPC.is_custom = 1
newNPC.name = "Easter Egg"
newNPC.message = "Oh no, you found me!"
newNPC.icon = 'mob/npc/ee_overworld.dmi'
newNPC.icon_state = "normal"
newNPC.dir = SOUTH
newNPC.battle = "EasterEgg"
newNPC.egg_number = rand(1,1000) */
Submit_report()
set category = "GM"
set desc = "Submit a report."
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src) && !isMod(src)){info(,list(src),"No.");return}
var/S_Type = alert(usr,"Report Log","Submit","Report","Suggestion","Cancel")
if(S_Type && S_Type != "Cancel")
var/S_Text = input(usr,"Text for [S_Type].","[S_Type]") as null|message
if(S_Text)
SubmitLogAdd(usr,S_Type,S_Text)
GMLog("[ReportDate()] [src] ([src.key]) has submitted a [S_Type].")
Kick()
set category = "GM"
set name = "Kick"
set desc = "Kick someone out"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src) && !isMod(src)){info(,list(src),"No.");return}
var/list/People[] = list()
for(var/mob/PC/P in world)
if(isHeadAdmin(src) || isAdmin(src) || isHeadGM(src) || isGM(src))
if(!isHeadAdmin(P) || !isAdmin(P) || !isHeadGM(P) || !isGM(P))
People["
if(isMod(src))
if(!isHeadAdmin(P) || !isAdmin(P) || !isHeadGM(P) || !isGM(P) || !isMod(P))
People["
var/mob/PC/M = People[input(src,"Who would you like to kick?","Kick")as null|anything in People]
if(M)
if(isHeadAdmin(M) && !isHeadAdmin(src)) {info(,list(src),"No.");return}
var/reason = input(src,"Why are you kicking [M]?","Kick Reason") as null|text
if(!reason) reason = "No reason supplied"
if(M)
info(M,world,"has been kicked.([reason]).")
GMLog("[ReportDate()] [src] ([src.key]) has kicked [M] for [reason].")
M.client.character_save(M.client.last_used_slot)
var/CID = M.client.computer_id
del(M)
for(var/client/C)
if(C.computer_id == CID)
C.character_save(C.last_used_slot)
del(C)
Mute()
set category = "GM"
set name = "Mute"
set desc = "Mute Someone"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src) && !isMod(src))
info(,list(src),"No.")
return
var/list/People[] = list()
for(var/mob/PC/P in world)
if(isHeadAdmin(src) || isAdmin(src) || isHeadGM(src) || isGM(src))
if(!isHeadAdmin(P) && !isAdmin(P) && !isHeadGM(P) && !isGM(P))
People["
else if(isMod(src))
if(!isHeadAdmin(P) && !isAdmin(P) && !isHeadGM(P) && !isGM(P) && !isMod(P))
People["
var/mob/PC/M = People[input(src,"Who would you like to Mute?","Mute") as null|anything in People]
if(M)
if(isHeadAdmin(M) && !isHeadAdmin(src))
info(,list(src),"No.")
return
var
CID = M.client.computer_id
Person = "[M] ([M.key])"
if(alert("Are you sure about muting [Person]?","Mute","Yes","No") == "Yes")
var/reason = input(src,"Why are you muting [Person]?","Mute Reason")as null|text
if(!reason) reason = "No reason supplied."
var/time = input(src,"How long should [Person] be muted? (minutes) (Cancel for indefinite mute)","Mute Time") as null|num
if(M)
if(time)
if(time < 15)
info(,list(src),"Cannot mute for less than 15 minutes.")
else
info(M,world,"has been muted for [time] minute(s). ([reason])")
GMLog("[ReportDate()] [src] ([src.key]) has muted [Person] for [time] minutes (reason: [reason]).")
MuteTimers[CID] = time*60
CIDMuteList[CID] = Person
else
info(,world,"[Person] has been muted. ([reason])")
CIDMuteList[CID] = Person
GMLog("[ReportDate()] [src] ([src.key]) has muted [Person] (reason: [reason]).")
WorldSave()
Mute_offline()
set category = "GM"
set desc = "Mute a player while they are offline"
var/mutekey = input("Enter the exact key of the person you would like to mute","Mute offline") as null|text
if(mutekey)
var/reason = input("Why would you like to mute [mutekey]?","Mute offline") as null|text
if(!reason) reason = "No reason supplied."
PendingMutes += mutekey
info(,list(src),"[mutekey]'s computer ID will be auto-muted next time they log in.")
GMLog("[ReportDate()] [src] ([src.key]) has muted [mutekey] for [reason].")
Mute_CID()
set category = "GM"
set desc = "Mute someone by entering their computer ID directly"
var/cid = input("Enter the exact CID (Computer ID) of the person you'd like to mute:","Mute CID") as null|text
if(cid)
var/reason = input("Why are you muting [cid]?","Mute CID") as null|text
if(!reason) reason = "No reason supplied."
var/who = input("Who does CID [cid] belong to?","Mute CID") as text
CIDMuteList[cid] = who
info(,list(src),"[cid] ([who]) has been Muted. ([reason])")
GMLog("[ReportDate()] [src] ([src.key]) has muted [cid] ([who]) for [reason].")
Unmute()
set category = "GM"
set desc = "Unmute someone"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src) && !isMod(src))
info(,list(src),"No.")
return
var/list/unmutelist = new()
for(var/mute in CIDMuteList)
var/time = MuteTimers.Find(mute) ? " - [MuteTimers[mute]/60] minutes left" : ""
unmutelist["[CIDMuteList[mute]][time]"] = mute
if(!unmutelist.len)
info(,list(src),"The Mute list is empty.")
return
var/Unmute = input(src,"Unmute who?","Unmute") as null|anything in unmutelist
if(Unmute)
var/Unmute_name = findtext(Unmute, "minutes left")? copytext(Unmute,1,findtext(Unmute,"-")-1) : Unmute
CIDMuteList -= unmutelist[Unmute]
info(,list(src),"[Unmute_name] has been unmuted.")
GMLog("[ReportDate()] [src] ([src.key]) unmuted [Unmute_name].")
WorldSave()
GM_FAQ()
set category = "GM"
set name = "GM FAQ"
set desc = "This year's best-seller, a must-read!"
if(!isHeadAdmin(src) && !isAdmin(src) && !isHeadGM(src) && !isGM(src) && !isMod(src)){info(,list(src),"No.");return}
if(fexists("gmfaq.htm")) usr << browse(file("gmfaq.htm"))
mob/Dev/proc
Hax_NPC(var/obj/NPC/O in world)
set category = "Dev"
set name = "Hax NPC"
var/variable = input("Which var?","Var") in O:vars + list("Cancel")
if(variable == "Cancel")
return
var/default
var/typeof = O:vars[variable]
if(isnull(typeof))
default = "Text"
else if(isnum(typeof))
default = "Num"
dir = 1
else if(istext(typeof))
default = "Text"
else if(isloc(typeof))
default = "Reference"
else if(isicon(typeof))
typeof = "\icon[typeof]"
default = "Icon"
else if(istype(typeof,/atom) || istype(typeof,/datum))
default = "Type"
else if(istype(typeof,/list))
default = "List"
else if(istype(typeof,/client))
default = "Cancel"
else
default = "File"
var/class = input("What kind of variable?","Variable Type",default) in list("Text","Num","Type","Reference","Icon","File","Restore to default","List","Edit Reference","Null","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(/mob)
if("Reference")
O:vars[variable] = input("Select reference:","Reference",O:vars[variable]) as mob in world
if("Edit Reference")
call(src,/mob/Head_Admin/proc/Hax_Anything)(O:vars[variable])
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
if("List")
var/item = input("This is what's in [variable]") in O:vars[variable] + list("Add","Close")
if(item == "Close") return
if(item == "Add")
O:vars[variable] += call(src,/mob/Head_Admin/proc/Access_Anything)()
return
switch(alert(src,"Remove [item] from [O]'s [variable]?","[item]","Remove","Replace","Cancel"))
if("Cancel") return
if("Replace")
var/list/L = O:vars[variable]
L[L.Find(item)] = call(src,/mob/Head_Admin/proc/Access_Anything)()
if("Remove")
O:vars[variable] -= item
src << "*[item] has been removed from [O]'s [variable]!"
if("Null")
if(alert("Are you sure you want to clear this variable?","Null","Yes","No") == "Yes")
O:vars[variable] = null
Fake_Shutdown()
set category = "Dev"
set name = "Fake Shutdown"
set desc = "Pretend to shutdown the world."
if(!isHost(src)){info(,list(src),"No.");return}
if(shutting_down)
info(,world,"Shutdown cancelled.")
shutting_down = 0
shutdown_time = 0
return
var/countdown = input("How long until the shutdown?","World Shutdown")as null|num
if(!countdown) return
var
count_dupe
list/reboot_total_time = list("hours" = 0,"minutes" = 0,"seconds" = 0)
switch(alert(src,"Are you SURE that you want to do this?","World Shutdown","Yes","No"))
if("Yes")
count_dupe = countdown
while(count_dupe >= 60)
reboot_total_time["minutes"]++
if(reboot_total_time["minutes"] >= 60)
reboot_total_time["hours"]++
reboot_total_time["minutes"] = 0
count_dupe -= 60
if(count_dupe)
reboot_total_time["seconds"] += count_dupe
info(,world,"World is shutting down in [reboot_total_time["hours"]] hour\s, [reboot_total_time["minutes"]] minute\s, and [reboot_total_time["seconds"]] second\s.")
shutting_down = 1
GMLog("[ReportDate()] [src] ([src.key]) pretended to shutdown the server.")
while(shutting_down && countdown)
sleep(10)
countdown--
if(countdown == 10)
info(,world,"World is shutting down in 10 seconds.")
if(countdown == 5)
info(,world,"World is shutting down in 5 seconds.")
if(countdown == 4)
info(,world,"World is shutting down in 4 seconds.")
if(countdown == 3)
info(,world,"World is shutting down in 3 seconds.")
if(countdown == 2)
info(,world,"World is shutting down in 2 seconds.")
if(countdown == 1)
info(,world,"World is shutting down in 1 seconds.")
if(countdown <= 1)
shutting_down = 0
info(,world,"Shutdown cancelled.")
sleep(1)
shutdown_time = countdown
shutting_down = 0
Create_NPC()
set category = "Dev"
set desc = "Create a new NPC! (Useful for events and such)"
var/npcName = input("Name this NPC","Create NPC") as null|text
if(!npcName) return
var/npcMsg = input("Make it say something! (Cancel for no message)","Create NPC") as null|text
var/icon/npcIcon = input("Give it an icon!","Create NPC") as null|icon
if(!npcIcon) return
set_iconstate
var/npcIconState = input("NPC's icon state","Create NPC") as null|text
if(!npcIconState) return
if( !(npcIconState in icon_states(npcIcon)) )
info(,list(src),"No such icon state in the selected icon!")
goto set_iconstate
var/npcDir = input("New NPC's direction?","Create NPC") as null|num
if(!npcDir) return
var/npcXloc = usr.x
var/npcYloc = usr.y
var/npcZloc = usr.z
var
Wander
WanderSpeed
Dance
switch(alert("New NPC's movement","Create NPC","Wander","Dance","Stationary"))
if("Wander")
Wander = 1
WanderSpeed = input("Enter wandering speed (lower is faster).","Create NPC") as num
if("Dance")
Dance = 1
var/obj/NPC/newNPC = new/obj/NPC(locate(npcXloc, npcYloc, npcZloc))
newNPC.is_custom = 1
newNPC.name = npcName
newNPC.message = npcMsg
newNPC.icon = npcIcon
newNPC.icon_state = npcIconState
newNPC.dir = npcDir
if(Wander)
newNPC.wander = 1
newNPC.speed = WanderSpeed
newNPC.Wander()
else if(Dance)
newNPC.dance = 1
newNPC.Dance()
info(,list(src),"NPC \"[newNPC]\" has been successfully created!")
Delete_NPC(obj/NPC/N in orange(world.view))
set category = "Dev"
set desc = "Delete a previously created NPC."
if(!istype(N, /obj/NPC))
info(,list(src),"[N] is not an NPC!")
return
if(!N.is_custom)
info(,list(src),"[N] is not a custom NPC!")
return
del N
info(,list(src),"Deletion of NPC successful.")
Clone_NPC(obj/NPC/N in orange(world.view))
set category = "Dev"
set desc = "Clone a previously created NPC."
if(N.is_custom)
var/npcXloc = usr.x
var/npcYloc = usr.y
var/npcZloc = usr.z
var/obj/NPC/newNPC = new/obj/NPC(locate(npcXloc, npcYloc, npcZloc))
newNPC.is_custom = 1
newNPC.name = N.name
newNPC.message = N.message
newNPC.icon = N.icon
newNPC.icon_state = N.icon_state
newNPC.dir = N.dir
else
info(,list(src),"Cannot clone premade NPC.")
Reverse_text()
set category = "Dev"
set desc = "Reverse some one's text in chat!"
var/list/People = new()
for(var/client/C)
if(C.mob)
var/mob/PC/P = C.mob
if(!P.chkset_tmp("text_reverse")) People["
if(!People.len)
info(,list(src),"The is nobody online to reverse.")
return
var/mob/PC/M = People[input(src,"Whose text would you like to reverse?","Reverse text") as null|anything in People]
if(M)
M.Set_tmp(1,"text_reverse")
info(,world,"[M]'s text has been reversed!")
Unreverse_text()
set category = "Dev"
set desc = "Unreverse some one's text"
var/list/People = new()
for(var/client/C)
if(C.mob)
var/mob/PC/P = C.mob
if(P.chkset_tmp("text_reverse")) People["
if(!People.len)
info(,list(src),"Nobody is currently reversed.")
return
var/mob/PC/M = People[input(src,"Whose text would you like to unreverse?","Unreverse text") as null|anything in People]
if(M)
M.Set_tmp(0,"text_reverse")
info(,world,"[M]'s text has been unreversed.")
Scramble_text()
set category = "Dev"
set desc = "Scramble some one's text in chat!"
var/list/People = new()
for(var/client/C)
if(C.mob)
var/mob/PC/P = C.mob
if(!P.chkset_tmp("text_scramble")) People["
if(!People.len)
info(,list(src),"The is nobody online to scramble.")
return
var/mob/PC/M = People[input(src,"Whose text would you like to scramble?","Scramble text") as null|anything in People]
if(M)
M.Set_tmp(1,"text_scramble")
info(,world,"[M]'s text has been scrambled!")
Descramble_text()
set category = "Dev"
set desc = "Descramble some one's text"
var/list/People = new()
for(var/client/C)
if(C.mob)
var/mob/PC/P = C.mob
if(P.chkset_tmp("text_scramble")) People["
if(!People.len)
info(,list(src),"Nobody is currently scrambled.")
return
var/mob/PC/M = People[input(src,"Whose text would you like to descramble?","Descramble text") as null|anything in People]
if(M)
M.Set_tmp(0,"text_scramble")
info(,world,"[M]'s text has been descrambled.")
Push()
set category="Dev"
set desc="Push someone using the force!"
for(var/mob/PC/p in get_step(src,src.dir))
if(!isGM(p)&&!isHeadAdmin(p)&&!isHeadGM(p)&&!isAdmin(p)) step(p,src.dir)
else info(,list(src),"Get your hands off
Toggle_self_battle()
set category="Dev"
set desc="Toggle self battle on/off"
var/state="OFF"
if(chkset_tmp("battle")) state="ON"
switch(alert(src,"Current self battle state: [state]","Toggle self battle","Toggle ON","Toggle OFF","Cancel"))
if("Cancel") return
if("Toggle ON"){Set_tmp(1,"battle");info(,list(src),"Your battle are now enabled.")}
if("Toggle OFF"){Set_tmp(0,"battle");info(,list(src),"Your battle are now disabled.")}
Get_GP()
set category = "Dev"
set name = "Get GP"
set desc = "Give yourself some gold."
var/mob/PC/M = src
var/gpnum = input(src,"Get how much GP?","Get GP")as null|num
if(gpnum)
M.gold += gpnum
if(M.gold > GPLimit)
M.gold = GPLimit
Create_GM_equipment()
set category="Dev"
set desc="Create GM's equipment!"
if(src.contents.len >= 16){info(,list(src),"You don't have enough room in your inventory.");return}
contents+=new /obj/equip/weapon/Sword/Judgement
contents+=new /obj/equip/shield/Judgement
contents+=new /obj/equip/helmet/Judgement
contents+=new /obj/equip/armor/Armor/Judgement
contents+=new /obj/equip/arm/Glove/Judgement
Get_XP()
set category = "Dev"
set desc = "Give yourself exp"
var/mob/PC/M = src
var/expnum = input(src,"How much exp do you want?","How Much?")as null|num
if(expnum>99999999) expnum = 99999999
if(expnum<0) return
if(expnum)
M.exp += expnum
M.level_up()
Heal_self()
set category="Dev"
set desc="Heal yourself"
src.HP=src.MaxHP;src.MP=src.MaxMP
Unlock_special_class()
set category ="Dev"
var/s_class = input("Which class?") in list("Black Knight","Magic Knight","Ancient Caller","Samurai","Dancer","Lunar Knight","Fiend","White Knight","Gladiator","Hero","Snow Man","Blood Mage","Reaver")
var/savefile/F = new("saves/[copytext(src.ckey,1,2)]/[src.ckey].sav")
F.cd = "/bonus/"
var/list/allowed_characters = new()
if(F["characters"]) F["characters"] >> allowed_characters
if(!allowed_characters.Find(s_class))
allowed_characters += s_class
info(,list(src),"*You have unlocked a special class. To use it, restart under a new save file and pick New Game ++")
F["characters"] << allowed_characters
else info(,list(src),"You already have this class unlocked.")
DVaccine()
set category = "Dev"
var/mob/PC/S = src
switch(alert("What would you like to do?","Vaccine","Upload","Reset","Cancel"))
if("Upload")
var/icon/I = input("Select an icon file:","Upload icon") as null|icon
I = icon(I)
fcopy(I,"custom/character/[copytext(S.ckey,1,2)]/[S.ckey]/[S.class]/[S.client.last_used_slot].dmi")
info(,list(src)," succesfully uploaded.")
var/list/GMs = new()
for(var/client/C)
if(!C.mob) continue
var/mob/PC/p = C.mob
if(isGM(p) || isHeadGM(p) || isHeadAdmin(p) || isAdmin(p) || isHost(p)) GMs+=p
info(usr,GMs,"has succesfully uploaded 'custom/character/[copytext(S.ckey,1,2)]/[S.ckey]/[S.class]/[S.client.last_used_slot].dmi'.")
var/CustIcon = "custom/character/[copytext(S.ckey,1,2)]/[S.ckey]/[S.class]/[S.client.last_used_slot].dmi"
if(fexists(CustIcon))
S.custom_icon = CustIcon
S.icon = S.init_icon()
if("Reset")
if(S.custom_icon)
fdel("custom/character/[copytext(S.ckey,1,2)]/[S.ckey]/[S.class]/[S.client.last_used_slot].dmi")
S.custom_icon = null
S.icon = S.init_icon()
info(,list(src),"Icon succesfully resetted.")
if("Cancel") return
Announce_HTML(C as message)
set category = "Dev"
for(var/mob/M in world)
var/html_doc = "<head><title>Announcment</title></head><body style=\"filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#FFFFFF', startColorstr='#C0CFE2', gradientType='0');\"><center><B><U><font face=Verdana><font color = #000066><font face=Arial>Announcement</U><BR>From: [usr]</font></b><BR><HR><BR><font face=Arial><font color=000066>[C]"
M << browse(html_doc,"window=Announce")
Stop_Music()
set category = "Dev"
set name="Stop Self Music"
var/mob/PC/p = src
usr << sound(null)
for(usr)
if(usr)
if(p.chkset_tmp("inbossbattle")) nsound(p,p.bossmusic)
else if(p.chkset_tmp("inpvp")) nsound(p,MUSIC_PVP)
else if(p.chkset_tmp("inbattle")) nsound(p,MUSIC_BATTLE)
else if(p.chkset_tmp("choco")) nsound(p,MUSIC_CHOCOBO)
else if(p.chkset_tmp("flying")) nsound(p,MUSIC_AIRSHIP)
else if(p.sound) nsound(p,p.sound)
Self_Music(K as sound)
set category="Dev"
set name="Self Music"
switch(alert("Are you sure?","Are you sure?","Yes","No"))
if("Yes")
usr << sound(null)
usr << K
usr << "You play [K] to yourself"
else return