Taky je potřeba začínat s 2 iron orečkama v báglu. jinak to přestane.
Nejsem top skripter , ale funguje to tak neřešim kod :d
Kód: Vybrat vše
/////////////////////////////////////////////////////////////////////////
//
// www.ultima.smoce.net
// Name: Carpentry - Krafti Krabice Kadí
//
/////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;
using Phoenix.WorldData;
using Phoenix.Runtime;
using Phoenix;
namespace Phoenix.Script
{
public class krabicekadi
{
public static void EnsureItem(UOItem item)
{
if (String.IsNullOrEmpty(item.Name)) item.Click();
UO.Wait(200);
}
public static void EnsureContainer(UOItem container)
{
EnsureItem(container);
container.Use();
UO.Wait(200);
}
[Executable]
public static void kraftikrabicekadi()
{
EnsureContainer(UO.Backpack);
UOItem pilka = UO.Backpack.Items.FindType(0x1035 , 0x0000);
EnsureContainer(UO.Backpack);
UOItem tinkertools = UO.Backpack.Items.FindType(0x1EBC , 0x0000);
if (pilka.Serial == Serial.Invalid)
{
pilka = World.Player.Layers.FindType(0x1035, 0x0000);
if (pilka.Serial == Serial.Invalid)
{
UO.Print("Nemas pilku:");
return;
}
}
if (tinkertools.Serial == Serial.Invalid)
{
pilka = World.Player.Layers.FindType(0x1EBC , 0x0000);
if (tinkertools.Serial == Serial.Invalid)
{
UO.Print("Nemas tinkertools:");
return;
}
}
UO.Print("Zvol konterjner s materialem:");
UOItem container = new UOItem(UIManager.TargetObject());
EnsureContainer(container);
UOItem logs = null;
if ((logs = container.Items.FindType(0x1BDD, 0x0000)) == null)
{
UO.Print("DoslyLogy:");
return;
}
UOItem ingy = null;
if ((ingy = container.Items.FindType(0x1BEF, 0x06D6)) == null)
{
UO.Print("Dosly Bronz Ingy:");
return;
}
UOItem formys = null;
if ((formys = container.Items.FindType(0x0E7F, 0x0909)) == null)
{
UO.Print("Dosly Formy:");
return;
}
UOItem ore = null;
if ((ore = container.Items.FindType(0x19B9, 0x0000)) == null)
{
UO.Print("Dosly ore:");
return;
}
string[] journal = { "Too many"};
while (!Journal.Contains(true, journal))
{
UOItem log = GetLog(container);
if (log.Serial == Serial.Invalid)
{
UO.Print("Invalid:");
return;
}
UOItem ings = GetIng(container);
if (ings.Serial == Serial.Invalid)
{
UO.Print("Invalid:");
return;
}
UOItem formes = GetForm(container);
if (formes.Serial == Serial.Invalid)
{
UO.Print("Invalid:");
return;
}
UOItem ores = Getores(container);
if (ores.Serial == Serial.Invalid)
{
UO.Print("Invalid:");
return;
}
// UO.Print("sychr " + i);
// UO.WaitTargetObject(log);
UO.WaitMenu( "Tinkering", "Containers", "Containers", "Kad na potiony" );
UO.UseObject(tinkertools);
JournalEventWaiter jew = new JournalEventWaiter(true, "You put");
jew.Wait(2000);
if (UO.Count(0x1843, 0x00000) >= 20)
{
container.Items.FindType(0x1BDD, 0x0000).Move(3, UO.Backpack);
UO.Wait(500);
UO.WaitMenu( "Carpentry", "Miscellaneous", "Miscellaneous", "Krabice kadi" );
UO.UseObject(pilka);
JournalEventWaiter jew1 = new JournalEventWaiter(true, "You put");
jew1.Wait(8000);
while (UO.Count(0x185E, 0x07E0) > 0)
{
UOItem craftedItem = UO.Backpack.Items.FindType(0x185E, 0x07E0);
if (craftedItem.Serial != Serial.Invalid)
{
UO.Backpack.Items.FindType(0x185E, 0x07E0).Move(1, container);
UO.Wait(500);
}
}
}
}
}
//logy
public static UOItem GetLog(UOItem container)
{
UOItem log = null;
if ((log = UO.Backpack.Items.FindType(0x1BDD, 0x0000)).Serial != Serial.Invalid) return log;
container.Items.FindType(0x1BDD, 0x0000).Move(2, UO.Backpack);
UO.Wait(500);
//UO.Print("1");
return UO.Backpack.Items.FindType(0x1BDD, 0x0000);
}
//bronz ing
public static UOItem GetIng(UOItem container)
{
UOItem ing = null;
if ((ing = UO.Backpack.Items.FindType(0x1BEF, 0x06D6)).Serial != Serial.Invalid) return ing;
container.Items.FindType(0x1BEF, 0x06D6).Move(1, UO.Backpack);
UO.Wait(500);
//UO.Print("1");
return UO.Backpack.Items.FindType(0x1BEF, 0x06D6);
}
//Formy
public static UOItem GetForm(UOItem container)
{
UOItem form = null;
if ((form = UO.Backpack.Items.FindType(0x0E7F, 0x0909)).Serial != Serial.Invalid) return form;
container.Items.FindType(0x0E7F, 0x0909).Move(1, UO.Backpack);
UO.Wait(500);
//UO.Print("1");
return UO.Backpack.Items.FindType(0x0E7F, 0x0909);
}
//Ore
public static UOItem Getores(UOItem container)
{
UOItem ore = null;
if ((ore = UO.Backpack.Items.FindType(0x19B9, 0x0000)).Serial != Serial.Invalid) return ore;
container.Items.FindType(0x19B9, 0x0000).Move(2, UO.Backpack);
UO.Wait(500);
//UO.Print("1");
return UO.Backpack.Items.FindType(0x19B9,0x0000 );
}
}
}