Register for your free account! | Forgot your password?

You last visited: Today at 00:32

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

Advertisement



[Release]Properly Load Mana in 5017.

Discussion on [Release]Properly Load Mana in 5017. within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
[Release]Properly Load Mana in 5017.

alright so I know it's been a LONG ass time since I have posted here in epvp so the day earlier I was workin on dis source(5017) and noticed it didn't load the Mana properly for the character...not even if it's already in a table in characters it has not been checked so it could be compatible if you tweak it with character HP and make another variable with it.

so I took my time and saw how character HP was made and coded and then I took and made a void to at least stabilize the character Mana for now... so PLEASE don't flame me as I have not been coding for a while now(started like a week ago)...

go to character.cs

and find:

Code:
public uint CurHP = 0;
under it add:

Code:
public uint MaxMP = 0;
        public uint CurMP = 0;
then search for this:

Code:
public uint BaseMaxHP()
and under that whole void add:

Code:
public uint BaseMaxMP()
        {
            Ready = false;
            
            ushort mp = 0;
            if (Job != 100 && Job != 101)
                mp = (ushort)(Spi * 15);
            else
                mp = (ushort)(Spi * 5);

            if (Job == 133 || Job == 143)
                mp = (ushort)((double)mp * 4 / 3);
            if (Job == 134 || Job == 144)
                mp = (ushort)((double)mp * 5 / 3);
            if (Job == 135 || Job == 145)
                mp *= 3;
            Ready = true;
            return (uint)mp;
        }
now find this:

Code:
else if (ItemParts[0] == "720013")
and add all of these under that:

Code:
else if (ItemParts[0] == "1001000")
        {
            CurMP += 70;
            if (CurMP > MaxMP)
                CurMP = MaxMP;
            MyClient.SendPacket(General.MyPackets.Vital(UID, 2, CurMP));
            RemoveItem(ItemUID);
        }
        else if (ItemParts[0] == "1001010")
        {
            CurMP += 200;
            if (CurMP > MaxMP)
                CurMP = MaxMP;
            MyClient.SendPacket(General.MyPackets.Vital(UID, 2, CurMP));
            RemoveItem(ItemUID);
        }
        else if (ItemParts[0] == "1001020")
        {
            CurMP += 450;
            if (CurMP > MaxMP)
                CurMP = MaxMP;
            MyClient.SendPacket(General.MyPackets.Vital(UID, 2, CurMP));
            RemoveItem(ItemUID);
        }
        else if (ItemParts[0] == "1001030")
        {
            CurMP += 1000;
            if (CurMP > MaxMP)
                CurMP = MaxMP;
            MyClient.SendPacket(General.MyPackets.Vital(UID, 2, CurMP));
            RemoveItem(ItemUID);
        }
        else if (ItemParts[0] == "1001040")
        {
            CurMP += 2000;
            if (CurMP > MaxMP)
                CurMP = MaxMP;
            MyClient.SendPacket(General.MyPackets.Vital(UID, 2, CurMP));
            RemoveItem(ItemUID);
        }
        else if (ItemParts[0] == "1002030")
        {
            CurMP += 3000;
            if (CurMP > MaxMP)
                CurMP = MaxMP;
            MyClient.SendPacket(General.MyPackets.Vital(UID, 2, CurMP));
            RemoveItem(ItemUID);
        }
        else if (ItemParts[0] == "1002040")
        {
            CurMP += 4500;
            if (CurMP > MaxMP)
                CurMP = MaxMP;
            MyClient.SendPacket(General.MyPackets.Vital(UID, 2, CurMP));
            RemoveItem(ItemUID);
        }
now find this:

Code:
MaxHP -= AddHP;
and under add this:

Code:
MaxMP -= AddMP;
now find this twice in there:

Code:
MaxHP = BaseMaxHP();
under both add this:

Code:
MaxMP = BaseMaxMP();
in that same section u might also wanna find

Code:
CurHP = MaxHP;
and under add:

Code:
CurMP = MaxMP;
then search for:

Code:
Charc.MaxHP = Charc.BaseMaxHP();
and under add:

Code:
Charc.MaxMP = Charc.BaseMaxMP();
also search twice for:

Code:
MyClient.SendPacket(General.MyPackets.Vital((long)UID, 0, CurHP));
and under both of it add:

Code:
MyClient.SendPacket(General.MyPackets.Vital((long)UID, 0, CurMP));
now go into database.cs and find:

Code:
Charr.CurHP = Convert.ToUInt16((uint)DR["CurrentHP"]);
under add:

Code:
Charr.CurMP = Convert.ToUInt16((uint)DR["CurrentMP"]);
now finally search for:

Code:
",`CurrentHP` = " + Charr.CurHP +
and right next to the '+' space it and add this:

Code:
",`CurrentMP` = " + Charr.CurMP +
and thats about it...if you do not find these then either post here your problems or if ur really "smart" you will know "exactly" where these will go and around where they will go.

oops, forgot about something...anyways if you DON'T have the CurrentMP in your characters table for w.e reason then here is mine...open design table in characters and add this field in there:

Code:
Name: CurrentMP
Type: int
Length: 16
Decimals: 0
Allow Null: it will get checked after you add it so just uncheck it...
save,exit - build, and debug. alright your done! please try to keep your comments positive I kno I still am part of the "noob" community...post any errors or any help and +thanks if I helped u in anyways possible.
killersub is offline  
Thanks
1 User
Old 08/09/2010, 09:50   #2


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Have you checked the mana values that your void returns? When compared to normal CO?
Korvacs is offline  
Thanks
2 Users
Old 08/09/2010, 16:16   #3
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by Korvacs View Post
Have you checked the mana values that your void returns? When compared to normal CO?
yes I have...as you see I said this will "probably" stabilize character mana for a lil bit so noobs wont ask "meng my mana doesnt go up it doesnt go down either!" I jus made this to make it load, did not do anything FANCY to it(was in a rush tho). if you wish to repair it den go ahead and be my guest bro
killersub is offline  
Old 08/09/2010, 16:51   #4


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
This should be significantly closer to the actual values, if not completely correct ( i havent checked in a while but it was correct at the time i made it)

Code:
            short MP = (short)(this.Spi * 5);
            switch (this.Class)
            {
                case 132:
                case 142:
                    MP *= 2;
                    break;
                case 133:
                case 143:
                    MP *= 3;
                    break;
                case 134:
                case 144:
                    MP *= 4;
                    break;
                case 135:
                case 145:
                    MP *= 5;
                    break;
            }
Korvacs is offline  
Thanks
1 User
Old 08/09/2010, 17:00   #5


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
Korvacs has the good one.

Taoist: +200%
Wizard: + 300%
Master: +400%
Saint: +500%
CptSky is offline  
Reply


Similar Threads Similar Threads
Release New Method of [Lock N Load + SmartzWHZ Wallhack] RELEASE FREE!!
09/22/2011 - Soldier Front Philippines - 12 Replies
#removed
[RELEASE]Big Project..5095,5065,5017,5017 (command Server)
10/01/2009 - CO2 PServer Guides & Releases - 23 Replies
Hi, Yes i made a big project with my self by my self i host i edit i control i code. The Project contain 3 Co plvling Servers and 1 Command server the plvling servers are Snow Server and Treasure island . snow server works with 5065 client and it have alot of edits , adds , well i have made 135 gears and you can upgrade it in market from De La Vega for 250k CPS for each item also you should get 1 blessing amulet to make dmg -1 and you can get it by killing 1000 Birdman or 1000 Snake man or...



All times are GMT +1. The time now is 00:32.


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.