#include <deadron/characterhandling>
#include <dantom/htmllib>
client/base_num_characters_allowed = 10
mob/BaseCamp/ChoosingCharacter
ChooseCharacterMenu(list/menu)
var/menu_rows = ""
for (var/item in menu)
menu_rows += {"<tr><td align="center"><a href="?menu=choosing_character;choice=[item];src=\ref[src]">\[[item]]</a></td></tr>"}
var/page = {"
<body bgcolor=#FF9900 scroll=no>
<center>
<h2><font color="blue">Welcome to Dragonball Outcast</font></h2>
<b><i>Choose a character</i></b><br><br>
<table border=1 cellpadding=3>
[menu_rows]
</table>
</center>
"}
src << browse(page, "window=CharacterMenu;titlebar=0;can_close=0;can_minimize=0;size=600x500")
DeleteCharacterMenu(list/menu)
var/menu_rows = ""
for (var/item in menu)
menu_rows += {"<tr><td align="center"><a href="?menu=deleting_character;choice=[item];src=\ref[src]">\[[item]]</a></td></tr>"}
var/page = {"
<body bgcolor=#FF9900 scroll=no>
<center>
<h2><font color="blue">Deleting character!</font></h2>
<b><i>Choose who to rub out</i></b><br><br>
<table border=1 cellpadding=3>
[menu_rows]
</table>
</center>
"}
src << browse(page, "window=CharacterMenu;titlebar=0;can_close=0;can_minimize=0;size=600x400")
Topic(href, href_list[])
var/menu = href_list["menu"]
switch(menu)
if ("choosing_character")
src << browse(null, "window=CharacterMenu")
var/choice = href_list["choice"]
ChooseCharacterResult(choice)
return
if ("deleting_character")
src << browse(null, "window=CharacterMenu")
var/choice = href_list["choice"]
DeleteCharacterResult(choice)
return
return ..()
world/mob = /mob/other/choosing_character
/mob/other/choosing_character
base_save_allowed = 0
var
Form/NewCharacter/char_form = new()
error_text = ""
Login()
//src.loc=locate(8,8,1)
src.loc=locate(168,160,1)
spawn()
src.char_form.DisplayForm()
RemoveVerbs()
return
Logout()
del(src)
world << "<font color=red><center>[usr] ([race]) has left the world"
Stat()
return
proc/RemoveVerbs()
for (var/item in verbs)
verbs -= item
return
Form/NewCharacter
form_window = "window=NewCharacter;titlebar=0;can_close=0;can_minimize=0;size=600x800"
var
name
race
race_1 = "Human"
race_2 = "Saiyan"
race_3 = "Half-Saiyan"
race_4 = "Namekian"
race_5 = "Babidi"
race_6 = "Cell"
race_7 = "kai"
race_8 = "demon"
race_9 = "bioandroidone"
race_10 = "bioandroidtwo"
race_11 = "bioandroidthree"
race_12 = "buu"
hair
hair_1 = "Bald"
hair_2 = "Spikey"
hair_3 = "Gohan"
hair_4 = "Trunks"
hair_5 = "Vegetas"
alignment
alignment_1 = "Good"
alignment_2 = "Rogue"
alignment_3 = "Evil"
Initialize()
if (!name) name = usr.key
if (!race) race = "Human"
if (!hair) hair = "Bald"
if (!alignment) alignment = "Good"
usr << browse_rsc('krillin.bmp',"krillin.bmp")
usr << browse_rsc('human.bmp',"human.bmp")
usr << browse_rsc('namek.bmp',"namek.bmp")
usr << browse_rsc('spikeyhair.bmp',"spikeyhair.bmp")
usr << browse_rsc('gohanhair.bmp',"gohanhair.bmp")
usr << browse_rsc('trunkshair.bmp',"trunkshair.bmp")
usr << browse_rsc('vegetashair.bmp',"vegetashair.bmp")
HtmlLayout()
var/mob/other/choosing_character/player = usr
var/page = {"<body bgcolor=#FF9900>
<center><img src="krillin.bmp"></center>
<font color=red><b>[player.error_text]</b></font><br>
<table>
<tr><td><b>Name:</b></td><td>[name]</td></tr>
<tr><td> </td><td> </td></tr>
<tr><td><b>race:</b></td>
<td>
[race_1] <img src="human.bmp"> Human<br>
[race_2] <img src="human.bmp"> Saiyan<br>
[race_3] <img src="human.bmp"> Half-Saiyan<br>
[race_4] <img src="namek.bmp"> Namekian
[race_5] <img src="cell.bmp"> Cell
[race_6] <img src="kai.bmp"> kai
[race_7] <img src="janemba.bmp"> demon
[race_8] <img src="16.bmp"> bioandroidone
[race_9] <img src="16.bmp"> bioandroidtwo
[race_10] <img src="16.bmp"> bioandroidthree
[race_11] <img src="Babidi.bmp"> Babidi
[race_12] <img src="buu.bmp"> buu
</td>
<tr><td><b>Hair:</b></td>
<td>
[hair_1] <img src="human.bmp"> Bald<br>
[hair_2] <img src="spikeyhair.bmp"> Spikey<br>
[hair_3] <img src="gohanhair.bmp"> Gohan<br>
[hair_4] <img src="trunkshair.bmp"> Trunks<br>
[hair_5] <img src="vegetashair.bmp"> Vegetas
</td>
<tr><td><b>Alignment:</b></td>
<td>
[alignment_1] Good<br>
[alignment_2] Rogue<br>
[alignment_3] Evil
</td>
<tr><td> </td><td> </td></tr>
<tr><td> </td><td> </td></tr>
<tr><td> </td><td>[submit]</td></tr>
</table>
"}
return page
ProcessForm()
var/mob/other/choosing_character/player = usr
var/ckey_name = ckey(name)
if (!ckey_name || ckey_name == "")
player.error_text = "Your name must have alpha-numeric characters in it!"
DisplayForm()
return
var/mob/new_mob
switch(race)
if ("Human")
new_mob = new /mob/characters/male()
new_mob.CPL = 5
new_mob.PL = 5
new_mob.KI = 5
new_mob.CKI = 5
new_mob.stamina = 100
new_mob.race = "Human"
new_mob.form = "Human (Normal Form)"
new_mob.sensei = "(No one)"
new_mob.trainingquest = "(none)"
new_mob.personalquest = "(none)"
new_mob.dexterity = rand(1,100)
if ("Saiyan")
new_mob = new /mob/characters/male()
new_mob.CPL = 5
new_mob.PL = 5
new_mob.KI = 5
new_mob.CKI = 5
new_mob.stamina = 100
new_mob.race = "Saiyan"
new_mob.form = "Saiyan (Normal Form)"
new_mob.sensei = "(No one)"
new_mob.trainingquest = "(none)"
new_mob.personalquest = "(none)"
new_mob.overlays += /obj/tails/saiyantail
new_mob.dexterity = rand(1,100)
if ("Half-Saiyan")
new_mob = new /mob/characters/male()
new_mob.CPL = 5
new_mob.PL = 5
new_mob.KI = 5
new_mob.CKI = 5
new_mob.stamina = 100
new_mob.race = "Half-Saiyan"
new_mob.form = "Half-Saiyan (Normal Form)"
new_mob.sensei = "(No one)"
new_mob.trainingquest = "(none)"
new_mob.personalquest = "(none)"
new_mob.random = rand(1,2)
if(new_mob.random == 2)
new_mob.overlays += /obj/tails/saiyantail
new_mob.dexterity = rand(1,100)
if ("Namekian")
new_mob = new /mob/characters/namek()
new_mob.CPL = 5
new_mob.PL = 5
new_mob.KI = 5
new_mob.CKI = 5
new_mob.stamina = 100
new_mob.race = "Namekian"
new_mob.form = "Namekian (Normal Form)"
new_mob.sensei = "(No one)"
new_mob.trainingquest = "(none)"
new_mob.personalquest = "(none)"
new_mob.dexterity = rand(1,100)
if ("Cell")
new_mob = new /mob/characters/cell()
new_mob.CPL = 5
new_mob.PL = 5
new_mob.KI = 5
new_mob.CKI = 5
new_mob.stamina = 100
new_mob.race = "Android"
new_mob.form = "Android (Normal Form)"
new_mob.sensei = "(No one)"
new_mob.trainingquest = "(none)"
new_mob.personalquest = "(none)"
new_mob.dexterity = rand(1,100)
if ("kai")
new_mob = new /mob/characters/kai()
new_mob.CPL = 5
new_mob.PL = 5
new_mob.KI = 5
new_mob.CKI = 5
new_mob.stamina = 100
new_mob.race = "kai"
new_mob.form = "kai (Normal Form)"
new_mob.sensei = "(No one)"
new_mob.trainingquest = "(none)"
new_mob.personalquest = "(none)"
new_mob.dexterity = rand(1,100)
if ("demon")
new_mob = new /mob/characters/demon()
new_mob.CPL = 5
new_mob.PL = 5
new_mob.KI = 5
new_mob.CKI = 5
new_mob.stamina = 100
new_mob.race = "demon"
new_mob.form = "demon (Normal Form)"
new_mob.sensei = "(No one)"
new_mob.trainingquest = "(none)"
new_mob.personalquest = "(none)"
new_mob.dexterity = rand(1,100)
if ("bioandroidone")
new_mob = new /mob/characters/bioandroidone()
new_mob.CPL = 5
new_mob.PL = 5
new_mob.KI = 5
new_mob.CKI = 5
new_mob.stamina = 100
new_mob.race = "android"
new_mob.form = "android (Normal Form)"
new_mob.sensei = "(No one)"
new_mob.trainingquest = "(none)"
new_mob.personalquest = "(none)"
new_mob.dexterity = rand(1,100)
if ("bioandroidtwo")
new_mob = new /mob/characters/bioandroidtwo()
new_mob.CPL = 5
new_mob.PL = 5
new_mob.KI = 5
new_mob.CKI = 5
new_mob.stamina = 100
new_mob.race = "android"
new_mob.form = "android (Normal Form)"
new_mob.sensei = "(No one)"
new_mob.trainingquest = "(none)"
new_mob.personalquest = "(none)"
new_mob.dexterity = rand(1,100)
if ("bioandroidthree")
new_mob = new /mob/characters/bioandroidthree()
new_mob.CPL = 5
new_mob.PL = 5
new_mob.KI = 5
new_mob.CKI = 5
new_mob.stamina = 100
new_mob.race = "android"
new_mob.form = "android (Normal Form)"
new_mob.sensei = "(No one)"
new_mob.trainingquest = "(none)"
new_mob.personalquest = "(none)"
new_mob.dexterity = rand(1,100)
if ("babidi")
new_mob = new /mob/characters/babidi()
new_mob.CPL = 5
new_mob.PL = 5
new_mob.KI = 5
new_mob.CKI = 5
new_mob.stamina = 100
new_mob.race = "unkown"
new_mob.form = "babidi (Normal Form)"
new_mob.sensei = "(No one)"
new_mob.trainingquest = "(none)"
new_mob.personalquest = "(none)"
new_mob.dexterity = rand(1,100)
if ("buu")
new_mob = new /mob/characters/buu()
new_mob.CPL = 5
new_mob.PL = 5
new_mob.KI = 5
new_mob.CKI = 5
new_mob.stamina = 100
new_mob.race = "majin"
new_mob.form = "buu (Normal Form)"
new_mob.sensei = "(No one)"
new_mob.trainingquest = "(none)"
new_mob.personalquest = "(none)"
new_mob.dexterity = rand(1,100)
new_mob.name = name
if(new_mob.race=="Human"||new_mob.race=="Saiyan"||new_mob.race=="Half-Saiyan")
switch(hair)
if ("Bald")
new_mob.hair = "Bald"
if ("Spikey")
new_mob.hair = "Spikey"
new_mob.overlays += /obj/hair/spikey
if ("Gohan")
new_mob.hair = "Gohan"
new_mob.overlays += /obj/hair/gohan
if ("Trunks")
new_mob.hair = "Trunks"
new_mob.overlays += /obj/hair/trunks
if("Vegetas")
new_mob.hair = "Vegeta"
new_mob.overlays += /obj/hair/vegeta
else
new_mob.hair = "Bald"
switch(alignment)
if("Good")
new_mob.alignment = "Good"
new_mob.anumber = 20
if("Rogue")
new_mob.alignment = "Rogue"
new_mob.anumber = 0
if("Evil")
new_mob.alignment = "Evil"
new_mob.anumber = -20
usr.client.mob = new_mob
new_mob << browse(null, "window=NewCharacter")
return
mob/proc/Save()
src.client.base_SaveMob()
Problem description:
For some reason when i create a character its not moving the newly create character to the location above how cum what did i do wrong to do that?
I love how there's people who are don't give enough info when they post, and then there's those who give too much >.< This is an example of someone giving too much.
As for your problem, I'd imagine you never used src.loc=locate() or Move() at all? >_> I'm too lazy to sift through all that for a single line of programming. I did see it once, under the Login() proc, but I'm assuming that's not what you were talking about.