I think i found HP BAr in Hb2 sources

All Helbreath Client Source Discussion here.
ogeid
Member
Posts: 110
Joined: Thu Feb 02, 2006 11:11 pm

Post by ogeid »

Well searching in hb2 CLient and HG srcs i found this rare codes...

in HG srcs (Game.cpp)

in iComposeInitMapData and moree thinks

Code: Select all

*cp = (char)(CMisc::CalcHPPerc(m_pClientList[pTile->m_sOwner]->m_iHP, iGetMaxHP(pTile->m_sOwner)));
    	cp++;
    	iSize++;
CalcHPPerc <-- calculate HP percent!

VERY IMPORTANT CODE -> in misc.cpp

Code: Select all

// Helbreath II
int CMisc::CalcHPPerc(int iCurHP, int iMaxHP) {
	double dCurHP, dMaxHP;
	double dPerc;

	dCurHP = (double)iCurHP;
	dMaxHP = (double)iMaxHP;

	dPerc = (dCurHP / dMaxHP) * 100.0;

	if (dPerc < 0.0) dPerc = 0.0;
	if (dPerc > 100.0) dPerc = 100.0;

	return (int)dPerc;
}
and in client srcs

game.cpp

variable _tmp_iHPPerc is in all src!!!!!

look this:

in DrawObjectName and DrawNPCName

Code: Select all

	m_pSprite[DEF_SPRID_INTERFACE_ADDINTERFACE]->PutSpriteFast(sX, sY + 32 + iAddY, 24, dwTime);
	m_pSprite[DEF_SPRID_INTERFACE_ADDINTERFACE]->PutSpriteFastWidth(sX + 1, sY + 33 + iAddY, 25, (int)(66.0f * ((double)iHPPerc / 100.0f)), dwTime);

	wsprintf(cTxt2, "%d%%", iHPPerc);
	PutString2(sX + 22, sY + 31 + iAddY, cTxt2, 240, 240, 240);

well when i add all variables in my scrs code i have 4 errors....


"Prefiero morir de pie que vivir arrodillado"
Jensen
Loyal fan
Posts: 300
Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:

Post by Jensen »

just a little advisement to you since you are doing all of this work (and hopefully sharing)

just because the client calcs the hp percent, it still needs to be sent from the server to the client, make sure you add that in both ends
-><-
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

Its hard to copy from hb2 to your sources... you must search and edit about 10,000 lines of code.
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
projectx
Loyal fan
Posts: 201
Joined: Sun Jul 16, 2006 12:01 pm

Post by projectx »

Yes it is hard and stupid to use other ppl code's .. make you self.. Don't copy
Jensen
Loyal fan
Posts: 300
Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:

Post by Jensen »

projectx wrote: Yes it is hard and stupid to use other ppl code's .. make you self.. Don't copy
you know how many times ive said that to people, they keep whineing to me that the 2.24d / jugalos / 3.02 sources give them errors.

i keep telling them to effing get the 2.24b/c or even the 2.03 if you want an older base

sure theres still a couple bugs in those *tradehack* but at least that way everyone knows where they started and can offer better help. most people started there for their server, and didnt rip off someone elses that was released about 2 weeks ago becuase they probally effed something up and cant find it. =D
-><-
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

lol mines based of 2.24b sources and lol errors in my shit lol durr cuz there no game.h they think it will complet whit out lol and they try after i tell them hahah its so funny
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sokol
Loyal fan
Posts: 228
Joined: Mon May 02, 2005 7:28 pm
Location: P(r)oland

Post by sokol »

if u want good working code u need sometime re-write it again to get 100% work...
tester
Outpost bitch
Posts: 544
Joined: Wed Jan 07, 2004 8:58 pm

Post by tester »

Dun steal jaap's work kekekeke?

It's not becuz we're underground that we're dead.


Cheers Tester
I support a woman's right to choose<br><br>- In the Mouth?<br>- In the Ass ?<br>- In the Vagina?<br>- Between the Tits?
€M4NU€L
Outpost bitch
Posts: 517
Joined: Sat Nov 19, 2005 9:07 pm
Location: I watch gay porn
Contact:

Post by €M4NU€L »

tester wrote: Dun steal jaap's work kekekeke?

It's not becuz we're underground that we're dead.


