ID:143897
Jun 5 2007, 5:42 am
|
|
mob/Login() // Lets check to see if the players who login are a GM or not. ..() // Here we do the default procedure if(usr.key == "DDOGGY" || usr.key == "DDOGGY") // Lets look up a key so we can give out GM verbs usr.verbs += /mob/Admin/verb/Delete // Lets add this verb to the GM usr.verbs += /mob/Admin/verb/Delete1 // Lets add this verb to the GM usr.verbs += /mob/Admin/verb/Delete2 // Lets add this verb to the GM usr.verbs += /mob/Admin/verb/Teleport // Lets add this verb to the GM usr.verbs += /mob/Admin/verb/Big_Boot // Lets add this verb to the GM usr.verbs += /mob/Admin/verb/Create // Lets add this verb to the GM usr.verbs += /mob/Admin/verb/Summon // Lets add this verb to the GM usr.verbs += /mob/Admin/verb/Go_To_Mob // Lets add this verb to the GM usr.verbs += /mob/Admin/verb/Go_To_Obj // Lets add this verb to the GM usr.verbs += /mob/Admin/verb/Boot // Lets add this verb to the GM usr.verbs += /mob/Admin/verb/Server_End // Lets add this verb to the GM usr.verbs += /mob/Admin/verb/Reboot // Lets add this verb to the GM usr.verbs += /mob/Admin/verb/AddGM //Lets add this verb to the GM usr.verbs += /mob/Admin/verb/RemoveGM //Lets add this verb to the GM else // If the players key is not the same as the persons key which is looked up above then the player does not get the GM verbs. ..() // Here we do the default procedure mob/Admin/verb Delete(O as obj in oview()) // Lets delete an object in your view set category = ("Administration") // This sets the verb to the "Administration" panel set name = ("Delete Object") // We name this "Delete" verb as "Delete Object" as you will be deleting objects via this verb. del(O) // We, well you have now deleted the object you choose to delete. Delete1(mob/M as mob in oview()) // Lets delete a mob in your view set category = ("Administration") // This sets the verb to the "Administration" panel set name = ("Delete Mob")// We name this "Delete" verb as "Delete Mob" as you will be deleting objects via this verb. del(M) // We, well you have now deleted the mob you choose to delete. Delete2(T as turf in oview()) // Lets delete a turf in your view set category = ("Administration") // This sets the verb to the "Administration" panel set name = ("Delete Turf")// We name this "Delete" verb as "Delete Turf" as you will be deleting objects via this verb. del(T) // We, well you have now deleted the turf you choose to delete. Create(O as null|anything in typesof(/obj,/mob,/turf)) // Lets create some things for fun set category = ("Administration") // This sets the verb to the "Administration" panel var/item = new O(usr.loc) // This var lets created a new "O" in the types of "/obj", "/mob" and "/turf" then puts it on the location of the creater -- You usr << "You create [item:name]." // This tells you which item you created and its name. Teleport() // Lets go to a certain "location" in the world set category = ("Administration") // This sets the verb to the "Administration" panel var/xx=input("What x coordinate?","Teleport")as num // Here we choose which "X" coordinate you wish to go to var/yy=input("What y coordinate?","Teleport")as num // Here we choose which "Y" coordinate you wish to go to var/zz=input("What z coordinate?","Teleport")as num // Here we choose whici "Z" coordinate you wish to go to usr.loc=locate(xx,yy,zz) // This takes you to the location you specified Summon(M as mob in world) // Lets bring a player/mob to us set category = ("Administration") // This sets the verb to the "Administration" panel M:loc = usr.loc // This brings the player/mob to us Go_To_Mob(M as mob in world) // Lets go to a player/mob set category = ("Administration") // This sets the verb to the "Administration" panel usr.loc = locate(M:x,M:y+1,M:z) // We are taken to the player/mob you choose and get put above the player/mob Go_To_Obj(O as obj in world) // Lets go to an object in the world set category = ("Administration") // This sets the verb to the "Administration" panel usr.loc = locate(O:x+1,O:y,O:z) // This takes is to the object you choose to go to Big_Boot(M as mob in world) // -- This is the same as "Boot". set category = "Administration"// -- This is the same as "Boot". if(M:client)// -- This is the same as "Boot". if(M:key == "Mellifluous")// -- This is the same as "Boot". usr << alert("You can't boot Mellifluous")// -- This is the same as "Boot". else// -- This is the same as "Boot". world << "\black The almighty [usr] glares at [M] and grins as [M] spontaneously combusts!"// -- This is the same as "Boot". M:Logout()// -- This is the same as "Boot". del(M)// -- This is the same as "Boot". Boot(M as mob in world) // Boot verb -- Lets boot the troublesome fellows. set category = "Administration" // This sets the verb to the "Administration" panel if(M:client) // This checks to see a specific character in the game, client wise. if(M:key == "Mellifluous") // This checks to see if a certain character is online usr << alert("You can't boot Mellifluous")// This alerts the user and tells them that they cannot boot whoever the character is that is looked up (For example, I am the person looked up, so therefore I cannot be booted.) else // If the player looked up is not the one being booted we go on from here world << "[usr] uses the Universal Cannon on [M] and with the extreme power of that move [M] is destroyed from this world!" // We tell the world that the player is booted. M:Logout() // We logout the player here del(M) // We delete the players traces/icon here. Server_End() // Sever end verb set category = "Administration" // This sets the verb to the "Administration" panel world << "\yellow Server ending in ten seconds..." // This tells the world that the server is ending in 10 seconds sleep(50) // Now this lets 5 seconds pass world << "\yellow Server ending in five seconds..." // This tells the world that the server is ending in 5 seconds world << "\yellow Server Ended" // This tells the world that that server has ended for(var/mob/player/M in world) // This checks for all the mobs/players in the world M.Logout() // This logs out the mobs/players in the world Reboot() // Reboot verb set category = "Administration" // This sets the verb to the "Administration" panel world << "\yellow Reboot!" //This tells the world that there is a Reboot world.Reboot() // This reboots the world AddGM(var/M as mob in world) //Add a GM set category = "Administration" if(M:client)// This checks to see a specific character in the game, client wise. if(M:key == "DDOGGY" || M:key == "DDOGGY") //If one of the following Keys is matched then the use is alerted by the next sentence. usr << alert("[M] is already a GM.") // If one of the above Keys is matched then the user is alerted by this sentence. else //If one of the Keys isn't matched then the following will be used. var/check = input(src,"Are you sure you want to make [M] a GM?") in list ("Yes","No") //Ask yourself if you want to add a certain GM. switch(check)//Switch between the 'Yes' or 'No' option by bringing up a choice box to choose from. if("Yes")//If 'Yes' is chosen the player will recieve the following GM verbs. M:verbs += /mob/Admin/verb/Delete M:verbs += /mob/Admin/verb/Delete1 M:verbs += /mob/Admin/verb/Delete2 M:verbs += /mob/Admin/verb/Teleport M:verbs += /mob/Admin/verb/Big_Boot M:verbs += /mob/Admin/verb/Create M:verbs += /mob/Admin/verb/Summon M:verbs += /mob/Admin/verb/Go_To_Mob M:verbs += /mob/Admin/verb/Go_To_Obj M:verbs += /mob/Admin/verb/Boot M:verbs += /mob/Admin/verb/Server_End M:verbs += /mob/Admin/verb/Reboot M << alert("[usr] has just granted you the skills of a GM.") //The player is alerted that the user made him/her a GM. usr << alert("You have just granted [M] the skills of a GM.") //The user is alerted that he/she made the player a GM. if("No")//If 'No' is chosen then the player will not recieve the GM skills. usr << alert("You chose not to grant [M] the skills of a GM.") //Makes you know that you never let the player have GM skills. RemoveGM(var/M as mob in world) // Remove a GM set category = "Administration" var/check = input(src,"Are you sure you want to remove [M]s GM skills?") in list ("Yes","No") //Ask yourself if you want to remove a certain GM. switch(check)//Switch between the 'Yes' or 'No' option by bringing up a choice box to choose from. if("Yes")//If 'Yes' is chosen, a check is made to make sure that one of the following Keys is not matched. if(M:key == "Mellifluous" || M:key == "Your Key Here")//If one of these Keys are matched then the user gets told the next sentence. usr << alert("You cannot remove [M]s skills.")//The user gets told he/she cannot remove the certain matched Key. M << alert("[usr] tried to remove your skills.")//The person who owns the matched key is told that user of this verb tried to remove his/her GM skills. if(usr.key == M:key)//This checks to see if the user is attempting to remove their own GM Skills. usr << alert("You cannot remove your own GM Skills!")//This tells the user that they cannot remove their own GM Skills. else//If one of the Keys are not matched then the user has successfully removed a GMs skills. M:verbs -= /mob/Admin/verb/Delete M:verbs -= /mob/Admin/verb/Delete1 M:verbs -= /mob/Admin/verb/Delete2 M:verbs -= /mob/Admin/verb/Teleport M:verbs -= /mob/Admin/verb/Big_Boot M:verbs -= /mob/Admin/verb/Create M:verbs -= /mob/Admin/verb/Summon M:verbs -= /mob/Admin/verb/Go_To_Mob M:verbs -= /mob/Admin/verb/Go_To_Obj M:verbs -= /mob/Admin/verb/Boot M:verbs -= /mob/Admin/verb/Server_End M:verbs -= /mob/Admin/verb/Reboot M << alert("[usr] has just taken away your GM skills.") //The player gets told that he/she has had their GM Skills removed by the user. usr << alert("You have just taken away [M]s GM skills.") //The user gets told that he/she has successfully removed the other players GM Skills. if("No")//If 'No' was chosen then the player will not have their GM Skills removed. usr << alert("You chose to leave [M] with the GM skills.") //Makes you know that you never removed the GMs Skills. now the errors are M undefined var M Logout undefined type and heres the warning M variable defined but not use I have also found out that the warning and the first error are both part of the same thing plz help</<> |
Wow, just copy/paste a whole junk of code with huge comments, complete ignore the already added DM code tags, 99% probability you do not understand any of it, and then ask us to solve it.
Eurrr. Step 1) Scrap that code. It's ugly, it's unefficient. Step 2) Check out the DM Guide to get a basic understanding of the language, at least. Step 3) Search in the Library Section, there are plenty of ways to create an admin system. |
Try to use somthing simple like that, it looks alot better.
~Grand~