Register for your free account! | Forgot your password?

You last visited: Today at 13:17

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Spawning Bosses HP

Discussion on Spawning Bosses HP within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2011
Posts: 165
Received Thanks: 17
Spawning Bosses HP

Problem solved Thank you everybody.
iStefan is offline  
Old 04/25/2011, 13:28   #2
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
byte[175] = 1; for bosses
12tails is offline  
Old 04/25/2011, 13:46   #3
 
elite*gold: 0
Join Date: Mar 2011
Posts: 165
Received Thanks: 17
Quote:
Originally Posted by 12tails View Post
byte[175] = 1; for bosses
Still the same, just the hp bar is lowered..
iStefan is offline  
Old 04/25/2011, 15:42   #4
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
Quote:
Originally Posted by iStefan View Post
Still the same, just the hp bar is lowered..
That's because displaying boss HP is different from displaying a normal monster's HP. With normal monsters, you simply display the amount of HP the monster has left. With boss monsters, you need to display the percentage of HP the monster has left. To do this, simply multiply the current HP by 10000 and divide by the max HP:
Code:
offset 74 = 10000 * HP / MaxHP;
That will get you a percentage (in integer form) between 0 and 10000.

For example, the TeratoDragon has a max HP of 50,000,000. Let's say that server-side, it has 43,000,000 HP left.
Code:
offset 74 = 10000 * 43000000 / 50000000;
offset 74 = 8600;
Perhaps it has 17,954,052 HP left:
Code:
offset 74 = 10000 * 17954052 / 50000000;
offset 74 = 3590;
That should be all the information you need to get the HP to display properly.
nTL3fTy is offline  
Thanks
1 User
Old 04/25/2011, 16:17   #5
 
elite*gold: 0
Join Date: Mar 2011
Posts: 165
Received Thanks: 17
Quote:
Originally Posted by nTL3fTy View Post
That's because displaying boss HP is different from displaying a normal monster's HP. With normal monsters, you simply display the amount of HP the monster has left. With boss monsters, you need to display the percentage of HP the monster has left. To do this, simply multiply the current HP by 10000 and divide by the max HP:
Code:
offset 74 = 10000 * HP / MaxHP;
That will get you a percentage (in integer form) between 0 and 10000.

For example, the TeratoDragon has a max HP of 50,000,000. Let's say that server-side, it has 43,000,000 HP left.
Code:
offset 74 = 10000 * 43000000 / 50000000;
offset 74 = 8600;
Perhaps it has 17,954,052 HP left:
Code:
offset 74 = 10000 * 17954052 / 50000000;
offset 74 = 3590;
That should be all the information you need to get the HP to display properly.
That Didn't help, it still Doesn't Spawn The HP in the Boss HP Bar.
iStefan is offline  
Old 04/25/2011, 16:41   #6
 
{ Angelius }'s Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 991
Received Thanks: 1,107
Quote:
Originally Posted by iStefan View Post
Okay I apologize about this, I know it has been requested already but ermm, I Followed impulse's way and guess what, I Failed.
Here Goes my Packet:

And Here Goes the Result of that Packet:
Where am I Mistakin' ?
Quote:
if (Mob.isBoss)
WriteUInt16((ushort)Mob.MaxHP, 74, Pack);
else WriteUInt16((ushort)Mob.CurrentHP, 74, Pack);

WriteBool(Mob.IsBoss, 175, Pack);//bos = 1 normal mob = 0
you dont hp* bla bla/ whatever thats only when you attack the boss
and you dont need to do anything extra, and that way everytime you go off the screen and come back the boss hp well be 50kk/50kk even if the boss hp was less than 10000:xD

and bosses hp always = 10000; and if you did tell the client that this mob is a boss by giving it the offset 175 as 1 the client turns the 10000 to 50kk


{ Angelius } is offline  
Old 04/25/2011, 16:51   #7
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
hmmm ....

do something like if(hp > 0) value = (uint)((value * 10000) / maxhp);
it works normal.... if you get the wrong value yet... check the mob maxhp at loading....
12tails is offline  
Old 04/26/2011, 18:19   #8
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Quote:
Originally Posted by { Angelius } View Post
you dont hp* bla bla/ whatever thats only when you attack the boss
and you dont need to do anything extra, and that way everytime you go off the screen and come back the boss hp well be 50kk/50kk even if the boss hp was less than 10000:xD

and bosses hp always = 10000; and if you did tell the client that this mob is a boss by giving it the offset 175 as 1 the client turns the 10000 to 50kk


Now that photo looks cool. I really need to code a current patch source.
_DreadNought_ is offline  
Reply


Similar Threads Similar Threads
Mob Spawning
01/02/2016 - Cabal Private Server - 5 Replies
Hello communty, Can one tell me how I can create in the game mobs. wenns goes with the id's Thanks in advance than in! MFG: <ZeroCool> GERMAN: Hallo kann mir vielleicht einer sagen wie ich im game mob spawne? und hat vielleicht jemand die idīs Danke als im vorraus."!"
Massive Spawning with CE
08/16/2010 - Dekaron - 10 Replies
well I think I found a section of code were mass spawn can be activated 0048D028 -- PUSH 00A5E424 ASCII "ATTACK" 0048D02D -- LEA EAX,DWORD PTR SS: 0048D031 -- PUSH 00A5E664 ASCII "%s" 0048D036 -- PUSH EAX 0048D037 -- MOV DWORD PTR SS:,6 0048D03F -- CALL 00455360
[HELP]Spawning a NPC
05/24/2010 - CO2 Private Server - 3 Replies
Hey guys I was wondering if you can help me to spawn a single NPC like this... I'm using LOTF 5017... I'm trying to add Blue Mouse Quest and spawn the Blue Mouses.... What I know: Spawn the mob(s) at a certain time after click. What I don't know:
Need Spawning
12/19/2009 - Dekaron - 13 Replies
Hi Guys I Need Spawning Code :confused:
Db spawning????
03/17/2008 - Conquer Online 2 - 2 Replies
Hi! I have 117 archer on eagle server, and i want to know , when the db spawns and what places ( min maks, thunder apes, sand elfs etc.) When is the server maintenances and how many hours i need to wait for db spawn on the right place:) Waiting for replies. Thank you.



All times are GMT +2. The time now is 13:17.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.