ID:146265
 

world
name = ("Dragonball Blitz")
view = 6
loop_checks=0
hub = "CYN.DragonballBlitzRevamped "

client
script = "<STYLE>BODY {background: black; color: white}</STYLE>"

world
mob=/mob/choosing/ChooseCharacter
mob/create_character
var/mob/character
Login()
var/charactername = input("What do you want to be called?","Character Name:",src.key)
switch(input("What race do you wish to be?","Race?") in list("Saiyan","Human"))
if ("Saiyan")
character = new /mob/characters/Saiyan()
if ("Human")
character = new /mob/characters/Human()
character.name = charactername
src.client.mob = character
usr.loc=locate(40,40,1)
del(src)
..()

mob/characters/Saiyan
icon = 'SaiyanBase.dmi'
icon_state = "Norm"

mob/characters/Human
icon = 'SaiyanBase.dmi'
icon_state = "Norm"

mob
verb
Say(msg as text)
set category = "Communication"
view(6) << "<font color = blue><B><i>[usr]:</i></B></font><font color = white><i>[msg]"
World_Say(msg as text)
set category = "Communication"
world << "<font color = green><b><i>OOC</font><font color = yellow><b><i> [usr]:</font></b><i><font color = green> [msg]"
mob
verb
Attack(mob/M as mob in oview(1))
set category = "Fighting"
var/damage = usr.Strength*2 - M.Defense*3
if(damage <= 0)
usr << "[M] easily dodges your attack!"
M << "You easily dodge [usr]'s attack."
flick("Punch",usr)
else
M.PL -= damage
view() << "[usr] attacks [M] for [damage] HP!"
M:deathcheck()
usr.MaxPL += 50
usr.Strength += 10
usr.Defense += 7
if(usr.Stamina >= 3)
Attack()
else
usr << "You don't have enough stamina!"

mob
proc
deathcheck()
if(src.PL <= 0)
view() << "[src] dies!"
src.PL = MaxPL
usr.loc=locate(40,40,1)

mob/Logout()
del(src)

client/proc/SaveMob()
var/firstletter=copytext(src.ckey, 1, 2)
var/savefile/F = new("players/[firstletter]/[src.ckey].sav")
var/char_ckey = cKey(src.mob.name)
F["/[ckey]/[char_ckey]"]<<src.mob

client/proc/LoadMob(char_ckey)
var/firstletter=copytext(src.ckey, 1, 2)
var/savefile/F = new("players/[firstletter]/[src.ckey].sav")
F["/[ckey]/[char_ckey]"]>>src.mob

client/Del()
if (istype(src.mob, /mob/create_character))
return ..()

SaveMob()
return ..()

mob
Login()
..()
if (!istype(src, /mob/create_character))
sample_report()
world << "<B><font color = yellow>Event:</font><font color = green> [src] has logged in!"
if(src.PL > src.MaxPL)
src.PL = src.MaxPL

Write(savefile/F)
..()

F["last_x"] << x
F["last_y"] << y
F["last_z"] << z

Read(savefile/F)
..()

var/last_x
var/last_y
var/last_z
F["last_x"] >> last_x
F["last_y"] >> last_y
F["last_z"] >> last_z
loc = locate(last_x, last_y, last_z)
proc
sample_report()
src << browse("<font face=Courier><Center><STYLE>BODY {background: black; color: yellow}</STYLE><B>Welcome to Dragonball Blitz Revamped!</b><HR>Well some of you might remember the game Dragonball Blitz from the past. It was a zeta rip. Not very interesting. But now it's back with 100% original coding by myself (CYN). I'm also happy to say that the only turfs that I did not create are; Capsule Tower, CapsuleHouse, Goku's House, KameHouse, and the CC Spacepod. This game is coming back and making a splash in the Dragonball fan community.<HR><B><U>NEWS:</U>July 30, 2005: Well it's in open alpha testing. I hope you enjoy the game so far. And please report any bugs to CYN (creator/coder/man typing the news)</B><HR>Added: Attack verb - Say verb - OOC - Map update - the ENTIRE GAME<HR>CYN")

client
verb
Save()
set category = "Communication"
SaveMob()
usr << "Saving Character..."
sleep(10)
usr << "Save Complete"

mob
Stat()
statpanel("Stats")
stat("[src]")
stat("Powerlevel:","[PL]/[MaxPL]")
stat("Ki:","[Ki]/[MaxKi]")
stat("Stamina:","[Stamina]%")
stat("Strength:","[Strength]")
stat("Defense:","[Defense]")
stat("Zenni:","[Zenni]")

mob
var
PL = 100
MaxPL = 100
Ki = 10
MaxKi = 10
Strength = 50
Defense = 25
Stamina = 100
Zenni = 0
MaxStamina = 100

mob/proc/ChooseCharacter()
var/list/characters = src.CharacterList()
var/newCharacterChoice = "New Character"
var/DeleteCharacterChoice = "Delete Character"
var/list/menu = new()
menu += characters
menu += newCharacterChoice
menu += DeleteCharacterChoice
var/result = input("Character Creation", "Dragonball Blitz Revamped") in menu
if (result == newCharacterChoice)
src.CreateNewCharacter()

mob/proc/CharacterList()
var/firstletter=copytext(src.ckey, 1, 2)
var/savefile/F = new("players/[firstletter]/[src.ckey].sav")
F.cd = "/[ckey]"
var/list/characters = F.dir
return characters


Problem description: when i compile this i get erro like this login.dm:165:error:src.CreateNewCharacter:undefined proc(linked to): src.CreateNewCharacter()

also one like this
login.dm:11:error:/mob/choosing/ChooseCharacter:undefined type path (linked to): mob=/mob/choosing/ChooseCharacter


CYN wrote:
Problem description: when i compile this i get erro like this login.dm:165:error:src.CreateNewCharacter:undefined proc(linked to): src.CreateNewCharacter()
Unless I missed something, you never defined proc/CreateNewCharacter()

also one like this
login.dm:11:error:/mob/choosing/ChooseCharacter:undefined type path (linked to): mob=/mob/choosing/ChooseCharacter
You also never defined /mob/choosing/ChooseCharacter.

Define these two things, and you should be good to go.

Hiead
In response to Hiead
Shouldn't it be this:

world
mob=/mob/create_character

Isn't that the first mob that he has. try to change that and tell me the results.
In response to Killerdragon
As a matter of fact, yes. Weird how his coding contradicts itself. I didn't actually read the code. I just read the errors, found what it said was undefined, and skimmed the code to see if it was found anywhere.

Hiead
In response to Hiead
:P I find that a lot of coding is very simple and usually errors that occur are usually small things that nobody looks at.
In response to Killerdragon
I just didn't realize that the definitions were there. It's easy to find the source of problems by reading error messages

Hiead
In response to Killerdragon
That fixed one of the errors but i still get a problem with

mob/proc/ChooseCharacter()
var/list/characters = src.CharacterList()
var/newCharacterChoice = "New Character"
var/DeleteCharacterChoice = "Delete Character"
var/list/menu = new()
menu += characters
menu += newCharacterChoice
menu += DeleteCharacterChoice
var/result = input("Character Creation", "Dragonball Blitz Revamped") in menu
if (result == newCharacterChoice)
src.create_character() <----- this line
In response to CYN
I don't think there is a proc set for:

src.create_character()

You need to make a procedure for that.