Ok so this is what I have done and I still can't get mana to work,
Problems
1. Mana never goes down when casting spell (i.e nado)
2. Gourd Gives HP but not MP (i.e 0/800)
3. Mana pots don't seem to work but half way
Tao (full mana cause doe not go down)
Your mana is full you can not use this item (w/e)
Trojan with gourd 0/800
This item is not implemented yet blah (w/e)
Any tips would be nice,
Thanks in advance
If you rather pm things or msn me just let me know (will give msn to select people if needed)
#################
LOTF Source (TCWNN)
#################
CurMP, MaxMP
Code:
public ushort CurMP = 0;
public ushort MaxMP = 0;
Setting mana
Code:
public ushort BaseMana()
{
Ready = false;
ushort mp = (ushort)(Spi * 15);
if (Job == 133 || Job == 143)
mp = (ushort)(Spi * 20);
if (Job == 134 || Job == 144)
mp = (ushort)(Spi * 25);
if (Job == 135 || Job == 145)
mp = (ushort)(Spi * 30);
Ready = true;
return (ushort)mp;
}
Nado so it knows how much mana to remove (32,36,etc)
Code:
SkillAttributes[1002] = new ushort[4][];
SkillAttributes[1002][0] = new ushort[6] { 2, 0, 32, 505, 0, 0 };
SkillAttributes[1002][1] = new ushort[6] { 2, 0, 36, 666, 0, 0 };
SkillAttributes[1002][2] = new ushort[6] { 2, 0, 50, 882, 0, 0 };
SkillAttributes[1002][3] = new ushort[6] { 2, 0, 62, 1166, 0, 0 };
SkillsDone.Add(1002, 3);
Pots
Code:
else if (ItemParts[0] == "720014")
{
CurMP += 1000;
if (CurMP > MaxMP)
CurMP = MaxMP;
MyClient.SendPacket(General.MyPackets.Vital(UID, 0, CurMP));
RemoveItem(720014);
}
else if (ItemParts[0] == "720015")
{
CurMP += 2000;
if (CurMP > MaxMP)
CurMP = MaxMP;
MyClient.SendPacket(General.MyPackets.Vital(UID, 0, CurMP));
RemoveItem(720015);
}
else if (ItemParts[0] == "720016")
{
CurMP += 3000;
if (CurMP > MaxMP)
CurMP = MaxMP;
MyClient.SendPacket(General.MyPackets.Vital(UID, 0, CurMP));
RemoveItem(720016);
}
else if (ItemParts[0] == "720017")
{
CurMP += 4500;
if (CurMP > MaxMP)
CurMP = MaxMP;
MyClient.SendPacket(General.MyPackets.Vital(UID, 0, CurMP));
RemoveItem(720017);
}
Gourd
Code:
ushort ExtraHP = 0;
ushort ExtraAtk = 0;
ushort ExtraMP = 0;
if (ItemId == 137310)
ExtraHP = 30000;
if (ItemId == 2100025)
{
ExtraHP = 800;
ExtraMP = 800;
}
if (ItemId == 2100045)
ExtraMP = 400;
ushort AddDef = (ushort)(TheItem[10] + ushort.Parse(PItem[5]));
ushort AddMDef = (ushort)(TheItem[11] + ushort.Parse(PItem[7]));
ushort AddMinAtk = 0;
ushort AddMaxAtk = 0;
if (Pos != 5)
{
AddMinAtk = (ushort)(TheItem[8] + uint.Parse(PItem[3]) + ExtraAtk);
AddMaxAtk = (ushort)(TheItem[9] + uint.Parse(PItem[4]) + ExtraAtk);
}
else
{
AddMinAtk = (ushort)((TheItem[8] + uint.Parse(PItem[3]) + ExtraAtk) / 2);
AddMaxAtk = (ushort)((TheItem[9] + uint.Parse(PItem[4]) + ExtraAtk) / 2);
}
ushort AddMAtk = (ushort)(TheItem[12] + ushort.Parse(PItem[6]));
ushort AddHP = (ushort)(ItemEnchant + ExtraHP + ushort.Parse(PItem[2]));
ushort AddMP = (ushort)(ItemEnchant + ExtraMP + ushort.Parse(PItem[2]));
ushort AddDex = (ushort)(TheItem[14] + ushort.Parse(PItem[8]));
byte AddDodge = (byte)(TheItem[13] + byte.Parse(PItem[9]));
With this
Code:
if (SkillID == ManaSkill)
{
if (skilllvl == blabla)
CurMP -= blabla;
sendpacket.
I don't understand why you would need to define the skill a second time? If that make since, cause in database. Under SkillAttributes you are telling it how much to remove already?
I am very lost and this is one of the main things I want to work so I can start fixing and adding more skills and then work on damage's. If anyone can help me with MANA in general I would be very happy. I am trying to learn C# I am new to it, but I am trying to learn and not copy and paste things.