Zdravím, mám tu problem s tímto kódem, bohužel nevím kde je rpoblém, protože Debugger nemůžu použít a ani nevím na jakým řádku nebo tak, ale podle syntaxe apod to je všechno okey.
public void Autoloot()
{
#region Itemy
string[] Items = new string[43];
Items[0] = "0x1BC4,0x1BC5,0x07EA";
Items[1] = "0x26C2,null,0x0809";
Items[2] = "0x0E89,0x0E8A,9x9455";
Items[3] = "0x0F50,0x0F4F,0x0810";
Items[4] = "0x1412,0x1419,0x0BB6";
Items[5] = "0x1413,null,0x0BB6";
Items[6] = "0x1415,0x1416,0x0BB6";
Items[7] = "0x1411,0x141A,0x0BB6";
Items[8] = "0x1417,0x1410,0x0BB6";
Items[9] = "0x1414,0x1418,0x0BB6";
Items[10] = "0x1B76,0x1B77,0x0BB6";
Items[11] = "0x1DB9,0x1DBA,0x07E9";
Items[12] = "0x13C7,null,0x07E9";
Items[13] = "0x13CC,0x13CC,0x07E9";
Items[14] = "0x13CB,0x13D2,0x07E9";
Items[15] = "0x13CD,0x13C5,0x07E9";
Items[16] = "0x13C6,0x13CE,0x07E9";
Items[17] = "0x0DF1,0x0DF0,0x07AD";
Items[18] = "0x1549,null,0x08A2";
Items[19] = "0x2B70,null,0x023D";
Items[20] = "0x108A,null,null";
Items[21] = "0x1088,0x1085,null";
Items[22] = "0x1086,null,null";
Items[23] = "0x1087,null,null";
Items[24] = "0x1BC3,null,0x07EB";
Items[25] = "0x1BC4,0x1BC5,0x07EB";
Items[26] = "0x140B,0x140A,0x079A";
Items[27] = "0x13EC,0x13ED,0x079A";
Items[28] = "0x13F0,0x13F1,0x079A";
Items[29] = "0x13EE,0x13EF,0x079A";
Items[30] = "0x13EB,0x13F2,0x079A";
Items[31] = "0x140B,0x140A,0x04D2";
Items[32] = "0x13EC,0x13ED,0x04D2";
Items[33] = "0x13F0,0x13F1,0x04D2";
Items[34] = "0x13EE,0x13EF,0x04D2";
Items[35] = "0x13EB,0x13F2,0x04D2";
Items[36] = "0x1DB9,0x1DBA,0x0810";
Items[37] = "0x13C7,null,0x0810";
Items[38] = "0x13CC,0x13CC,0x0810";
Items[39] = "0x13CB,0x13D2,0x0810";
Items[40] = "0x13CD,0x13C5,0x0810";
Items[41] = "0x13C6,0x13CE,0x0810";
Items[42] = "0x0E76,null,null";
#endregion
#region Kosti
ushort[] Kosti = new ushort[9];
Kosti[0] = 0x0ECA;
Kosti[1] = 0x0ECB;
Kosti[2] = 0x0ECC;
Kosti[3] = 0x0ECD;
Kosti[4] = 0x0ECE;
Kosti[5] = 0x0ECF;
Kosti[6] = 0x0ED0;
Kosti[7] = 0x0ED1;
Kosti[8] = 0x0ED2;
#endregion
Kelevar.RegisterMoveItem("mut");
if (World.Player.Layers[Layer.Mount].Exist)
{
UO.UseObject(World.Player.Serial);
UO.Wait(100);
}
UOItem Corpse = new UOItem(Aliases.GetObject("lastcoprse"));
//UO.WaitTargetObject(Corpse.Serial);
//UO.UseObject(0x40372FC8);
//UO.Wait(100);
for (int i = 0; i < Kosti.Length; i++)
{
UOItem Bones = new UOItem(Kosti[i]);
if (World.Ground.FindType(Kosti[i]).Amount > 0 && Bones.Distance < 3)
{
Bones.Use();
UO.AddObject("lastbones", Bones.Serial);
}
}
UOItem LootCorpse = new UOItem(Aliases.GetObject("lastcorpse"));
for (int i = 0; i < Items.Length; i++)
{
string Type_one = Items[i].Split(',')[0];
string Type_two = Items[i].Split(',')[1];
string Type_col = Items[i].Split(',')[2];
#region Dve_Type_S_Barvou
if (Type_one != "null" && Type_two != "null" && Type_col != "null")
{
for (int a = 0; a < LootCorpse.AllItems.Count(ushort.Parse(Type_one), ushort.Parse(Type_col)); a++)
{
UOItem Item = new UOItem(LootCorpse.AllItems.FindType(ushort.Parse(Type_one), ushort.Parse(Type_col)));
Kelevar.MoveItemPause(Item.Serial, Item.Amount, World.Player.Backpack, 500);
UO.Wait(500);
}
for (int a = 0; a < LootCorpse.AllItems.Count(ushort.Parse(Type_two), ushort.Parse(Type_col)); a++)
{
UOItem Item = new UOItem(LootCorpse.AllItems.FindType(ushort.Parse(Type_two), ushort.Parse(Type_col)));
Kelevar.MoveItemPause(Item.Serial, Item.Amount, World.Player.Backpack, 500);
UO.Wait(500);
}
}
#endregion
#region Dve_Type_Bez_Barvy
if (Type_one != "null" && Type_two != "null" && Type_col == "null")
{
for (int a = 0; a < LootCorpse.AllItems.Count(ushort.Parse(Type_one)); a++)
{
UOItem Item = new UOItem(LootCorpse.AllItems.FindType(ushort.Parse(Type_one)));
Kelevar.MoveItemPause(Item.Serial, Item.Amount, World.Player.Backpack, 500);
UO.Wait(500);
}
for (int a = 0; a < LootCorpse.AllItems.Count(ushort.Parse(Type_two)); a++)
{
UOItem Item = new UOItem(LootCorpse.AllItems.FindType(ushort.Parse(Type_two)));
Kelevar.MoveItemPause(Item.Serial, Item.Amount, World.Player.Backpack, 500);
UO.Wait(500);
}
}
#endregion
#region Jedno_Type_S_Barvou
if (Type_one != "null" && Type_two == "null" && Type_col != "null")
{
for (int a = 0; a < LootCorpse.AllItems.Count(ushort.Parse(Type_one), ushort.Parse(Type_col)); a++)
{
UOItem Item = new UOItem(LootCorpse.AllItems.FindType(ushort.Parse(Type_one), ushort.Parse(Type_col)));
Kelevar.MoveItemPause(Item.Serial, Item.Amount, World.Player.Backpack, 500);
UO.Wait(500);
}
}
#endregion
#region Jedno_Type_Bez_Barvy
if (Type_one != "null" && Type_two == "null" && Type_col == "null")
{
for (int a = 0; a < LootCorpse.AllItems.Count(ushort.Parse(Type_one)); a++)
{
UOItem Item = new UOItem(LootCorpse.AllItems.FindType(ushort.Parse(Type_one)));
Kelevar.MoveItemPause(Item.Serial, Item.Amount, World.Player.Backpack, 500);
UO.Wait(500);
}
}
#endregion
}
}
jenom vím, že se to dostane na kód s rozdělením stringu -> Sem
string Type_one = Items[i].Split(',')[0];
string Type_two = Items[i].Split(',')[1];
string Type_col = Items[i].Split(',')[2];
Rozdělí to dobře, ale dál už to napíše tu hlášku, viz název vlákna ...
Děkuji moc za pomoc