ID:149750
 
Login()
. = ..()
AddGMVerbs()
src.CreateCharacter()

proc/CreateCharacter()

var/prompt_title = "New Character"
var/help_text = "What do you want to name the character?"
var/default_value = key
var/char_name = input(src, help_text, prompt_title, default_value) as null|text

if (!char_name)

client.base_ChooseCharacter()
return

var/ckey_name = ckey(char_name)
var/list/characters = client.base_CharacterNames()
if (characters.Find(ckey_name))
alert("You already have a character named that! Please choose another name.")
src.CreateCharacter()
return

var/list/sex = list("Male", "Female")
help_text = "What sex?"
default_value = "Male"
var/char_sex = input(src, help_text, prompt_title, default_value) in sex



switch(char_sex)
if("Male")
var/list/male_class = list("Priest", "Soldier", "Thief", "Wizard")
help_text = "What class do you desire?"
default_value = "Priest"
var/choice_a_3 = input(src, help_text, prompt_title, default_value) in male_class



if(choice_a_3 == "Priest")
usr.hp = rand(14,19)
usr.maxhp = usr.hp
usr.mp = rand(1,9)
usr.maxmp = usr.mp
usr.magic = 1
usr.strength = rand(3,5)
usr.defense = rand(4,6)
usr.speed = rand(4,7)

of course i know some problems to this, but the bug i don't understand is i can't assign the priest class its mob without not having attributes. on that note, not having a mob means i have attributes, but obviously, no mob