Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Need to make a variable called spell_level and make a verb
- that changes it. The spell_level should be in effect with
- all spells.
- */
- /*************************
- ** Regular GM Commands **
- *************************/
- var/already_clicked
- mob //Recently revised on 04/16/2014. The last revision was on 10/16/06,
- GM
- verb
- /*
- Announce something to everyone in the world
- */
- announce(msg as text)
- set desc = "Announce something to the world."
- set category = "GM verbs"
- world << "<font color =blue>([usr.name] announces): [msg]"
- /*
- Inform everyone in the world an important message
- */
- world_inform(msg as text)
- set desc = "Inform the world about something."
- set category = "GM verbs"
- world << "<center><font color =green><b>Game Moderator [usr.name] would like to inform:</b></center>\n\n<center><font color =green><TT>[msg]</TT></center>"
- /*
- Change your density so you can walk through walls, walk on water, etc.
- */
- change_density()
- set desc = "Change your density."
- set category = "GM verbs"
- if(density)
- density = 0 //doesn't matter, usr.density or density
- usr << "You change your density to 0." //maybe a return statement below this?
- else
- density = 1
- usr << "You change your density to 1." //maybe a return statement below this?
- /*
- Change your character's alias in-game
- */
- change_your_name()
- set desc = "Change your name."
- set category = "GM verbs"
- usr.names = input(usr,"What would you like your name to be changed to?","Name change",usr.names)
- usr.name = usr.names
- usr << "You changed your name to [usr.names]."
- /*
- Change someone else's alias in-game
- */
- change_mobs_name()
- set desc = "Change the name of someone."
- set category = "GM verbs"
- set src in view(1)
- if(src == usr)
- return
- else
- var/their_new_name = input(usr,"You are changing [src.name]'s name.",src.name) // this might need to be set to src.names instead to work
- usr << "You changed [src.name]'s name to [their_new_name]."
- src.name = their_new_name
- /*
- Get a list of everyone that is playing at the moment
- */
- who() // revised 04/16/2014
- var/tmp/count_mobs = 0 //does this variable have to be temporary?
- set desc = "Who is in world?"
- set category = "GM verbs"
- if(already_clicked)
- return
- else
- src << "<font color =yellow><TT>-----People currently in World-----</TT></font>"
- var/mob/M
- for(M in world)
- {
- if(!M.key) continue// if the mob doesn't have a key, continue
- else // if the mob does have a key
- if(M.GM_powers) // if the mob has key and is a GM
- if(M.key == MASTER_KEY) // if the GM is Barry
- count_mobs++
- usr << "<font color =yellow>(</font><font color =blue><b>MGM</b></font><font color =yellow>)</font><font color =blue> [M.names]</font> Level <font color = green>\[</font><font color =gray>[M.level]</font><font color = green>\]</font><font color =purple>{</font>[M.key]<font color = purple>}</font>"
- continue
- else // if the GM is not Barry
- count_mobs++
- usr << "<font color =yellow>(</font><font color =blue><b>GM</b></font><font color =yellow>)</font><font color =blue> [M.names]</font> Level <font color = green>\[</font><font color =gray>[M.level]</font><font color = green>\]</font><font color =purple>{</font>[M.key]<font color = purple>}</font>"
- continue
- else if(!M.GM_powers) // if they aren't a GM
- count_mobs++
- usr << "<font color =blue>[M.names]</font> Level <font color =gray>[M.level]</font><font color =purple>{</font>[M.key]<font color =purple>}</font>"
- continue
- }
- src << "Total player count: [count_mobs]" // all of this
- already_clicked = 1 // was at the bottom of the last
- sleep(50) // else if statement before in the for loop
- already_clicked = 0
- count_mobs = 0
- return
- /*
- Lower your own health (mostly for testing purposes)
- */
- lower_health() // revised 04/16/2014
- set desc = "Put your health to a lower state."
- set category = "GM verbs"
- while(1)
- {
- var/new_health = input(usr,"Your health?","Set Health",usr.maxHealth) as num
- if(new_health <= 0)
- usr << "Your health can't be a negative integer."
- continue
- if(new_health > usr.maxHealth)
- usr << "You're trying to cheat? You're entitled to playing this game legit too."
- continue
- else
- new_health = round(new_health)
- usr.health = new_health
- usr << "You set your health to [new_health]."
- break
- }
- /*
- Teleport to a mob in the world. This includes players.
- */
- teleport(var/M as mob in world)
- set desc = "Go to the location of someone."
- set category = "GM verbs"
- input(usr,"Who would you like to teleport to?","Teleport",M)
- //M = teleported_to
- usr << "[M]." //debugging code
- if(M == usr)
- usr << "You can not teleport to yourself."
- usr << "[M]."
- return
- else
- if(de_teleportx && de_teleporty && de_teleportz) // may need some testing
- teleported = 1
- usr << "[teleported]"
- usr.loc = get_step(M,SOUTH)
- usr << "You appear infront of [M]."
- M << "[usr.name] teleports infront of you."
- else
- de_teleportx = x
- de_teleporty = y
- de_teleportz = z
- teleported = 1
- usr << "[teleported]"
- usr.loc = get_step(M,SOUTH)
- usr << "You appear infront of [M]."
- M << "[usr.name] teleports infront of you."
- /*
- Send yourself back to the original location you were at before teleporting.
- */
- de_teleport() // may need some more testing
- set desc = "Go back to your original position."
- set category = "GM verbs"
- usr << "[teleported]"
- if(teleported)
- usr.loc = locate(de_teleportx, de_teleporty, de_teleportz)
- usr << "You teleported back to your first location."
- usr.de_teleportx = 0
- usr.de_teleporty = 0
- usr.de_teleportz = 0
- teleported = 0
- else
- return
- /*
- Summon a mob or a player in the world to your location.
- */
- summon(var/M as mob in world) //tested and looks good
- set desc = "Summon someone."
- set category = "GM verbs"
- input(usr,"Who would you like to summon?","Summon",M)
- src = M
- if(src == usr)
- usr << "You can not summon yourself."
- return
- else // might need some more testing
- src.already_summoned++
- usr << "[src.already_summoned]"
- if(src.already_summoned >= 2) // yet to be debugged
- //var/summon_again = input(usr,"This mob has already been summoned!","Again?") in list("Yes","No")
- //if(summon_again == "Yes")
- src.loc = get_step(usr,SOUTH)
- usr << "You summon [src.name]." // was M
- src << "You have been summoned by [usr.name]." // was M
- //if(summon_again == "No")
- //usr << "You choose not to summon mob again."
- //return
- return
- src.de_summonx = x
- src.de_summony = y
- src.de_summonz = z
- usr << "[de_summonx], [de_summony], [de_summonz]"
- src.summoned = 1
- src.loc = get_step(usr,SOUTH)
- usr << "You summon [src.name]." // was M
- src << "You have been summoned by [usr.name]." // was M
- /*
- Send the mob that you summoned back to their original location.
- */
- de_summon() //might need some more testing // if this stays this way, all mobs infront will be unsummoned
- set desc = "Send them back to their original position."
- for(var/tmp/M as mob in get_step(usr,usr.dir))
- set category = "GM verbs"
- //input(usr,"Who would you like to desummon?","Desummoning",M)
- src = M
- //usr << "[src.summoned]" // debugging code
- if(src.summoned)
- usr << "[de_summonx], [de_summony], [de_summonz]"
- src.loc = locate(src.de_summonx, src.de_summony, src.de_summonz)
- usr << "You desummoned [src.name]."
- src << "You have been placed back to your original location."
- src.summoned = 0
- src.already_summoned = 0
- else
- usr << "This mob has not been summoned."
- return
- /*
- Get the location of a mob in the world.
- */
- get_location(var/M as mob in world)
- set desc = "Get the location of someone."
- set category = "GM verbs"
- input(usr,"Whos location would you like to get?","Getting location",M)
- src = M
- usr << "[src.x], [src.y], [src.z]"
- /*
- Get a player's health in your current view.
- */
- get_health()
- set desc = "Get a mob's health."
- set category = "GM verbs"
- set src in view(1) // oview works for everyone else on screen besides yourself
- usr << "[src]'s health is at [src.health]."
- /*
- Mute a player in the world.
- */
- mute() // Revised 04/19/2014
- set desc = "Mute a player in the world."
- set category = "GM verbs"
- var/mob/MP
- var/muterList = list("Nevermind")
- var/listedMgmsOnly = 0
- for(MP in world) // cyle through actual player list
- if(MP.key)
- //if(MP.key == MASTER_KEY) // check if it's me ... I can't be muted
- //listedMgmsOnly++ // implement once this verb 100% works.
- //continue
- /*
- else if(MP.key in GMs) // check if it's a GM ... GMs can't be muted by eachother
- continue
- */
- muterList += MP
- continue
- else
- continue
- if(listedMgmsOnly && length(muterList) <= 1)
- src << "The only person(s) listed in this list are MGMs. You can not mute MGMs."
- listedMgmsOnly = 0
- return
- var/mob/whoToMute
- whoToMute = input(src,"Who would you like to mute?","Who to mute?") in muterList
- if(whoToMute.muted)
- src << "This person is already muted."
- return
- if(whoToMute == "Nevermind")
- src << "You decide to mute no one."
- return
- else if(whoToMute != "Nevermind")
- whoToMute.choiceOfMute = input(usr,"How long do you wish to mute this person?","Length of Mute") in list ("Seconds","Minutes","Hours","Days","Permanently","Nevermind")
- if(whoToMute.choiceOfMute == "Seconds")
- whoToMute.durationOfMute = input(usr,"How many seconds do you wish to mute [M]?","Seconds",whoToMute.durationOfMute) as num
- whoToMute.durationOfMute *= 10
- whoToMute << "You have been muted for [whoToMute.durationOfMute / 10] second\s."
- if(whoToMute.choiceOfMute == "Minutes")
- whoToMute.durationOfMute = input(usr,"How many minutes do you wish to mute [M]?","Minutes",whoToMute.durationOfMute) as num
- whoToMute.durationOfMute *= 600
- whoToMute << "You have been muted for [whoToMute.durationOfMute / 600] minute\s."
- if(whoToMute.choiceOfMute == "Hours")
- whoToMute.durationOfMute = input(usr,"How many hours do you wish to mute [M]?","Hours",whoToMute.durationOfMute) as num
- whoToMute.durationOfMute *= 36000
- whoToMute << "You have been muted for [whoToMute.durationOfMute / 36000] hour\s."
- if(whoToMute.choiceOfMute == "Days")
- whoToMute.durationOfMute = input(usr,"How many days do you wish to mute [M]?","Days",whoToMute.durationOfMute) as num
- whoToMute.durationOfMute *= 864000
- whoToMute << "You have been muted for [whoToMute.durationOfMute / 864000] day\s."
- if(whoToMute.choiceOfMute == "Permanently")
- whoToMute.durationOfMute = 1000000000000 * 75
- whoToMute << "You have been muted indefinately."
- if(whoToMute.choiceOfMute == "Nevermind")
- usr << "You decide to mute no one."
- return
- whoToMute.verbs -= /mob/verb/say
- whoToMute.muted = 1
- currentlyMuted += whoToMute
- del muterList
- overlays += image('overlayicons.dmi',icon_state = "Muted")
- sleep(whoToMute.durationOfMute) // this may need to be set to spawn
- whoToMute << "Your mute duration is over. You may now speak."
- whoToMute.verbs += /mob/verb/say
- overlays -= image('overlayicons.dmi',icon_state = "Muted")
- currentlyMuted -= whoToMute
- whoToMute.muted = 0
- unmute() // may need a bit more testing, but this was implemented on 5/20/2014
- set desc = "Unmute someone currently muted."
- set category = "GM verbs"
- var/mob/mutedPlayer
- var/station = ""
- if(length(currentlyMuted) > 1)
- mutedPlayer = input(usr,"Who do you wish to unmute?","Unmuting a player") in currentlyMuted
- if(mutedPlayer == "Nevermind")
- src << "You decide to unmute no one."
- return
- else
- if(mutedPlayer.key == MASTER_KEY)
- station = "MGM"
- else if(mutedPlayer in GMs)
- station = "GM"
- // add a yes or no switch alert here
- switch(alert(src,"Are you sure you want to unmute [mutedPlayer]?","Unmute [mutedPlayer]?","Yes","No"))
- if("Yes")
- mutedPlayer.muted = 0
- mutedPlayer.verbs += /mob/verb/say
- src << "You have unmuted [mutedPlayer]."
- mutedPlayer << "You have been unmuted by [station] [src]."
- mutedPlayer.overlays -= image('overlayicons.dmi',icon_state = "Muted")
- currentlyMuted -= mutedPlayer
- return
- else
- src << "You decide to unmute no one."
- return
- else
- src << "There is no one to unmute."
- return
- /*************************
- *** GM Global Vars **
- *************************/
- mob/var/muted = 0
- mob/var/choiceOfMute = 0
- mob/var/durationOfMute = 0
- var/client/keepAlerting = 1
- var/currentlyMuted = list("Nevermind")
- /*
- var/players = list("Nevermind")
- var/giverList = list("Nevermind") // these should be in the individual scopes but if
- var/takerList = list("Nevermind") // for some reason that doesn't work, reactivate
- var/muterList = list("Nevermind") // these. 05/20/2014
- client/New()
- players += src
- return ..()
- */
- obj
- trailexplosion
- icon = 'trailtoE.dmi'
- explosion
- icon = 'explosion.dmi'
- var/objects[0]
- world/New()
- var/M
- for(M in typesof(/obj, /mob/npc, /area))
- objects += new M
- objects += "Nothing"
- /*************************
- *** Mega GM Commands **
- *************************/
- mob
- MegaGM
- verb
- /*
- Make a player in the world a GM.
- */
- make_GM()
- set desc = "Give GM powers."
- set src in world
- var/mob/N
- var/giverList = list("Nevermind")
- for(N in world) // cyle through actual player list
- if(N.key)
- giverList += N
- continue
- else
- continue
- var/mob/whoToMake
- whoToMake = input(src,"Who will you make into a GM?","Who to make a GM?") in giverList
- if(whoToMake == "Nevermind")
- src << "You decide to make no one a GM."
- return
- if((whoToMake == src) && (whoToMake.key in GMs))
- src << "You're already a GM."
- return
- if((whoToMake != src) && (whoToMake.key in GMs))
- src << "This person already has GM powers."
- return
- if(!(whoToMake.key in GMs)) //might have to make a for loop saying for(M as mob in oview()) and make it so it
- set category = "GM verbs" //checks if they have a key or not to establish if they're able to receive
- /*
- if((whoToMake == src.key) && !(whoToMake in GMs)) //the GM powers or not. Same applies for the Take_GM verb except
- src << "You make yourself a GM." //vice-versa.
- src.client.verbs += typesof(/mob/GM/verb)
- whoToMake.GM_powers = 1*/
- //else
- switch(alert(src,"Will you make [whoToMake] a GM?","Make GM","Yes","No"))
- if("Yes")
- whoToMake.verbs += typesof(/mob/GM/verb)
- whoToMake.GM_powers = 1
- whoToMake << "You have been given GM powers."
- GMs += whoToMake.key
- whoToMake << "Your GM powers are at: [whoToMake.GM_powers]"
- return
- /*
- var/mob/O
- for(O in world)
- if(O.key == whoToMake)
- O.verbs += typesof(/mob/GM/verb)
- O.GM_powers = 1
- O << "You have been given GM powers."
- GMs += O.key
- O << "Your GM powers are at: [O.GM_powers]"
- break
- if(!O.key || (O.key != whoToMake))
- continue*/
- if("No")
- src << "You decide not to make [whoToMake] a GM."
- return
- /*
- Take from a player in the world their GM powers.
- */
- take_GM()
- set desc = "Take the GM powers away."
- var/mob/N
- var/takerList = list("Nevermind")
- for(N in world) // cyle through actual player list
- if(N.key)
- takerList += N
- continue
- else
- continue
- var/mob/whoToTake
- whoToTake = input(src,"Who will you take GM from?","Who to take GM?") in takerList
- if(whoToTake == "Nevermind")
- src << "You decide to take no ones's GM powers."
- return
- if(whoToTake.key in GMs) // if this doesn't work, try src.GM_powers == 1
- set category = "GM verbs"
- set src in world
- if(whoToTake == src)
- switch(alert(src,"Do you want to take away your own GM power?","Taking your GM powers ...","Yes","No"))
- if("Yes")
- src.verbs -= typesof(/mob/GM/verb)
- src.GM_powers = 0
- src << "Your GM powers have been taken away."
- src << "Your GM powers are at: [src.GM_powers]"
- if(src.key in GMs)
- GMs -= src.key
- return
- if("No")
- src << "You decide not to take away your own GM powers."
- return
- else
- switch(alert(src,"Do you want to take away [whoToTake]'s GM powers?","Taking [whoToTake]'s GM powers ...","Yes","No"))
- if("Yes")
- whoToTake.verbs -= typesof(/mob/GM/verb)
- whoToTake.GM_powers = 0
- src << "You have taken away [whoToTake]'s GM powers."
- whoToTake << "Your GM powers have been taken away."
- if(whoToTake.key in GMs)
- GMs -= whoToTake.key
- return
- if("No")
- src << "You decide not to take away your own GM powers."
- return
- else
- src << "This person does not have GM powers."
- return
- /*
- Bless all of the players in the world so that their HP and Mana fully replenish.
- */
- world_blessing()
- set category = "GM verbs"
- set desc = "Bless the people of the world with an aura of healing refreshment."
- var/mob/S
- for(S in world){
- if(!S.key) continue
- else
- S.overlays += image('blessed.dmi')
- S.health = S.maxHealth
- if(S == usr)
- S << "<font color = yellow>You bless yourself.</font>"
- else
- S << "<font color = yellow>A <b>GM</b> has blessed you.</font>"
- sleep(10)
- S.overlays -= image('blessed.dmi')
- S << "<font color = yellow>You are now at full health.</font>"
- }
- /*
- Create an object.
- */
- create()
- set category = "GM verbs"
- set desc = "Create something that you want."
- var/create = input(usr,"Create something at will.","What to create?") in objects //was commented out
- if(create == "Nothing")
- usr << "You created nothing."
- return
- else
- usr << "You created \an [create]."
- new create:type(usr.loc)
- /*
- Destroy anything in your view.
- */
- destroy(var/T as area|turf|obj|mob in oview()) //view() for self and everything, oview() for everything else besides you
- set category = "GM verbs"
- set desc = "Destroy something."
- missile(/obj/trailexplosion, usr, T)
- usr << "You destroyed [T]."
- sleep(10)
- T:overlays += image('explosion.dmi') //look for a better explosion icon
- spawn(10)
- del T
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement