Register for your free account! | Forgot your password?

You last visited: Today at 12:00

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

Advertisement



[FIX] HP Bar doesnt fill up 100%

Discussion on [FIX] HP Bar doesnt fill up 100% within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
[FIX] HP Bar doesnt fill up 100%

Hey guys I know a few people around this forum are having some trouble with their HP bars not filling up properly when you put something on like a Gold Cup or Trophy or something. This is a very easy fix as I will show you below.
Hit the thanks if you like this or use it.
100% coded by me.... Not leeched from anywhere.



Done all of them will now work
.Beatz is offline  
Thanks
4 Users
Old 07/06/2010, 01:51   #2
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
Why not just read the itemtype.dat file? It contains all the item's info, including hp bonuses.
kinshi88 is offline  
Thanks
1 User
Old 07/06/2010, 02:00   #3
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by kinshi88 View Post
Why not just read the itemtype.dat file? It contains all the item's info, including hp bonuses.
Yes but I added this for people to help them. I have had alot of people ask me how to fix this and I have explained it many many times and I am bored of explaining so I released this.
I know the Itemtype.dat file holds all that information thats how I done this code.
.Beatz is offline  
Old 07/06/2010, 02:18   #4
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
You don't need to hard-code anything.

Get the info from the itemtype.txt (decrypted itemtype.dat)
Code:
            StreamReader sr = new StreamReader("./Database/itemtype.txt");
            while (!sr.EndOfStream)
            {
                string[] data = sr.ReadLine().Split(' ');
                BaseItem i = new BaseItem();
                i.ID = uint.Parse(data[0]);
                i.Name = data[1];
                i.ReqJob = byte.Parse(data[2]);
                i.ReqProfLvl = byte.Parse(data[3]);
                i.ReqLvl = byte.Parse(data[4]);
                i.ReqSex = byte.Parse(data[5]);
                i.ReqStr = ushort.Parse(data[6]);
                i.ReqAgi = ushort.Parse(data[7]);
                i.ReqVit = ushort.Parse(data[8]);
                i.ReqSpi = ushort.Parse(data[9]);
                i.Tradability = byte.Parse(data[10]);
                i.Weight = ushort.Parse(data[11]);
                i.ShopBuyPrice = uint.Parse(data[12]);
                i.Action = uint.Parse(data[13]);
                i.MaxPhysAtk = uint.Parse(data[14]);
                i.MinPhysAtk = uint.Parse(data[15]);
                i.PhysDefence = uint.Parse(data[16]);
                i.Dexerity = uint.Parse(data[17]);
                i.Dodge = uint.Parse(data[18]);
                i.PotAddHP = ushort.Parse(data[19]);
                i.PotAddMP = ushort.Parse(data[20]);
                i.Durability = ushort.Parse(data[21]);
                i.Arrows = ushort.Parse(data[22]);
                i.MAttack = uint.Parse(data[30]);
                i.Range = ushort.Parse(data[32]);
                i.Frequency = uint.Parse(data[33]);
                i.ShopCPPrice = uint.Parse(data[37]);
                i.Description = data[53];

                Kernel.BaseItems.ThreadSafeAdd<uint, BaseItem>(i.ID, i);
            }
Then when you're calculating hp, or attacking, take into account the BaseItem info.

Code:
Hitpoints += BaseItem[id].PotAddHP;
Then EVERY item ever is taken into account.
kinshi88 is offline  
Thanks
10 Users
Old 07/06/2010, 02:34   #5
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by kinshi88 View Post
You don't need to hard-code anything.

Get the info from the itemtype.txt (decrypted itemtype.dat)
Code:
            StreamReader sr = new StreamReader("./Database/itemtype.txt");
            while (!sr.EndOfStream)
            {
                string[] data = sr.ReadLine().Split(' ');
                BaseItem i = new BaseItem();
                i.ID = uint.Parse(data[0]);
                i.Name = data[1];
                i.ReqJob = byte.Parse(data[2]);
                i.ReqProfLvl = byte.Parse(data[3]);
                i.ReqLvl = byte.Parse(data[4]);
                i.ReqSex = byte.Parse(data[5]);
                i.ReqStr = ushort.Parse(data[6]);
                i.ReqAgi = ushort.Parse(data[7]);
                i.ReqVit = ushort.Parse(data[8]);
                i.ReqSpi = ushort.Parse(data[9]);
                i.Tradability = byte.Parse(data[10]);
                i.Weight = ushort.Parse(data[11]);
                i.ShopBuyPrice = uint.Parse(data[12]);
                i.Action = uint.Parse(data[13]);
                i.MaxPhysAtk = uint.Parse(data[14]);
                i.MinPhysAtk = uint.Parse(data[15]);
                i.PhysDefence = uint.Parse(data[16]);
                i.Dexerity = uint.Parse(data[17]);
                i.Dodge = uint.Parse(data[18]);
                i.PotAddHP = ushort.Parse(data[19]);
                i.PotAddMP = ushort.Parse(data[20]);
                i.Durability = ushort.Parse(data[21]);
                i.Arrows = ushort.Parse(data[22]);
                i.MAttack = uint.Parse(data[30]);
                i.Range = ushort.Parse(data[32]);
                i.Frequency = uint.Parse(data[33]);
                i.ShopCPPrice = uint.Parse(data[37]);
                i.Description = data[53];

                Kernel.BaseItems.ThreadSafeAdd<uint, BaseItem>(i.ID, i);
            }
Then when you're calculating hp, or attacking, take into account the BaseItem info.

Code:
Hitpoints += BaseItem[id].PotAddHP;
Then EVERY item ever is taken into account.
Oh didn't understand what you were saying
Yeah thats a better way of doing it. I am still learning C# though
.Beatz is offline  
Old 07/06/2010, 04:22   #6
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
Quote:
Originally Posted by mattyc2580 View Post
Oh didn't understand what you were saying
Yeah thats a better way of doing it. I am still learning C# though
Yup, just trying to help
kinshi88 is offline  
Old 07/06/2010, 11:31   #7
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
nice kinshi
~Yuki~ is offline  
Old 07/06/2010, 12:11   #8
 
elite*gold: 0
Join Date: May 2007
Posts: 35
Received Thanks: 6
Quote:
Originally Posted by kinshi88 View Post
You don't need to hard-code anything.

Get the info from the itemtype.txt (decrypted itemtype.dat)
Code:
            StreamReader sr = new StreamReader("./Database/itemtype.txt");
            while (!sr.EndOfStream)
            {
                string[] data = sr.ReadLine().Split(' ');
                BaseItem i = new BaseItem();
                i.ID = uint.Parse(data[0]);
                i.Name = data[1];
                i.ReqJob = byte.Parse(data[2]);
                i.ReqProfLvl = byte.Parse(data[3]);
                i.ReqLvl = byte.Parse(data[4]);
                i.ReqSex = byte.Parse(data[5]);
                i.ReqStr = ushort.Parse(data[6]);
                i.ReqAgi = ushort.Parse(data[7]);
                i.ReqVit = ushort.Parse(data[8]);
                i.ReqSpi = ushort.Parse(data[9]);
                i.Tradability = byte.Parse(data[10]);
                i.Weight = ushort.Parse(data[11]);
                i.ShopBuyPrice = uint.Parse(data[12]);
                i.Action = uint.Parse(data[13]);
                i.MaxPhysAtk = uint.Parse(data[14]);
                i.MinPhysAtk = uint.Parse(data[15]);
                i.PhysDefence = uint.Parse(data[16]);
                i.Dexerity = uint.Parse(data[17]);
                i.Dodge = uint.Parse(data[18]);
                i.PotAddHP = ushort.Parse(data[19]);
                i.PotAddMP = ushort.Parse(data[20]);
                i.Durability = ushort.Parse(data[21]);
                i.Arrows = ushort.Parse(data[22]);
                i.MAttack = uint.Parse(data[30]);
                i.Range = ushort.Parse(data[32]);
                i.Frequency = uint.Parse(data[33]);
                i.ShopCPPrice = uint.Parse(data[37]);
                i.Description = data[53];

                Kernel.BaseItems.ThreadSafeAdd<uint, BaseItem>(i.ID, i);
            }
Then when you're calculating hp, or attacking, take into account the BaseItem info.

Code:
Hitpoints += BaseItem[id].PotAddHP;
Then EVERY item ever is taken into account.
It's not for 5165 LOTF?
Becose 5165 read Items.txt and don't use the same names ID.
flex30 is offline  
Old 07/06/2010, 12:40   #9
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
no its not for NewestCoServer Source. its an example. and **** its not called LOTF when do ppl learn that finally
~Yuki~ is offline  
Old 07/06/2010, 13:34   #10
 
elite*gold: 0
Join Date: May 2007
Posts: 35
Received Thanks: 6
Quote:
Originally Posted by ~Yuki~ View Post
no its not for NewestCoServer Source. its an example. and **** its not called LOTF when do ppl learn that finally
You don't need to get angry for that, we're not all pro of Conquer PS..
flex30 is offline  
Old 07/06/2010, 14:18   #11
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Mine is for NewestCoServer Source. But the other one is just an example for people to work off.
.Beatz is offline  
Old 07/06/2010, 19:01   #12
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Few things,

1. Good work Kinishi.
2. Yuki your very right.
3.
Quote:
It's not for 5165 LOTF?
Becose 5165 read Items.txt and don't use the same names ID.
Of course thats not for "lotf" but can very easily be converted or the original to be changed.

Mattyc2580 - Just if every coder for newestcoserver source had common sence like you. :P
MonstersAbroad is offline  
Old 07/07/2010, 08:15   #13
 
Sp!!ke's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 380
Received Thanks: 58
thanks kinishi I finish to convert read of itemtype
Sp!!ke is offline  
Old 07/07/2010, 08:21   #14
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
Same here but for my 5017 Lotfie^^
~Yuki~ is offline  
Reply


Similar Threads Similar Threads
Fill me in
06/15/2010 - Mabinogi - 2 Replies
So I heard DR was banned but I never got to figure out how I got the jist it was because of CP.... That one guys thread with the comic made me lol so what happened? hate to stir up old news but I still don't know
how add fill in pack.d00?
01/27/2010 - Dekaron Private Server - 11 Replies
how add file in pack.d00?
i need fill Game 2MOONS Action7 & fill Server Action7
12/16/2009 - Dekaron Private Server - 15 Replies
i need fill Game 2MOONS Action7 & fill Server Action7 don't Tellme Go in thees link Category Index - DKundergroud.org File Database not working any man help plz
hp+ap+ammo fill up work after 9.may.08
05/17/2008 - GunZ - 10 Replies
i have made this myself not leeched from H.C this is totaly different you will see if you know about editing mrs and gunz the duel. you can swear... hp+ap fill up..... ammo fill up from world items.... quest monsters move and hit you {so not like his} .. no skills or shootin.... works with others... also i have edited dungeon maps for quest only skeletons spawn with you {it same place were every 1 spawns open your gunz folder quest maps save the dungeon mrs to somewhere on your computer...



All times are GMT +1. The time now is 12:01.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.