#if !defined(SUPER_NEW)
#define SUPER_NEW "New Character"
#endif
#if !defined(SUPER_)
#define SUPER_LOAD "Load Character"
#endif
#if !defined(SUPER_QUIT)
#define SUPER_QUIT "Quit"
#endif
//proc
client
proc
Load()
if(src.mob.save_file_1)
var/savefile/load
load = new ("Player Saves/[mob.ckey]/Save File 1.sav")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z
if(src.mob.save_file_2)
var/savefile/load
load = new ("Player Saves/[mob.ckey]/Save File 2.sav")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z
if(src.mob.save_file_3)
var/savefile/load
load = new ("Player Saves/[mob.ckey]/Save File 3.sav")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z
//end
mob/var/save_file_1 = 0
mob/var/save_file_2 = 0
mob/var/save_file_3 = 0
var/list/Name = list()
var/list/HTML_TAGS = list ("<",">")
mob/proc/Check_For_Tagilitys(T as text,var/list/L)
for(var/V in L)
if(findtext(T,V))
return TRUE
var/list/NUM_TAGS = list ("1","2","3","4","5","6","7","8","9","0")
mob/proc/Check_For_Nums(T as text,var/list/L)
for(var/V in L)
if(findtext(T,V))
return TRUE
var/list/SYM_TAGS = list ("!","@","#","$","%","^","&","*","(",")","-","_","+","=","(",")","{","}",";",":","'","<",">",",",".","?","/","[","]")
mob/proc/Check_For_Syms(T as text,var/list/L)
for(var/V in L)
if(findtext(T,V))
return TRUE
mob/Guest
Login()
src.verbs -= new/mob/verb/OOC
src.verbs -= new/mob/verb/Say
if(src.client.key == "Guest") //Here's the line's to stop the Runtime Error - Fixed by Hant Teath
del(src.client)
// if(src.client.byond_version < 349)
// src << "\red You BYOND Version: [src.client.byond_version] is out of Date! Please upgrade to the latest Version: 348!"
// del(src.client)
src.loc = locate(87,6,3)
Start
switch(alert("Welcome to Dragonball","New Character","Load Character","Delete Character"))
if("New Character")
switch(alert("Which Slot do you wish to Select?","","Slot 1","Slot 2","Slot 3"))
if("Slot 1")
if(fexists("Player Saves/[src.client.ckey]/Save File 1.sav"))
switch(alert("You already have a Character on Slot 1. Overwrite it?","","Yes","No"))
if("Yes")
fdel("Player Saves/[src.client.ckey]/Save File 1.sav")
src.save_file_1 = 1
Create()
else
goto Start
return
else
src.save_file_1 = 1
Create()
if("Slot 2")
if(fexists("Player Saves/[src.client.ckey]/Save File 2.sav"))
switch(alert("You already have a Character on Slot 2. Overwrite it?","","Yes","No"))
if("Yes")
fdel("Player Saves/[src.client.ckey]/Save File 2.sav")
src.save_file_2 = 1
Create()
else
goto Start
return
else
src.save_file_2 = 1
Create()
if("Slot 3")
if(fexists("Player Saves/[src.client.ckey]/Save File 3.sav"))
switch(alert("You already have a Character on Slot 3. Overwrite it?","","Yes","No"))
if("Yes")
fdel("Player Saves/[src.client.ckey]/Save File 3.sav")
src.save_file_3 = 1
Create()
else
goto Start
return
else
src.save_file_3 = 1
Create()
if("Load Character")
switch(alert("Which Character Slot do you wish to Select?","","Slot 1","Slot 2","Slot 3"))
if("Slot 1")
if(fexists("Player Saves/[src.client.ckey]/Save File 1.sav"))
usr.save_file_1 = 1
usr.client.Load()
else
alert("No Saved File Found!")
sleep(5)
goto Start
return
if("Slot 2")
if(fexists("Player Saves/[src.client.ckey]/Save File 2.sav"))
usr.save_file_2 = 1
usr.client.Load()
else
alert("No Saved File Found!")
sleep(5)
goto Start
return
if("Slot 3")
if(fexists("Player Saves/[src.client.ckey]/Save File 3.sav"))
usr.save_file_3 = 1
usr.client.Load()
else
alert("No Saved File Found!")
sleep(5)
goto Start
return
if("Delete Character")
var/del_name = ""
switch(alert("Which Slot do you wish to Delete?","","Slot 1","Slot 2","Slot 3"))
if("Slot 1")
switch(alert("Are you Sure?","","Yes","No"))
if("Yes")
if(fexists("Player Saves/[src.client.ckey]/Save File 1.sav"))
var/savefile/Load = new("Player Saves/[src.client.ckey]/Save File 1.sav")
Load["name"] >> del_name
var/savefile/N = new("World Save Files/Player Names.sav")
Name.Remove(ckey(del_name))
N["Name"] << Name
fdel("Player Saves/[src.client.ckey]/Save File 1.sav")
goto Start
else
alert("No Saved File Found!")
sleep(5)
goto Start
else
goto Start
return
if("Slot 2")
switch(alert("Are you Sure?","","Yes","No"))
if("Yes")
if(fexists("Player Saves/[src.client.ckey]/Save File 2.sav"))
var/savefile/Load = new("Player Saves/[src.client.ckey]/Save File 2.sav")
Load["name"] >> del_name
var/savefile/N = new("World Save Files/Player Names.sav")
Name.Remove(ckey(del_name))
N["Name"] << Name
fdel("Player Saves/[src.client.ckey]/Save File 2.sav")
else
alert("No Saved File Found!")
sleep(5)
goto Start
else
goto Start
return
if("Slot 3")
switch(alert("Are you Sure?","","Yes","No"))
if("Yes")
if(fexists("Player Saves/[src.client.ckey]/Save File 3.sav"))
var/savefile/Load = new("Player Saves/[src.client.ckey]/Save File 3.sav")
Load["name"] >> del_name
var/savefile/N = new("World Save Files/Player Names.sav")
Name.Remove(ckey(del_name))
N["Name"] << Name
fdel("Player Saves/[src.client.ckey]/Save File 3.sav")
else
alert("No Saved File Found!")
sleep(10)
goto Start
else
goto Start
return
..()
proc
Create()
var/mob/mobcreation
var/newname = null
//var/config = "065-090&097-122&095&032"
while(newname == null)newname = input("Pick Character Name","Name",src.key) as text //(newname,config)|| removed
if(ckey(newname) in Name)
alert("This name is already in use. Try again please,")
Create()
if(lentext(newname) > 25)
alert("Your name can not exceed 25 characters.")
Create()
if(isnull(newname) | newname == "" | !newname)
alert("Your name may not be blank.")
Create()
if(Check_For_Tagilitys(newname,HTML_TAGS) == TRUE)
alert("Your name may not have tagilitys of html in it.")
Create()
if(Check_For_Nums(newname,NUM_TAGS) == TRUE)
alert("Your name may not have numbers in it.")
Create()
if(Check_For_Syms(newname,SYM_TAGS) == TRUE)
alert("Your name may not have symbols in it.")
Create()
else
newname = html_encode(newname)
var/race = input("What were you born as?","Choose a Birth Race") in list ("Uchiha","Kaguya","Hyuuga","Lee","Akimichi","Aburame","Inuzuka","Nara","Haku")
switch(race)
if("Uchiha")
usr.Uchiha=1
usr.Realplayer = 1
usr.human = 1
usr.Clan = "Uchiha"
usr.Inuzuka=0
usr.Gaaraclan=0
usr.Kaguya=0
usr.Hyuuga=0
usr.Nara=0
usr.NonClan=0
usr.Aburame=0
usr.Akimichi = 0
if("Kaguya")
usr.Kaguya=1
usr.Realplayer = 1
usr.human = 1
usr.Clan = "Kaguya"
usr.Inuzuka=0
usr.Gaaraclan=0
usr.Hyuuga=0
usr.Nara=0
usr.NonClan=0
usr.Uchiha=0
usr.Aburame=0
usr.Akimichi = 0
if("Hyuuga")
usr.Hyuuga=1
usr.Realplayer = 1
usr.human = 1
usr.Clan = "Hyuuga"
usr.Inuzuka=0
usr.Gaaraclan=0
usr.Kaguya=0
usr.Nara=0
usr.NonClan=0
usr.Uchiha=0
usr.Aburame=0
usr.Akimichi = 0
if("Lee")
usr.NonClan=1
usr.Realplayer = 1
usr.human = 1
usr.Clan = "Non-Clan"
usr.Inuzuka=0
usr.Gaaraclan=0
usr.Kaguya=0
usr.Hyuuga=0
usr.Nara=0
usr.Uchiha=0
usr.Aburame=0
usr.Akimichi = 0
if("Akimichi")
usr.Akimichi=1
usr.Realplayer = 1
usr.human = 1
usr.Clan = "Akimichi"
usr.Inuzuka=0
usr.Gaaraclan=0
usr.Kaguya=0
usr.Hyuuga=0
usr.Nara=0
usr.NonClan=0
usr.Uchiha=0
usr.Aburame=0
if("Aburame")
usr.Aburame=1
usr.Realplayer = 1
usr.Konchuu = 10
usr.human = 1
usr.Clan = "Aburame"
usr.Haku = 0
usr.Akimichi=0
usr.Inuzuka=0
usr.Gaaraclan=0
usr.Kaguya=0
usr.Hyuuga=0
usr.Nara=0
usr.NonClan=0
usr.Uchiha=0
if("Inuzuka")
usr.Inuzuka=1
usr.Realplayer = 1
usr.human = 1
usr.Clan = "Inuzuka"
usr.Gaaraclan=0
usr.Kaguya=0
usr.Hyuuga=0
usr.Nara=0
usr.NonClan=0
usr.Uchiha=0
usr.Aburame=0
usr.Akimichi = 0
if("Nara")
usr.Nara=1
usr.Realplayer = 1
usr.human = 1
usr.Clan = "Nara"
usr.Inuzuka=0
usr.Gaaraclan=0
usr.Kaguya=0
usr.Hyuuga=0
usr.NonClan=0
usr.Uchiha=0
usr.Aburame=0
usr.Akimichi = 0
if("Haku")
usr.Haku=1
usr.Realplayer = 1
usr.human = 1
usr.Clan = "Haku"
usr.Akimichi=0
usr.Inuzuka=0
usr.Gaaraclan=0
usr.Kaguya=0
usr.Hyuuga=0
usr.Nara=0
usr.NonClan=0
usr.Uchiha=0
usr.Aburame=0
if(src.save_file_1)
mobcreation.save_file_1 = 1
if(src.save_file_2)
mobcreation.save_file_2 = 1
if(src.save_file_3)
mobcreation.save_file_3 = 1
var/savefile/N = new("World Save Files/Player Names.sav")
Name.Add(ckey(mobcreation.name))
N["Name"] << Name
world << "<font color = #F9DB13>Client Information: <font color = white>Everyone welcome our newest Player: [mobcreation.name]"
src.client.mob = mobcreation
del(src)
Problem description: Well basicly it a login for my friend i made some of it and it dosn't seem to working anymore , i know it pretty big so if you have time plz help me :)
As far as loading, you also need to load your x,y,z values to local vars, not to the mob directly. If you set mob.x and the mob is already located nowhere, it's not going to change. Load those values into vars first, and then set the mob's loc using locate().
Lummox JR