ID:165118
 
Hey,
Can someone please tell me hwo to make a login code...
I have one..
But its not very good....

Here:

mob
Login()
var/inputname = input("Please input a desired name.","Name",usr.key) as text //Input Name.
if(inputname == null||inputname == ""||inputname == " ") //Check for "nameless" people.
usr.name = usr.key
else
usr.name = html_encode(inputname)
if(usr.key=="BEVAN") world << "<b><font color=blue>Look Busy! Because The Owner Has Enterd The World!"
src.loc=locate(50,1,1)
var/race = input("What do you want to be?") in list ("Eevee","Umbreon","Flareon","Rhydon","Vaporeon","Espeon","Jolteon")/*The list pops-up these names*/
switch(race) //Eevee Umbreon Flareon Rhydon Vaporeon Espeon Jolteon
if("Eevee")
icon = 'Mobs.dmi'
icon_state = "eevee"
if("Umbreon")
icon = 'Mobs.dmi'
icon_state = "umbreon"
if("Flareon")
icon = 'Mobs.dmi'
icon_state = "flareon"
if("Rhydon")
icon = 'Mobs.dmi'
icon_state = "rhydon"
if("Vaporeon")
icon = 'Mobs.dmi'
icon_state = "vaporeon"
if("Espeon")
icon = 'Mobs.dmi'
icon_state = "espeon"
if("Jolteon")
icon = 'Mobs.dmi'
icon_state = "jolteon"
src.verbs += typesof(/mob/Build/verb/)
world<<"<b>[usr] Has Loged In"

The login code works.
No problems,
BUT!
I want to have trainers in there too.
In a seperate part.
So when it logs in,
I want it to ask
"Trainer" Or "Pokemon"
Something like that,
When they click trainer, It brings up a list of trainers, If they click Pokemon, it brings up the list of my pokemon to choose from,
Can someone eidt it or something?
I am at a loss >.<
And im soo confused and frustrated!!!

Thanks.

- Bevan
That's easy, you should be able to answer that on your own (if that really was the code you made). Just make another imput var that asks if you want to be pokemon or trainer. From there, 'if(input=="Trainer)' under that, give them all the options for trainers. I'm going to trust that you did that code, so it should be easy. If you can make the option of what pokemon to choose, just put an option over that one.
In response to Beatmewithastick
Ah, I se!
yes, I did make the code myself,
Just made the code a while ago and ive forgotten how to code login (Sounds real nooby) Since ive been coding GM systems for people and Building verbs D;

Anyway,

Thanks!

- Bevan