ID:145003
 
Code:
switch(input("Select Sever Army","Server Army")in list("Warrior","Defender"))
if("Warrior")
world.mob = /mob/warrior

mob
warrior
verb
Attack()


Problem description:
I am trying to set the world's mob types to a specific type,so they have specifi verbs of that mob type.Problem is,world.mob = /mob/warrior,dosen't work sice all the mopbs would have to call the Login() proc again to have that mob type.I'm trying to find a way to set the mobs of the world's types to Warrior another,more easier way.Any help would be much appreciated,thnx
You cannot change an object's type. Once an object exists, its type is constant.

You could delete the existing mobs and replace them with new mobs of the appropriate type.
In response to Loduwijk
What Lodu said. However, lets say you just want the people to get certain verbs, than you want to do something like this:
if("Fighter")
for(var/mob/M in world)
M.verbs+=typesof(/mob/fighter/verb)
M.verbs-=typesof(/mob/weakling/verb)

if("Weakling")
for(var/mob/M in world)
M.verbs-=typesof(/mob/fighter/verb)
M.verbs+=typesof(/mob/weakling/verb)


- GhostAnime
In response to GhostAnime
Yeah thanks Ghost.I'll use that