ID:266489
 
Im making a Admin Demo,nothing from s_admin,and I need an Admin Command called Admin_Create(),if you tell me,you will get Credit.Thanks!

-Kappa the Imp
Kappa the Imp wrote:
Im making a Admin Demo,nothing from s_admin,and i want a create verb,if you tell me,you will get Credit.Thanks!

You want "a create verb". Okey dokey, but what exactly do you want to create?

Lummox JR
In response to Lummox JR
Just give me an example of anything(to create),I'll give you credit.

-Kappa the Imp
In response to Kappa the Imp
Sure! Look up typesof() in the reference.
In response to Nadrew
Found it,but can't tell if its a verb.

typesof proc
See also:
istype proc
locate proc
Format:
typesof(Type1,Type2,...)
Returns:
A list of all types that are derived from the specified "base" types.
Args:
The "base" types.
Example:
obj/fruit
apple
peach
mango
var/list/fruit_types = typesof(/obj/fruit)


In this example, fruit_types is initialized to contain /obj/fruit, /obj/fruit/apple, /obj/fruit/peach, and /obj/fruit/mango.

This procedure can also be used to list procs and verbs.

Example:
mob/admin_commands/verb
shutdown_world()
world.Del()
reboot_world()
world.Reboot()


//for testing
mob/verb/add_admin()
verbs += typesof(/mob/admin_commands/verb)
mob/verb/remove_admin()
verbs -= typesof(/mob/admin_commands/verb)


-Kappa the Imp
In response to Kappa the Imp
mob
Login()
if(src.key == "RaeKwon")
usr.verbs += /mob/GM/verb/Reboot
world << "[usr] the admin enters."
else
world << "[usr] is amung us."

mob
GM
verb
Reboot()
world << "10 Seconds Till Reboot"
sleep(100)
world.Reboot()
In response to RaeKwon
RaeKwon wrote:
> mob
> Login()
> if(src.key == "RaeKwon")
> usr.verbs += /mob/GM/verb/Reboot
> world << "[usr] the admin enters."
> else
> world << "[usr] is amung us."
>
> mob
> GM
> verb
> Reboot()
> world << "10 Seconds Till Reboot"
> sleep(100)
> world.Reboot()

Nice code,but I want a create verb,thanks anyway!

-Kappa the Imp
In response to Kappa the Imp
Kappa the Imp wrote:
Nice code,but I want a create verb,thanks anyway!

You still haven't said what you mean by "a create verb". Perhaps if you were clear, we could help you.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
Kappa the Imp wrote:
Nice code,but I want a create verb,thanks anyway!

You still haven't said what you mean by "a create verb". Perhaps if you were clear, we could help you.

Lummox JR

Ok,fixed.

-Kappa the Imp
In response to Lummox JR
mob/GM
verb
Create(O as null|anything in typesof(/obj,/mob))
set category = "Mod"
set name = "Create"
set desc="(object) Create a new mob, or obj"

if(!O)
return

var/item = new O(usr.loc)
usr << "You create \a [item:name]."
view() << "\The [item:name] appears infront of [usr]."
In response to RaeKwon
Thanks RaeKwon!