Cheers Tester
Lol i added Classes in my Sources :rolleyes:
<span style='color:blue'>Helbreath Thermal</span> <span style='color:green'>BETA</span> <span style='color:red'>Soon</span>:<br><br>www.youporngay.com<br><br><img src='http://img264.imageshack.us/img264/1041 ... piopk7.jpg' border='0' alt='user posted image' /><br><img src='http://img257.imageshack.us/img257/3762 ... eakxj1.jpg' border='0' alt='user posted image' /><br><img src='http://arthur.crepin.free.fr/images/use ... mpsons.png' border='0' alt='user posted image' /><br><img src='http://img329.imageshack.us/img329/5797/pesgamerrr3.gif' border='0' alt='user posted image' /><br><br><u><b>BLACK GAY LIST:</b></u><br><br><span style='color:red'>€M4NU€L</span>:<br>I look like a girl and he's always complaining someone.
tester
Outpost bitch
Posts: 544
Joined: Wed Jan 07, 2004 8:58 pm

Post by tester »

€M4NU€L wrote:
tester wrote: Dun steal jaap's work kekekeke?

It's not becuz we're underground that we're dead.


Cheers Tester
Lol i added Classes in my Sources :rolleyes:
Let me correct that,

You stole hb2 classes and u copy pasted them in your source file.


Cheers tester
I support a woman's right to choose<br><br>- In the Mouth?<br>- In the Ass ?<br>- In the Vagina?<br>- Between the Tits?
€M4NU€L
Outpost bitch
Posts: 517
Joined: Sat Nov 19, 2005 9:07 pm
Location: I watch gay porn
Contact:

Post by €M4NU€L »

tester wrote:
€M4NU€L wrote:
tester wrote: Dun steal jaap's work kekekeke?

It's not becuz we're underground that we're dead.


Cheers Tester
Lol i added Classes in my Sources :rolleyes:
Let me correct that,

You stole hb2 classes and u copy pasted them in your source file.


Cheers tester
Yeah something like that :P
<span style='color:blue'>Helbreath Thermal</span> <span style='color:green'>BETA</span> <span style='color:red'>Soon</span>:<br><br>www.youporngay.com<br><br><img src='http://img264.imageshack.us/img264/1041 ... piopk7.jpg' border='0' alt='user posted image' /><br><img src='http://img257.imageshack.us/img257/3762 ... eakxj1.jpg' border='0' alt='user posted image' /><br><img src='http://arthur.crepin.free.fr/images/use ... mpsons.png' border='0' alt='user posted image' /><br><img src='http://img329.imageshack.us/img329/5797/pesgamerrr3.gif' border='0' alt='user posted image' /><br><br><u><b>BLACK GAY LIST:</b></u><br><br><span style='color:red'>€M4NU€L</span>:<br>I look like a girl and he's always complaining someone.
marleythe9
Loyal fan
Posts: 391
Joined: Sat Mar 26, 2005 12:41 am

Post by marleythe9 »

he already did change the Message that is being sent to client man this is all correct from what i see, but i dont see how it would work becouse, there is no Define in Client for the HPPer verible. thats realy onley thing u need.

realy you should have to edit 10k lines, should onley be a few... they made it like the Citizine / Combat that sends a Status message, witch is verifyed in client and realy tells rather or not to show under that Client if there a Combat or citizine

thers probley only realy like 5 functions you need to edit something in. im just guessing but from what all i search should be something like that.

the code you posted dose Send* the % of the hp to the client but the client will probley be all messed up becouse of the new Message it is recieving cuz u didnt define it.
<img src='http://freewebs.com/trickro/70s.png' border='0' alt='user posted image' /><img src='http://freewebs.com/trickro/70s2.jpg' border='0' alt='user posted image' />
ogeid
Member
Posts: 110
Joined: Thu Feb 02, 2006 11:11 pm

Post by ogeid »

u right marley HPperc variable is not added in hb client 2 srcs.
same shit happens whit m_iCharClass variable from class system
"Prefiero morir de pie que vivir arrodillado"
marleythe9
Loyal fan
Posts: 391
Joined: Sat Mar 26, 2005 12:41 am

Post by marleythe9 »

i found it all and added it. just search for every HPPerc cuz realy its spread out.

same with HG just search all HPPerc

i got it kinda working. hp bar dosnt refresh when you move like its supos to i think its a message problem becouse.

iv added another message for Ranks for players and it works perfict. but just the HP bar dose not refresh.

becouse the message is set as a Char* and sent as +1 byte yet its realy an Integer being sent. when my Rank message is sent witch is a Short it sends just fine and works perfict.

but ya realy the Code is all over the place.they just added HPPerc ever pace were Status is.
<img src='http://freewebs.com/trickro/70s.png' border='0' alt='user posted image' /><img src='http://freewebs.com/trickro/70s2.jpg' border='0' alt='user posted image' />
bone-you
Spamtastic
Posts: 1310
Joined: Wed Mar 16, 2005 3:12 am

Post by bone-you »

How stupid. What wasted space on every packet. They certainly weren't going for the most optimized code award.
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia :D</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.
Post Reply