كود:
using ConquerVirusX.Database;
using ConquerVirusX.Network;
using ConquerVirusX.Network.GamePackets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConquerVirusX
{
class Anima
{
public static string[] GetAnimaForThisPlayer(Client.GameState client)
{
string[] P = new string[8];
foreach (ConquerItem Mido in client.Equipment.Objects)
{
if (Mido != null)
{
if (Mido.Position == ConquerItem.Head)
{
P[1] = GetAnimaName(Mido.Anima);
}
if (Mido.Position == ConquerItem.Boots)
{
P[2] = GetAnimaName(Mido.Anima);
}
if (Mido.Position == ConquerItem.Ring)
{
P[3] = GetAnimaName(Mido.Anima);
}
if (Mido.Position == ConquerItem.Necklace)
{
P[4] = GetAnimaName(Mido.Anima);
}
if (Mido.Position == ConquerItem.RightWeapon)
{
P[5] = GetAnimaName(Mido.Anima);
}
if (Mido.Position == ConquerItem.LeftWeapon)
{
P[6] = GetAnimaName(Mido.Anima);
}
if (Mido.Position == ConquerItem.Armor)
{
P[7] = GetAnimaName(Mido.Anima);
}
}
}
return P;
}
public static uint GetAnimaBP(uint ID)
{
uint P = 0;
if (ID == 0)
P = 0;
if (ID == 4200001 || ID == 4200002 || ID == 4200003)
P = 1;
if (ID == 4200004)
P = 2;
if (ID == 4200005)
P = 3;
if (ID == 4200006)
P = 4;
if (ID == 4200007)
P = 5;
if (ID == 4200008)
P = 6;
if (ID == 4200009)
P = 7;
if (ID == 4200010)
P = 8;
if (ID == 4200011)
P = 9;
if (ID == 4200012)
P = 10;
if (ID == 4200013)
P = 11;
if (ID == 4200014)
P = 12;
if (ID == 4200015)
P = 13;
if (ID == 4200016)
P = 14;
if (ID == 4200017)
P = 15;
if (ID == 4200018)
P = 16;
return P;
}
public static string GetAnimaName(uint ID)
{
string P = "";
if (ID == 0)
P = "No Anima";
if (ID == 4200001)
P = "AnimaP1";
if (ID == 4200002)
P = "AnimaP2";
if (ID == 4200003)
P = "AnimaP3";
if (ID == 4200004)
P = "AnimaP4";
if (ID == 4200005)
P = "AnimaP5";
if (ID == 4200006)
P = "AnimaP6";
if (ID == 4200007)
P = "AnimaP7";
if (ID == 4200008)
P = "AnimaP8";
if (ID == 4200009)
P = "AnimaP9";
if (ID == 4200010)
P = "AnimaP10";
if (ID == 4200011)
P = "AnimaP11";
if (ID == 4200012)
P = "AnimaP12";
if (ID == 4200013)
P = "AnimaP13";
if (ID == 4200014)
P = "AnimaP14";
if (ID == 4200015)
P = "AnimaP15";
if (ID == 4200016)
P = "AnimaP16";
if (ID == 4200017)
P = "AnimaP17";
if (ID == 4200018)
P = "AnimaP18";
return P;
}
public static void CalAnimaPB(Client.GameState client)
{
client.Entity.ExtraBattlePower = 0;
foreach (ConquerItem Mido in client.Equipment.Objects)
{
if (Mido != null)
{
if (Mido.Position == ConquerItem.Head)
{
uint mido = Anima.GetAnimaBP(Mido.Anima);
client.Entity.ExtraBattlePower += mido;
}
if (Mido.Position == ConquerItem.Boots)
{
uint mido = Anima.GetAnimaBP(Mido.Anima);
client.Entity.ExtraBattlePower += mido;
}
if (Mido.Position == ConquerItem.Ring)
{
uint mido = Anima.GetAnimaBP(Mido.Anima);
client.Entity.ExtraBattlePower += mido;
}
if (Mido.Position == ConquerItem.Necklace)
{
uint mido = Anima.GetAnimaBP(Mido.Anima);
client.Entity.ExtraBattlePower += mido;
}
if (Mido.Position == ConquerItem.RightWeapon)
{
uint mido = Anima.GetAnimaBP(Mido.Anima);
client.Entity.ExtraBattlePower += mido;
}
if (Mido.Position == ConquerItem.LeftWeapon)
{
uint mido = Anima.GetAnimaBP(Mido.Anima);
client.Entity.ExtraBattlePower += mido;
}
if (Mido.Position == ConquerItem.Armor)
{
uint mido = Anima.GetAnimaBP(Mido.Anima);
client.Entity.ExtraBattlePower += mido;
}
}
client.SendScreen(client.Entity.CharBuffer.ToConquerPacket(10014), false);
client.Entity.ExtraBattlePower += 0;
}
}
public static void UpgradeAnima(Client.GameState client, uint AnimaID)
{
uint Percent = 20;
switch (AnimaID)
{
case 4200001:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 2);
Random Mido = new Random();
uint midoR = (uint)Mido.Next(0, 4);
switch (midoR)
{
case 0:
{
client.Inventory.Add(4200002, 0, 1);
string Anima2 = GetAnimaName(4200002);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 1:
{
client.Inventory.Add(4200003, 0, 1);
string Anima2 = GetAnimaName(4200003);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 2:
{
client.Inventory.Add(4200007, 0, 1);
string Anima2 = GetAnimaName(4200007);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 3:
{
client.Inventory.Add(4200009, 0, 1);
string Anima2 = GetAnimaName(4200002);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
}
}
else
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 1);
client.MessageBox("You Upgrade Has failed But Only One " + Anima1 + " Remove");
}
else
{
client.Inventory.Remove(AnimaID, 2);
client.MessageBox("You Upgrade Has failed And Two " + Anima1 + " Remove");
}
}
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
case 4200002:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 2);
Random Mido = new Random();
uint midoR = (uint)Mido.Next(0, 4);
switch (midoR)
{
case 0:
{
client.Inventory.Add(4200003, 0, 1);
string Anima2 = GetAnimaName(4200003);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 1:
{
client.Inventory.Add(4200004, 0, 1);
string Anima2 = GetAnimaName(4200004);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 2:
{
client.Inventory.Add(4200008, 0, 1);
string Anima2 = GetAnimaName(4200008);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 3:
{
client.Inventory.Add(4200010, 0, 1);
string Anima2 = GetAnimaName(4200010);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
}
}
else
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 1);
client.MessageBox("You Upgrade Has failed But Only One " + Anima1 + " Remove");
}
else
{
client.Inventory.Remove(AnimaID, 2);
client.MessageBox("You Upgrade Has failed And Two " + Anima1 + " Remove");
}
}
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
case 4200003:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 2);
Random Mido = new Random();
uint midoR = (uint)Mido.Next(0, 4);
switch (midoR)
{
case 0:
{
client.Inventory.Add(4200004, 0, 1);
string Anima2 = GetAnimaName(4200004);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 1:
{
client.Inventory.Add(4200005, 0, 1);
string Anima2 = GetAnimaName(4200005);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 2:
{
client.Inventory.Add(4200009, 0, 1);
string Anima2 = GetAnimaName(4200009);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 3:
{
client.Inventory.Add(4200011, 0, 1);
string Anima2 = GetAnimaName(4200011);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
}
}
else
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 1);
client.MessageBox("You Upgrade Has failed But Only One " + Anima1 + " Remove");
}
else
{
client.Inventory.Remove(AnimaID, 2);
client.MessageBox("You Upgrade Has failed And Two " + Anima1 + " Remove");
}
}
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
case 4200004:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 2);
Random Mido = new Random();
uint midoR = (uint)Mido.Next(0, 4);
switch (midoR)
{
case 0:
{
client.Inventory.Add(4200005, 0, 1);
string Anima2 = GetAnimaName(4200005);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 1:
{
client.Inventory.Add(4200006, 0, 1);
string Anima2 = GetAnimaName(4200006);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 2:
{
client.Inventory.Add(4200010, 0, 1);
string Anima2 = GetAnimaName(4200010);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 3:
{
client.Inventory.Add(4200012, 0, 1);
string Anima2 = GetAnimaName(4200012);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
}
}
else
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 1);
client.MessageBox("You Upgrade Has failed But Only One " + Anima1 + " Remove");
}
else
{
client.Inventory.Remove(AnimaID, 2);
client.MessageBox("You Upgrade Has failed And Two " + Anima1 + " Remove");
}
}
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
case 4200005:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 2);
Random Mido = new Random();
uint midoR = (uint)Mido.Next(0, 4);
switch (midoR)
{
case 0:
{
client.Inventory.Add(4200006, 0, 1);
string Anima2 = GetAnimaName(4200006);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 1:
{
client.Inventory.Add(4200007, 0, 1);
string Anima2 = GetAnimaName(4200007);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 2:
{
client.Inventory.Add(4200011, 0, 1);
string Anima2 = GetAnimaName(4200011);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 3:
{
client.Inventory.Add(4200013, 0, 1);
string Anima2 = GetAnimaName(4200013);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
}
}
else
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 1);
client.MessageBox("You Upgrade Has failed But Only One " + Anima1 + " Remove");
}
else
{
client.Inventory.Remove(AnimaID, 2);
client.MessageBox("You Upgrade Has failed And Two " + Anima1 + " Remove");
}
}
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
case 4200006:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 2);
Random Mido = new Random();
uint midoR = (uint)Mido.Next(0, 4);
switch (midoR)
{
case 0:
{
client.Inventory.Add(4200007, 0, 1);
string Anima2 = GetAnimaName(4200007);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 1:
{
client.Inventory.Add(4200008, 0, 1);
string Anima2 = GetAnimaName(4200008);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 2:
{
client.Inventory.Add(4200012, 0, 1);
string Anima2 = GetAnimaName(4200012);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 3:
{
client.Inventory.Add(4200014, 0, 1);
string Anima2 = GetAnimaName(4200014);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
}
}
else
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 1);
client.MessageBox("You Upgrade Has failed But Only One " + Anima1 + " Remove");
}
else
{
client.Inventory.Remove(AnimaID, 2);
client.MessageBox("You Upgrade Has failed And Two " + Anima1 + " Remove");
}
}
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
case 4200007:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 2);
Random Mido = new Random();
uint midoR = (uint)Mido.Next(0, 4);
switch (midoR)
{
case 0:
{
client.Inventory.Add(4200008, 0, 1);
string Anima2 = GetAnimaName(4200008);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 1:
{
client.Inventory.Add(4200009, 0, 1);
string Anima2 = GetAnimaName(4200009);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 2:
{
client.Inventory.Add(4200013, 0, 1);
string Anima2 = GetAnimaName(4200013);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 3:
{
client.Inventory.Add(4200015, 0, 1);
string Anima2 = GetAnimaName(4200015);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
}
}
else
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 1);
client.MessageBox("You Upgrade Has failed But Only One " + Anima1 + " Remove");
}
else
{
client.Inventory.Remove(AnimaID, 2);
client.MessageBox("You Upgrade Has failed And Two " + Anima1 + " Remove");
}
}
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
case 4200008:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 2);
Random Mido = new Random();
uint midoR = (uint)Mido.Next(0, 4);
switch (midoR)
{
case 0:
{
client.Inventory.Add(4200009, 0, 1);
string Anima2 = GetAnimaName(4200009);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 1:
{
client.Inventory.Add(4200010, 0, 1);
string Anima2 = GetAnimaName(4200010);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 2:
{
client.Inventory.Add(4200014, 0, 1);
string Anima2 = GetAnimaName(4200014);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 3:
{
client.Inventory.Add(4200016, 0, 1);
string Anima2 = GetAnimaName(4200016);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
}
}
else
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 1);
client.MessageBox("You Upgrade Has failed But Only One " + Anima1 + " Remove");
}
else
{
client.Inventory.Remove(AnimaID, 2);
client.MessageBox("You Upgrade Has failed And Two " + Anima1 + " Remove");
}
}
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
case 4200009:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 2);
Random Mido = new Random();
uint midoR = (uint)Mido.Next(0, 4);
switch (midoR)
{
case 0:
{
client.Inventory.Add(4200010, 0, 1);
string Anima2 = GetAnimaName(4200010);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 1:
{
client.Inventory.Add(4200011, 0, 1);
string Anima2 = GetAnimaName(4200011);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 2:
{
client.Inventory.Add(4200015, 0, 1);
string Anima2 = GetAnimaName(4200015);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 3:
{
client.Inventory.Add(4200017, 0, 1);
string Anima2 = GetAnimaName(4200017);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
}
}
else
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 1);
client.MessageBox("You Upgrade Has failed But Only One " + Anima1 + " Remove");
}
else
{
client.Inventory.Remove(AnimaID, 2);
client.MessageBox("You Upgrade Has failed And Two " + Anima1 + " Remove");
}
}
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
case 4200010:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 2);
Random Mido = new Random();
uint midoR = (uint)Mido.Next(0, 4);
switch (midoR)
{
case 0:
{
client.Inventory.Add(4200011, 0, 1);
string Anima2 = GetAnimaName(4200011);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 1:
{
client.Inventory.Add(4200012, 0, 1);
string Anima2 = GetAnimaName(4200012);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 2:
{
client.Inventory.Add(4200015, 0, 1);
string Anima2 = GetAnimaName(4200015);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 3:
{
client.Inventory.Add(4200017, 0, 1);
string Anima2 = GetAnimaName(4200017);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
}
}
else
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 1);
client.MessageBox("You Upgrade Has failed But Only One " + Anima1 + " Remove");
}
else
{
client.Inventory.Remove(AnimaID, 2);
client.MessageBox("You Upgrade Has failed And Two " + Anima1 + " Remove");
}
}
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
case 4200011:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 2);
Random Mido = new Random();
uint midoR = (uint)Mido.Next(0, 4);
switch (midoR)
{
case 0:
{
client.Inventory.Add(4200012, 0, 1);
string Anima2 = GetAnimaName(4200012);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 1:
{
client.Inventory.Add(4200013, 0, 1);
string Anima2 = GetAnimaName(4200013);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 2:
{
client.Inventory.Add(4200015, 0, 1);
string Anima2 = GetAnimaName(4200015);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 3:
{
client.Inventory.Add(4200017, 0, 1);
string Anima2 = GetAnimaName(4200017);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
}
}
else
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 1);
client.MessageBox("You Upgrade Has failed But Only One " + Anima1 + " Remove");
}
else
{
client.Inventory.Remove(AnimaID, 2);
client.MessageBox("You Upgrade Has failed And Two " + Anima1 + " Remove");
}
}
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
case 4200012:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 2);
Random Mido = new Random();
uint midoR = (uint)Mido.Next(0, 3);
switch (midoR)
{
case 0:
{
client.Inventory.Add(4200013, 0, 1);
string Anima2 = GetAnimaName(4200013);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 1:
{
client.Inventory.Add(4200015, 0, 1);
string Anima2 = GetAnimaName(4200015);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
case 2:
{
client.Inventory.Add(4200017, 0, 1);
string Anima2 = GetAnimaName(4200017);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
break;
}
}
}
else
{
if (Kernel.RateM(Percent))
{
client.Inventory.Remove(AnimaID, 1);
client.MessageBox("You Upgrade Has failed But Only One " + Anima1 + " Remove");
}
else
{
client.Inventory.Remove(AnimaID, 2);
client.MessageBox("You Upgrade Has failed And Two " + Anima1 + " Remove");
}
}
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
case 4200013:
case 4200014:
case 4200015:
case 4200016:
case 4200017:
{
string Anima1 = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 2))
{
client.Inventory.Remove(AnimaID, 2);
client.Inventory.Add(AnimaID + 1, 0, 1);
string Anima2 = GetAnimaName(AnimaID + 1);
client.MessageBox("Congratulations You Have Upgrade " + Anima1 + " To " + Anima2 + " Successfully");
}
else
client.MessageBox("Sorry Man But You Should Have 2 " + Anima1 + "");
break;
}
}
}
public static void RemoveAnima(Client.GameState client, ConquerItem Mido)
{
if (Mido.Anima == 0)
{
client.MessageBox("Your Item Hasn't Anima");
}
else
{
uint AnimaID = Mido.Anima;
Mido.Anima = 0;
Mido.Send(client);
Mido.Enchant = 0;
ConquerItemTable.UpdateEnchant(Mido);
ConquerItemTable.UpdateAnima(Mido);
client.Inventory.Add(AnimaID, 0, 1);
CalAnimaPB(client);
Mido.Send(client);
string Name = GetAnimaName(AnimaID);
client.MessageBox("You Have Remove " + Name + " From Item. It Now In Your Inventory");
}
}
public static void AnimaEmbedd(Client.GameState client, ConquerItem Mido, uint AnimaID)
{
switch (AnimaID)
{
case 4200001:
case 4200002:
case 4200003:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(AnimaID, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(AnimaID, 1);
Mido.Anima = AnimaID;
uint id = AnimaID - 4200000;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
{
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
}
else
{
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
}
break;
}
case 4200004:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200004, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200004, 1);
Mido.Anima = 4200004;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
{
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
}
break;
}
case 4200005:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200005, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200005, 1);
Mido.Anima = 4200005;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200006:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200006, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200006, 1);
Mido.Anima = 4200006;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200007:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200007, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200007, 1);
Mido.Anima = 4200007;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200008:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200008, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200008, 1);
Mido.Anima = 4200008;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200009:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200009, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200009, 1);
Mido.Anima = 4200009;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200010:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200010, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200010, 1);
Mido.Anima = 4200010;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200011:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200011, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200011, 1);
Mido.Anima = 4200011;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200012:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200012, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200012, 1);
Mido.Anima = 4200012;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200013:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200013, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200013, 1);
Mido.Anima = 4200013;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200014:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200014, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200014, 1);
Mido.Anima = 4200014;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200015:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200015, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200015, 1);
Mido.Anima = 4200015;
CalAnimaPB(client);
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200016:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200016, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200016, 1);
Mido.Anima = 4200016;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200017:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200017, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200017, 1);
Mido.Anima = 4200017;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
case 4200018:
{
string Name = GetAnimaName(AnimaID);
if (client.Inventory.Contains(4200018, 1))
{
if (Mido.Anima == 0)
{
PacketHandler.Send_Effect(client, 220, 164, 1, 2, "Embedd " + Name + "");
client.Inventory.Remove(4200018, 1);
Mido.Anima = 4200018;
Mido.Mode = Game.Enums.ItemMode.Update;
Mido.Send(client);
CalAnimaPB(client);
ConquerItemTable.UpdateAnima(Mido);
_String str = new _String(true);
str.TextsCount = 1;
str.PositionX = (ushort)client.Entity.X;
str.PositionY = (ushort)client.Entity.Y;
str.Type = _String.MapEffect;
str.Texts.Add("end_task");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
//client.MessageBox("Congratulations You Have Embed " + Name + " To Your Item");
}
else
client.MessageBox("Sorry Man But Your Item Have Anima You Should Remove it First To Embed Anther Anima");
}
else
client.MessageBox("Sorry You Don't have " + Name + " In Your Inventory");
break;
}
}
}
}
}