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;
Code:
public uint MaxMP = 0;
public uint CurMP = 0;
Code:
public uint BaseMaxHP()
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;
}
Code:
else if (ItemParts[0] == "720013")
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);
}
Code:
MaxHP -= AddHP;
Code:
MaxMP -= AddMP;
Code:
MaxHP = BaseMaxHP();
Code:
MaxMP = BaseMaxMP();
Code:
CurHP = MaxHP;
Code:
CurMP = MaxMP;
Code:
Charc.MaxHP = Charc.BaseMaxHP();
Code:
Charc.MaxMP = Charc.BaseMaxMP();
Code:
MyClient.SendPacket(General.MyPackets.Vital((long)UID, 0, CurHP));
Code:
MyClient.SendPacket(General.MyPackets.Vital((long)UID, 0, CurMP));
Code:
Charr.CurHP = Convert.ToUInt16((uint)DR["CurrentHP"]);
Code:
Charr.CurMP = Convert.ToUInt16((uint)DR["CurrentMP"]);
Code:
",`CurrentHP` = " + Charr.CurHP +
Code:
",`CurrentMP` = " + Charr.CurMP +
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...






