BS
Napsal: 02.07.2013 20:24:06
Předělanej skript od někud na blacksmithy. Počká na world save a funguje good.
Kód: Vybrat vše
/////////////////////////////////////////////////////////////////////////
//
// www.ultima.smoce.net
// Name: BsTrain
//
/////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;
using Phoenix.WorldData;
using Phoenix.Runtime;
using Phoenix;
namespace Phoenix.Script
{
public class bstrain
{
public static void EnsureItem(UOItem item)
{
if (String.IsNullOrEmpty(item.Name)) item.Click();
UO.Wait(250);
}
public static void EnsureContainer(UOItem container)
{
EnsureItem(container);
container.Use();
UO.Wait(250);
}
[Executable]
public static void bs()
{
EnsureContainer(UO.Backpack);
UOItem kladivko = UO.Backpack.Items.FindType(0x13E4, 0x0000);
if (kladivko.Serial == Serial.Invalid)
{
kladivko = World.Player.Layers.FindType(0x13E4, 0x0000);
if (kladivko.Serial == Serial.Invalid)
{
UO.Print("Nemas kladivko");
return;
}
}
UO.Print("Zvol kontejner s ingy:");
UOItem container = new UOItem(UIManager.TargetObject());
EnsureContainer(container);
UOItem ingy = null;
if ((ingy = container.Items.FindType(0x1BEF, 0x0000)) == null)
{
UO.Print("DoslyIngy:");
return;
}
int count = ingy.Amount;
for (int i = 2; i > 1; i++)
{
if (UO.InJournal("World save"))
{
UO.Wait(30000);
UO.DeleteJournal();
}
UOItem ing = GetIng(container);
if (ing.Serial == Serial.Invalid)
{
UO.Print("Invalid:");
return;
}
//UO.Print("Dalsi prosim.");
//UO.WaitTargetObject(ingy);
UO.UseObject(ing);
UO.WaitMenu("Blacksmithing", "Iron Weapons", "Iron Weapons", "Swords & Blades", "Swords & Blades", "Dagger");
JournalEventWaiter jew = new JournalEventWaiter(true, "You put the", "You fail to create the item" );
jew.Wait(6200);
if (UO.Count(0x0F51, 0x0000) >= 10) //bs noziky
{
UOItem bstrian = World.Ground.FindType(0x0FB1, 0x0161);
bstrian.Use();
UO.Wait(100);
}
}
}
public static UOItem GetIng(UOItem container)
{
UOItem ing = null;
if ((ing = UO.Backpack.Items.FindType(0x1BEF, 0x0000)).Serial != Serial.Invalid) return ing;
container.Items.FindType(0x1BEF, 0x0000).Move(200, UO.Backpack);
UO.Wait(500);
return UO.Backpack.Items.FindType(0x1BEF, 0x0000);
}
}
}