mob/Player
icon = 'Person.dmi'
icon_state = "Base"
Login()
if ("players/[usr.ckey].sav")
LoadCharacter()
if (usr.playedbefore == 0)
var/turf/start/random_start = pick(starting_turfs)
loc = random_start
world << "<b>[usr] is now in the tutorial.</b>"
usr << "Welcome to the tutorial."
usr << "To complete this tutorial, you must talk to a person to be teleported to the next."
usr << "Then your free to do whatever."
usr << "Use the left mouse button to Click on a NPC to talk."
return ..()
if (usr.playedbefore == 1)
world << "<b>[usr] has joined the game.</b>"
return ..()
else
var/turf/start/random_start = pick(starting_turfs)
loc = random_start
world << "<b>[usr] is now in the tutorial.</b>"
usr << "Welcome to the tutorial."
usr << "To complete this tutorial, you must talk to a person to be teleported to the next."
usr << "Then your free to do whatever."
usr << "Use the left mouse button to Click on a NPC to talk."
return
Logout()
world << "<B>[usr] has left the game.</b>"
mob
proc
LoadCharacter() // The load character proc
var/savefile/F = new("players/[src.ckey].sav") // define the location of the save file
var/X // Defines a temporary X variable
var/Y // Defines a temporary Y variable
var/Z // Defines a temporary Z variable
var/mob/newmob = new() // Initialize a new mob
F["name"] >> name // Load the name from the list into the character's name
F["X"] >> X // Load the X variable from the savefile to the temporary X variable
F["Y"] >> Y // Load the Y variable from the savefile to the temporary Y variable
F["Z"] >> Z // Load the Z variable from the savefile to the temporary Z variable
F["Mob"] >> newmob // Load all the mob data into the initialized mob
newmob.loc = locate(X,Y,Z) // Move the initialized mob to the last saved location
newmob.client = src.client // Set the mob's client to players client
..()
Problem description:
has left the game.
is now in the tutorial.
has left the game.
has joined the game.
has left the game.
has joined the game.
has left the game.
has joined the game.
has left the game.
has joined the game.
has left the game.
has joined the game.
For some reason the name don't show up, and since it keeps loading my location I can't move.