Problem solved Thank you everybody.
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:Quote:
Still the same, just the hp bar is lowered..
offset 74 = 10000 * HP / MaxHP;
offset 74 = 10000 * 43000000 / 50000000; offset 74 = 8600;
offset 74 = 10000 * 17954052 / 50000000; offset 74 = 3590;
That Didn't help, it still Doesn't Spawn The HP in the Boss HP Bar.Quote:
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:That will get you a percentage (in integer form) between 0 and 10000.Code:offset 74 = 10000 * HP / MaxHP;
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.
Perhaps it has 17,954,052 HP left:Code:offset 74 = 10000 * 43000000 / 50000000; offset 74 = 8600;
That should be all the information you need to get the HP to display properly.Code:offset 74 = 10000 * 17954052 / 50000000; offset 74 = 3590;
Quote:
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' ?
you dont hp* bla bla/ whatever thats only when you attack the bossQuote:
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
Now that photo looks cool. I really need to code a current patch source.Quote:
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
[Only registered and activated users can see links. Click Here To Register...]