There are no compiling error or warnings but it doesnt even work.
world
name = "Destiny: The Legacy"
mob/Logout()
world << "[src] has logged out!"
del(src)
client/proc/SaveMob()
var/firstletter=copytext(src.ckey, 1, 2)
var/savefile/F = new("players/[firstletter]/[src.ckey].save")
var/char_ckey = cKey(src.mob.name)
F["/[ckey]/[char_ckey]"]<<src.mob
client/proc/LoadMob(char_ckey)
var/firstletter=copytext(src.ckey, 1, 2)
var/savefile/F = new("players/[firstletter]/[src.ckey].sav")
F["/[ckey]/[char_ckey]"]>>src.mob
mob/other/choosing_character
Login()
src.ChooseCharacter()
proc
ChooseCharacter()
var/list/characters = src.CharacterList()
var/newCharacterChoice = "New Character"
var/DeleteCharacterChoice = "Delete Character"
var/list/menu = new()
menu += characters
menu += newCharacterChoice
menu += DeleteCharacterChoice
var/result = input("Character Creation", "Destiny: The Legacy") in menu
if (result == newCharacterChoice)
src.CreateNewCharacter()
if (result == DeleteCharacterChoice)
alert("Sorry, Delete Character does not yet work.")
src.ChooseCharacter()
else
var/success = src.client.LoadMob(result)
if (success)
del(src)
else
alert("Failed to read.")
src.ChooseCharacter()
CharacterList()
var/firstletter=copytext(src.ckey, 1, 2)
var/savefile/F = new("players/[firstletter]/[src.ckey].sav")
F.cd = "/[ckey]"
var/list/characters = F.dir
return characters
mob/other/choosing_character/proc/CreateNewCharacter()
var/prompt_title = "Character Creation"
var/help_text = "What is your name? "
var/default_value = ""
var/char_name = input(src, help_text, prompt_title, default_value) as null|text
if (!char_name)
src.ChooseCharacter()
return
var/ckey_name = ckey(char_name)
var/list/characters = CharacterList()
if (characters.Find(ckey_name))
alert("Sorry, that name has been taken.")
src.CreateNewCharacter()
return
var/races = input("What race do you wish to be?") in list("Mage","Warrior")
default_value = "Warrior"
var/char_race = input(src, help_text, prompt_title, default_value) in races
var/mob/new_mob
switch(char_race)
if("Mage")
icon = 'Characters.dmi'
icon_state = "Character 25"
new_mob = new /mob/characters/Mage()
new_mob.level = 1
new_mob.maxHP = 10
new_mob.maxMP = 10
new_mob.HP = 10
new_mob.MP = 10
new_mob.race = "Mage"
new_mob.strength = 5
usr.loc = locate(41,33,12)
if("Warrior")
usr.icon = 'Characters.dmi'
icon_state = "Character 1"
new_mob = new /mob/characters/Warrior()
new_mob.level = 1
new_mob.maxHP = 25
new_mob.maxMP = 25
new_mob.HP = 5
new_mob.MP = 5
new_mob.race = "Warrior"
new_mob.strength = 10
usr.loc = locate(55,25,1)
mob
characters
Mage
icon = 'Characters.dmi'
icon_state = "Character 25"
density = 1
race = "Mage"
Warrior
icon = 'Characters.dmi'
icon_state = "Character 1"
density = 1
race = "Warrior"
mob
Stat()
statpanel("[src]'s Statistics")
stat(src)
stat("")
stat("[src.name]")
stat("")
stat("Maximum Health:", "[num2text(maxHP,10)]")
stat("Health:", "[num2text(HP,10)]")
stat("Mana:", "[num2text(MP,10)]")
stat("Maximum Mana:", "[num2text(maxMP,10)]")
stat("Strength:","[strength]")
stat("Defense:","[defense]")
atom/movable
var
race
level
HP
MP
maxHP
maxMP
strength
defense
</<src>
ID:147187
Aug 21 2004, 5:40 am
|
|
Aug 21 2004, 5:58 am
|
|
What doesnt work in it? Please post more information.
|
Looks like The Deadron Char Handling login style, if so, add this to the top of the screen
#include <deadron/characterhandling> |