1
2
ID:150081
Dec 17 2001, 2:32 pm
|
|
I can' make the level go up, and how do i make it where my pbags don't die ?
|
Dec 17 2001, 2:34 pm
|
|
I won't help with any questions having to do with DBZ, my lib or not.
|
In response to Nadrew
|
|
come on .. pleeeeeeeeese *begs on his knees*
|
In response to Shadowalker
|
|
Shadowalker wrote:
come on .. pleeeeeeeeese *begs on his knees* Dude use ur hp var add this to your code hp=9999999999999999999*99999999999999999999 |
In response to Shadowalker
|
|
Well, first you'd have to check if the thing being attacked's client is null then make it so if that returns true make it so it doesn't die:
mob Make sure you have the newest version of the system. |
In response to Shadowalker
|
|
It should do that automaticly.
|
In response to Nadrew
|
|
It don't ... it stays at 1
|
In response to Shadowalker
|
|
Then you did something to make the code not work.
|
no ... Its ur Lib. I have went over it the best i could and even copy and pasted it the same way.
mob var Health=100 MaxHealth=100 Exp=0 MaxExp=1000 Level=1 Statup=0 ssj = 0 gonessj = 0 HP = 100 MAXHP = 100 Stat() ..() statpanel("Stats") stat("Health","[src.Health]/[src.MaxHealth]") stat("Experience","[src.Exp]/[src.MaxExp]") stat("Level",Level) /*Begin procs for vital parts of the system*/ mob/proc/Statup()//This defines a proc called Statup if(src.Statup>=20) src.MaxHealth+=10 src.Statup=0 src<<"<font color=blue>Your Stats are Higher" mob/proc/Levelup() if(src.Exp>=src.MaxExp) src.Level+=1 src.Exp=0 src.MaxExp*=2//This doubles the MaxExp var src<<"<font color=blue>You have gained a level" mob/proc/deathcheck() if(src.Health<=0) if(src.client)//If it's a PC player src.loc=locate(1,1,1) src<<"You died, [usr] killed you" usr<<"You killed [src]!" world<<"<font color=red>[src] was killed by [usr]!" else usr<<"You killed [src]" del(src) *note / i had to add ssj = 0 gonessj = 0 HP = 100 MAXHP = 100 because if i didn't add HP, MAXHP i get this error BZ POWER EXPLOSION.dmp:17:error: invalid variable name: HP DBZ POWER EXPLOSION.dmp:17:error: invalid variable name: MAXHP |
In response to Shadowalker
|
|
Where are you adding to the exp var?
|
In response to Shadowalker
|
|
Shadowalker wrote:
no ... Its ur Lib. I have went over it the best i could and even copy and pasted it the same way. |
In response to Shadowalker
|
|
Shadowalker wrote:
Shadowalker wrote: I put it so you could see it better |
In response to Shadowalker
|
|
What was that post for?
|
In response to Shadowalker
|
|
Umm, do you see the += operator there? That just sets the var the attack code that comes with my library *should* add to that var.
|
In response to Nadrew
|
|
ohhhh , do you mean this ?
mob/verb/Attack(mob/M in oview(1)) var/damage=2*usr.Level M<<"[usr] has attacked you" usr<<"You Attacked [M]" M.Health-=damage usr.Exp+=10 usr.Statup+=rand(1,5) M.deathcheck() usr.Levelup() usr.Statup() |
In response to Shadowalker
|
|
All I can see wrong is deathcheck is indented wrong.
[Edit] And you should know you only gain a level when your exp reaches your maxexp, not when your stats raise. |
In response to Nadrew
|
|
well... I don't know what to do. Want to see the whole code i got from it and you tell me whats wrong if anything, cause i added stuff, but i didn't mess with the Level thing. :(
|
In response to Shadowalker
|
|
You're probably having a misunderstanding of my code.
|
1
2