Please note that I'm not going for efficiency here, I'm just playing around, and the use of goto is purely due to me not wanting to use loops in something I know nothing about.
mob
proc
Save()
if(saveslot==1)
var/savefile/F = new("Saves/[src.ckey] (1).save")
F["mob"] << src
if(saveslot==2)
var/savefile/F = new("Saves/[src.ckey] (2).save")
F["mob"] << src
if(saveslot==3)
var/savefile/F = new("Saves/[src.ckey] (3).save")
F["mob"] << src
Load1()
if(fexists("Saves/[src.ckey] (1).save"))
var/savefile/F = new("Saves/[src.ckey] (1).save")
F["mob"] >> src
Load2()
if(fexists("Saves/[src.ckey] (2).save"))
var/savefile/F = new("Saves/[src.ckey] (2).save")
F["mob"] >> src
Load3()
if(fexists("Saves/[src.ckey] (3).save"))
var/savefile/F = new("Saves/[src.ckey] (3).save")
F["mob"] >> src
Logout()
Save()
..()
Login()
Login
var/Action=input("Welcome to [world.name]! Please select an option below.","[world.name]") in list ("New Character","Load Character","Delete Character")
switch(Action)
if("New Character")
var/Slot=input("Which slot do you wish to create a new character in?","New Character") in list ("Slot 1","Slot 2","Slot 3")
switch(Slot)
if("Slot 1")
if(fexists("Saves/[src.ckey] (1).save"))
alert("You already have a character in slot 1! Please delete your old one or pick another slot!")
goto Login
else
NewChar(1)
if("Slot 2")
if(fexists("Saves/[src.ckey] (2).save"))
alert("You already have a character in slot 2! Please delete your old one or pick another slot!")
goto Login
else
NewChar(2)
if("Slot 3")
if(fexists("Saves/[src.ckey] (3).save"))
alert("You already have a character in slot 3! Please delete your old one or pick another slot!")
goto Login
else
NewChar(3)
if("Load Character")
var/Slot=input("Which slot do you wish to load a character from?","Load Character") in list ("Slot 1","Slot 2","Slot 3")
switch(Slot)
if("Slot 1")
if(!fexists("Saves/[src.ckey] (1).save"))
alert("You have no character in slot 1!")
goto Login
else
Load1()
if("Slot 2")
if(!fexists("Saves/[src.ckey] (2).save"))
alert("You have no character in slot 2!")
goto Login
else
Load2()
if("Slot 3")
if(!fexists("Saves/[src.ckey] (3).save"))
alert("You have no character in slot 3!")
goto Login
else
Load3()
if("Delete Character")
var/Slot=input("Which slot do you wish to delete a character from?","Delete Character") in list ("Slot 1","Slot 2","Slot 3")
switch(Slot)
if("Slot 1")
if(!fexists("Saves/[src.ckey] (1).save"))
alert("You have no character in slot 1!")
goto Login
else
fdel("Saves/[src.ckey] (1).save")
alert("Your character in slot 1 has been deleted!")
goto Login
if("Slot 2")
if(!fexists("Saves/[src.ckey] (2).save"))
alert("You have no character in slot 2!")
goto Login
else
fdel("Saves/[src.ckey] (2).save")
alert("Your character in slot 2 has been deleted!")
goto Login
if("Slot 3")
if(!fexists("Saves/[src.ckey] (3).save"))
alert("You have no character in slot 3!")
goto Login
else
fdel("Saves/[src.ckey] (3).save")
alert("Your character in slot 3 has been deleted!")
goto Login
mob
var/saveslot
proc
NewChar(Slot)
///////
Name
///////
var/newName=input("What will your name be? Please note that it can not be blank.","Character Creation") as text
if(newName=="")
goto Name
else
name=newName
saveslot=Slot
src.loc=locate(1,1,1)
Save()