RPG Starter

by Falacy
An Open Source Demo/Game with everything you'll need to get started on your very own BYOND Game!
ID:292064
 
Hey Falacy, Do you think you could help me with this

mob/var/rock_die=0
obj/turf
Rock_3
icon='dbzturfs.dmi'
icon_state="rock3"
def=0
hp=1
ki_def=0
New()
spawn()
return

mob/proc
Death()
if(istype(M,/obj/turf/Rock_3))
rock_die+=1

if("tutmis")
if(usr.rock_die>=3)
usr.loc = locate(154,147,1)
if(usr.rock_die<=2)
var/Tutorial2=""
Tutorial2+=({"<body bgcolor=black><title>Message</title><table border=2 bgcolor=blue><th>[usr.name]</th>
<tr><td>Sorry you still have to crush more rocks.
<tr><th colspan="3"><a href='?Tutorial=Okay'>Okay</a></th></tr></td></tr></table></td></tr>"}
)
usr << browse(Tutorial2,"window=Test;file=null;display=1;clear=0;border=0;can_close=0;can_resize=0;can_minimize=1;titlebar=1")


When you break the Rock when i had it as a Mob it wouldnt increase the var, and now as Obj its walk through able, and also non taking damage can you help me out please, I dont ask for much xD
There seems to be blobs of code missing <.<
and set the rocks density to 1 to make it non-walkable
In response to Falacy
Ok but what about the Var when i kill it, the var doesnt increase wen you kill it, its sopose to make the var go up for we can get out of Tutorial
In response to Flysbad
Flysbad wrote:
Ok but what about the Var when i kill it, the var doesnt increase wen you kill it, its sopose to make the var go up for we can get out of Tutorial

I dunno, that Death() code is missing too much crap to even compile. Is the rock M and the player the src?
In response to Falacy
Falacy wrote:
There seems to be blobs of code missing <.<
and set the rocks density to 1 to make it non-walkable

Hmmmm, could you write a code for me..................................................................................... lol jking, but you can if u want, but hwat codes shud i add to make it not have blobs of codeing missing
In response to Falacy
Falacy wrote:
Flysbad wrote:
Ok but what about the Var when i kill it, the var doesnt increase wen you kill it, its sopose to make the var go up for we can get out of Tutorial

I dunno, that Death() code is missing too much crap to even compile. Is the rock M and the player the src?

Oh yeah the Death() i used that from your rpg starter this is the death now
mob/proc
Death()
if(src.hp<=0)
if(src.key) //if its a player you wana do something different right?
src<<"<b><small>You were killed by [M], You gained [src.zenni]zenni and [src.exp] exp!" //a quick death message so u know u died
src:hp=src.max_hp //restores users HP and MP after dying
src:ki=src.max_ki
usr:exp+=src.exp
usr:levelup()
usr.SkillGain()
src.loc=locate(77,127,1) //sends the dead guy back to the start
else
usr<<"<small>You killed [M], You gained [src.zenni] zenni and [src.exp] exp!"
usr.exp+=src.exp
usr:levelup() //check if the player has enough EXP to level up
usr:updateexp()
usr:SkillGain()
del src //this will simply delete the monster, no respawning
if(istype(M,/obj/turf/Rock_3))
rock_die+=1


Should i make it src.rock_die+=1 and Should i switch the M and src around or leave it like src.rock_die???
In response to Flysbad
Flysbad wrote:
Shud i switch the M and src around??

where are you even getting M <.< that code should give you an error that M is undefined.
In response to Falacy
Falacy wrote:
Flysbad wrote:
Shud i switch the M and src around??

where are you even getting M <.< that code should give you an error that M is undefined.

Lol idk it didnt some reason lol, but what shud i replace that with src or just take that part out and make it /obj/turf/rock3?
In response to Flysbad
Flysbad wrote:
Lol idk it didnt some reason lol, but what shud i replace that with src or just take that part out and make it /obj/turf/rock3?

No. I don't know where M is defined, you shouldn't have usr in there, that proc should be causing compile errors, and when ran would cause runtime errors. The only way that can be compiling fully is if you for some reason have a variable called M on mobs.
In response to Flysbad
You also shouldn't ever use : in your code, always .
In response to Falacy
Oh well................... Lol how to fix the var make it raise lol
In response to Falacy
Falacy wrote:
You also shouldn't ever use : in your code, always .

Realy Didnt know that
In response to Flysbad
yes u can its just: dont realy do anything bad
In response to Leon killer
Lol kinda thought but idk Falacy is advance in coding and he noes the best
In response to Leon killer
Leon killer wrote:
yes u can its just: dont realy do anything bad

The : ignores type casting. Which means you can reference variables in your code that don't properly exist and it will compile anyway.
In response to Falacy
Owned.
In response to Flysbad
Try going to the Developer Forums. They will help and bash you 10x better.
In response to Magicbeast20
Flyz way ta kiss up to Fal -.-
I was a n00b back in these days , dang lol .