var/mob/character
mob
Login()
src.loc = locate(47,47,2)
..()
obj/Start//makes the name
icon = 'archangel.bmp'//the pic file
density = 1
Click()//you click it it'll do the following below
usr.loc=locate(9,9,1)
switch(input("Continue Or Begin?","New or Load?") in list ("New","Load","Quit"))
if("New")
usr.ChooseCharacter()
if("Load")
usr.LoadCharacter()
if("Quit")
usr.Exit()
mob
proc/ChooseCharacter()
usr << "<font size = 3><b><font color=blue>Welcome to Elemental Warfare.(or i think it is the name is still out there). If you find any bugs or have any ideas contact me. Thanks"
world << "<font size = 2><b><font color=blue><b>[usr] has logged in!"
char_name
var/user_name = input("What would you like your name to be? Please choose a Role Playing name. That means no numbers and also no HTML in your name.","Character Creation",usr.key)as text
if(!user_name)
goto char_name
if(lentext(user_name) > 20)
usr <<"Name too long."
goto char_name
if(lentext(user_name) < 2)
usr <<"Name too short."
goto char_name
for(var/N in un_wanted_names && html)
if(findtext(user_name,N))
alert("That name is not allowed.","Name")
goto char_name
else
usr.name = html_encode(user_name)
world<<"<font size = 2><b><font color=blue>[name] has join the world!"
switch(input("Please choose a Gender.","Gender") in list("Male","Female"))
if("Male")
switch(input("What Class would you like to be?","Class")as null|anything in list("Fire","Water","Wind"))
if("Fire")character=new/mob/characters/Male/Fire()
if("Water")character=new/mob/characters/Male/Water()
if("Wind")character=new/mob/characters/Male/Wind()
else
del(usr.client.mob)
if("Female")
switch(input("What Class would you like to be?","Class")in list("Fire","Water"))
if("Fire")character=new/mob/characters/Female/Fire()
if("Water")character=new/mob/characters/Female/Water()
else
del(src)
character.name = usr.name
src.client.mob = character
usr.loc=locate(9,9,1)
mob/characters
Male
Fire
icon='Fire.dmi'
Element = "Fire"
Gender = "Male"
Water
icon='Water.dmi'
Element = "Water"
Gender = "Male"
Wind
icon='Wind.dmi'
Element = "Wind"
Gender = "Male"
Female
Fire
icon='Fire.dmi'
Element = "Fire"
Gender = "Female"
Water
icon='Water.dmi'
Element = "Water"
Gender = "Female"
var/list/html = list("<",">","font","size")
var
list
un_wanted_names = list("")
name_length
maximum_name_length_amount = 20
Problem description:
After you make your guy you go back to the login page. And it keeps happening over on over again.
On the other hand, you have a lot of usr abuse in procs (such as ChoosingCharacter() usr is not always the player who will be choosing the character. Also, input() and alert() by default send the boxes to "usr" so you will have to specify who to send the box to. (look them up for information about that)
You also have unneeded goto statements when you can easily use a while statement to catch unwanted inputs.
~~> Unknown Person