mob
var
health
servbot
proc
CreateNewCharacter()
var/char_name = input("What is your name?","Create new")
SaveCharacter(char_name)
return char_name
SaveCharacter(char_name)
var/savefile/F = new("players.sav")
var/safe_name = ckey(char_name)
F.cd = "/[ckey]/[safe_name]"
F["full_name"] << char_name
var
obj/emote
M
trans = 0
Zenny = 10000
brains = 1
attack = 1
defense = 1
health = 10
New()
var/obj/emotion/normal/O = new()
O.icon = 'servbot.dmi'
emote = O
icon = 'servbot.dmi'
icon_state = "servbot"
Login()
usr << sound('Gesellschaft.mid',1)
var/savefile/F = new("players.sav")
F.cd = "/[ckey]"
var/list/characters = F.dir
var/newCharacterChoice = "<Create New Character>"
var/list/menu = new()
menu += characters
menu += newCharacterChoice
var/result = input("Which servbot will you command?","Servbot Selection") in menu
if(result == newCharacterChoice)
name = CreateNewCharacter()
usr.icon_state = input("What kind of Servbot do you want?","Welcome to Servbot Command!") in list("Blue","Red","Green","Orange")
usr.loc = locate(2,3,1)
if(usr.icon_state == "Blue")
usr:brains += 1
if(usr.icon_state == "Red")
usr:attack += 1
if(usr.icon_state == "Green")
usr:defense += 1
if(usr.icon_state == "Orange")
usr << "You're orange"
else
F.cd = "/[ckey]/[result]"
F["full_name"] >> name
..()
Stat()
statpanel("Servbot Status")
stat("Emotion",emote)
stat("Health",health)
stat("Zenny",Zenny)
statpanel("Servbot Protocols")
stat("Brains",brains)
stat("Attack",attack)
stat("Defense",defense)
statpanel("Inventory")
stat(contents)
ID:176879
Nov 30 2002, 7:14 pm (Edited on Nov 30 2002, 8:46 pm)
|
|
I'm just learning how to create save files, and I'm not quite finished with this one, and I was running a test run and it would let me make a new mob, select my icon, and put me on the map for play. but, when i try to continue a file, my mob deosn't show up. I can move and execute commands and that stuff but he doesn't show! Here's my mob code snippet; i hope it's not to much to read...
|