Animal Taming + Pridavani do AB
Napsal: 13 srp 2010 14:19
Download vsech skriptu mnou uvedenych: http://dl.dropbox.com/u/7651700/fena/wizzy.cs
Objects.dll: http://dl.dropbox.com/u/7651700/fena/Objects.dll
,exec taming
- hidne a tamuje
- doplnuje staffku z kade
- sbira zvirata
,exec AnimalBoxAddAll
- vkladani zvirat do AB
neni to muj vytvor, (c) Tomb
Objects.dll: http://dl.dropbox.com/u/7651700/fena/Objects.dll
,exec taming
- hidne a tamuje
- doplnuje staffku z kade
- sbira zvirata
,exec AnimalBoxAddAll
- vkladani zvirat do AB
neni to muj vytvor, (c) Tomb
Kód: Vybrat vše
[Executable]
public void taming()
{
UO.WaitTargetCancel();
UO.AddObject("Zvire");
if (!World.Player.Layers[Layer.LeftHand].Exist) UO.UseType(0x13F4, 0x096D);
UO.DeleteJournal();
UO.DeleteJournal();
while (!Journal.Contains(true, "byl tamnut"))
{
using (JournalEventWaiter ew = new JournalEventWaiter(true, "Ochoceni se nezdarilo", "byl tamnut", "Jsi moc daleko"))
{
if (UO.InJournal("Jsi moc daleko"))
{
UO.Wait(2000);
UO.DeleteJournal();
}
World.Player.ChangeWarmode(WarmodeChange.Switch);
UO.Wait(100);
UO.UseSkill("Hiding");
UO.Wait(200);
UO.WaitTargetObject(Aliases.GetObject("Zvire"));
UO.UseType(0x13F4, 0x096D);
UO.Wait(100);
if (!ew.Wait(15000))
UO.PrintWarning("Taming timeout.");
}
}
UO.Wait(25);
PutAnimalDoScriptu();
if (UO.Count(0x1843, 0x0724) > 0)
{
UO.WaitTargetType(0x1843, 0x0724);
UO.UseType(0x13F4);
UO.Print("Hul nabita!");
}
else
{
UO.Print("Nemas kad na nabiti hole!");
}
UO.Print("Konec scriptu");
}
void PutAnimalDoScriptu()
{
ushort[] lootItem = new ushort[14];
lootItem[0] = 0x2121;
lootItem[1] = 0x2120;
lootItem[2] = 0x211F;
lootItem[3] = 0x2124;
lootItem[4] = 0x20F6;
lootItem[5] = 0x2137;
lootItem[6] = 0x2126;
lootItem[7] = 0x2127;
lootItem[8] = 0x2135;
lootItem[9] = 0x20E1; // polar bear
lootItem[10] = 0x20F7; // panther, walrus
lootItem[11] = 0x2119; // leopard/snow leopard1
lootItem[12] = 0x2102; // leopard/snow leopard2
lootItem[13] = 0x211D; // eagle
for (int i = 0; i < 14; i++)
{
UOItem lootItemSeber = World.Ground.FindType(lootItem[i]);
if (lootItemSeber.Exist)
{
UO.MoveItem(lootItemSeber, 1, Aliases.Backpack, 165, 55);
UO.Print("lootItem cislo {0} sebran", i);
return;
}
}
UO.Wait(50);
for (int i = 0; i < 14; i++)
{
UOItem lootItemSeber = World.Ground.FindType(lootItem[i]);
if (lootItemSeber.Exist)
{
UO.MoveItem(lootItemSeber, 1, Aliases.Backpack, 165, 55);
UO.Print("lootItem cislo {0} sebran", i);
return;
}
}
UO.Print("Zadny item k sebrani");
}
Kód: Vybrat vše
[Executable]
public void AnimalBoxAddAll()
{
ushort abGraphic = 0x09A8;
ushort[] abColor = new ushort[12];
abColor[0] = 0x0675;
abColor[1] = 0x0590;
abColor[2] = 0x0548;
abColor[3] = 0x0967;
abColor[4] = 0x083D;
abColor[5] = 0x0967;
abColor[6] = 0x0909;
abColor[7] = 0x0974;
abColor[8] = 0x074E;
abColor[9] = 0x0835;
abColor[10] = 0x0970;
abColor[11] = 0x0457;
ushort[] petGraphic = new ushort[12];
petGraphic[0] = 0x2136;
petGraphic[1] = 0x2136;
petGraphic[2] = 0x2136;
petGraphic[3] = 0x2136;
petGraphic[4] = 0x2135;
petGraphic[5] = 0x2137;
petGraphic[6] = 0x20F6;
petGraphic[7] = 0x2120;
petGraphic[8] = 0x2121;
petGraphic[9] = 0x211F;
petGraphic[10] = 0x2124;
petGraphic[11] = 0x2137;
ushort[] petColor = new ushort[12];
petColor[0] = 0x0675;
petColor[1] = 0x0590;
petColor[2] = 0x0548;
petColor[3] = 0x0000;
petColor[4] = 0x0000;
petColor[5] = 0x0000;
petColor[6] = 0x0000;
petColor[7] = 0x0000;
petColor[8] = 0x0000;
petColor[9] = 0x0000;
petColor[10] = 0x0000;
petColor[11] = 0x097A;
UO.Print("Zamer bednu s animal boxy");
UOItem animalBoxChest = World.GetItem(UIManager.TargetObject());
animalBoxChest.Use();
UO.Wait(500);
foreach (UOItem animalBox in animalBoxChest.AllItems)
{
if (animalBox.Graphic == abGraphic)
{
for (int i = 0; i < 12; i++)
{
if (animalBox.Color == abColor[i])
{
foreach (UOItem pet in World.Player.Backpack.Items)
{
if (pet.Graphic == petGraphic[i] && pet.Color == petColor[i])
{
UO.WaitTargetObject(pet);
animalBox.Use();
UO.Wait(500);
}
}
}
}
}
}
UO.Print("Konec vkladani");
}