samehvan...
some days ago you have released the 1 st rebornc script...
i'm making the 2nd reborn script... but i wan't to use the rebitens void into it too... to do not make again the reb itens for 2 rb ...
but i've found some little bugs that i can't solve them.... i alreay try... take a look at the original code:
Code:
private static void RebItems(ClientSocket CSocket)
{
string CurItemId = "";//1=HeadG 2=NickG 3=Armor 4=RH 5=LH 6=Ring 7=MagicBottels 8=Boots 9=Garments
if (CSocket.Client.Equipment.ContainsKey(1))
{
CurItemId = Convert.ToString(CSocket.Client.Equipment[1].ItemID);
string Qual = CurItemId.Remove(0, CurItemId.Length - 1);
if (CurItemId == "118")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11800" + Qual;
}
else
{
string Main = CurItemId.Remove(4, 2);
CurItemId = Main + "0" + Qual; CSocket.Client.Equipment[1].ItemID = int.Parse(CurItemId);
}
}
if (CSocket.Client.Equipment.ContainsKey(2))
{
CurItemId = Convert.ToString(CSocket.Client.Equipment[2].ItemID);
string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3, 3);
CurItemId = Main + "00" + Qual; CSocket.Client.Equipment[2].ItemID = int.Parse(CurItemId);
}
if (CSocket.Client.Equipment.ContainsKey(3))
{
CurItemId = Convert.ToString(CSocket.Client.Equipment[3].ItemID);
string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(4, 2);
if (int.Parse(Main) > 129 && int.Parse(Main) < 135)
{
CurItemId = Main + "0" + Qual; CSocket.Client.Equipment[3].ItemID = int.Parse(CurItemId);
}
else
{
CurItemId = Convert.ToString((int.Parse(Main) - 50)) + "0" + Qual; CSocket.Client.Equipment[3].ItemID = int.Parse(CurItemId);
}
}
if (CSocket.Client.Equipment.ContainsKey(4))
{
CurItemId = Convert.ToString(CSocket.Client.Equipment[4].ItemID);
string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3, 3);
CurItemId = Main + "02" + Qual; CSocket.Client.Equipment[4].ItemID = int.Parse(CurItemId);
}
if (CSocket.Client.Equipment.ContainsKey(5))
{
CurItemId = Convert.ToString(CSocket.Client.Equipment[5].ItemID);
string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(4, 2);
if (Main.StartsWith("900"))//Shield
{
CurItemId = Main + "0" + Qual; CSocket.Client.Equipment[5].ItemID = int.Parse(CurItemId);
}
else if (Main.StartsWith("4") || Main.StartsWith("5"))
{
Main = CurItemId.Remove(3, 3);
CurItemId = Convert.ToString((int.Parse(Main) - 50)) + "02" + Qual; CSocket.Client.Equipment[5].ItemID = int.Parse(CurItemId);
}
}
if (CSocket.Client.Equipment.ContainsKey(6))
{
CurItemId = Convert.ToString(CSocket.Client.Equipment[6].ItemID);
string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3, 3);
CurItemId = Main + "01" + Qual; CSocket.Client.Equipment[6].ItemID = int.Parse(CurItemId);
}
if (CSocket.Client.Equipment.ContainsKey(8))
{
CurItemId = Convert.ToString(CSocket.Client.Equipment[8].ItemID);
string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3, 3);
CurItemId = Main + "01" + Qual; CSocket.Client.Equipment[8].ItemID = int.Parse(CurItemId);
}
for (byte gg=1;gg<9;gg++)
{
if (CSocket.Client.Equipment.ContainsKey(gg))
{
int Uid_ = CSocket.Client.Equipment[gg].UID;
ItemUnequip(gg, Uid_, CSocket);
ItemEquip(gg, Uid_, CSocket);
}
}
}
there are bugs into reb the armor, reborn the left hand weapon, and the headgear.
so i tryed to make a little diferent things one of them is that:
Code:
string CurItemId = "";//1=HeadG 2=NickG 3=Armor 4=RH 5=LH 6=Ring 7=MagicBottels 8=Boots 9=Garments
if (CSocket.Client.Equipment.ContainsKey(1))
{
CurItemId = Convert.ToString(CSocket.Client.Equipment[1].ItemID);
string Qual = CurItemId.Remove(0, CurItemId.Length - 1);
if (CurItemId == "110")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11000" + Qual;
}
else if (CurItemId == "111")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11100" + Qual;
}
else if (CurItemId == "1111")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11110" + Qual;
}
else if (CurItemId == "112")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11200" + Qual;
}
else if (CurItemId == "1121")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11210" + Qual;
}
else if (CurItemId == "113")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11300" + Qual;
}
else if (CurItemId == "1131")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11310" + Qual;
}
else if (CurItemId == "114")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11400" + Qual;
}
else if (CurItemId == "1141")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11410" + Qual;
}
else if (CurItemId == "115")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11500" + Qual;
}
else if (CurItemId == "1151")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11510" + Qual;
}
else if (CurItemId == "116")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11600" + Qual;
}
else if (CurItemId == "1161")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11610" + Qual;
}
else if (CurItemId == "117")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11700" + Qual;
}
else if (CurItemId == "1171")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11710" + Qual;
}
else if (CurItemId == "118")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11800" + Qual;
}
else if (CurItemId == "1181")
{
string Main = CurItemId.Remove(3, 3);
CurItemId = "11810" + Qual;
}
else
{
string Main = CurItemId.Remove(4, 2);
CurItemId = Main + "0" + Qual; CSocket.Client.Equipment[1].ItemID = int.Parse(CurItemId);
}
and here again:
Code:
if (CSocket.Client.Equipment.ContainsKey(5))
{
CurItemId = Convert.ToString(CSocket.Client.Equipment[5].ItemID);
string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(4, 2);
if (Main.StartsWith("900"))//Shield
{
CurItemId = Main + "00" + Qual; CSocket.Client.Equipment[5].ItemID = int.Parse(CurItemId);
}
else if (Main.StartsWith("410") || Main.StartsWith("420") || Main.StartsWith("480") || Main.StartsWith("5") || Main.StartsWith("601"))
{
CurItemId.Remove(0, CurItemId.Length - 1); Main = CurItemId.Remove(4, 2);
CurItemId = Main + "00" + Qual; CSocket.Client.Equipment[5].ItemID = int.Parse(CurItemId);
}
}
and the armor i have no idea how to fix (and the other two things i've posted are not fixed too, still trying to fix them..)
so if you or ANYONE here can help... i will over the 2nd reborn scrip and i will post it here....
i will sleep for now ... too tired... but feel free to post... tomorrow at the morning i will see what i can doo for it and with the help of you all!
tkx if someone help... cya!