Taky nějakej pytlík kam házet hotový lodě.
Skript si hlídá přebytky hřebíků tak se zastaví jedině až dojde matroš
World save není ošetřenej zatím.
spouští se to:
,exec lode
Kód: Vybrat vše
/////////////////////////////////////////////////////////////////////////
//
// www.ultima.smoce.net
// Name: Carpentry - Lodě
//
/////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;
using Phoenix.WorldData;
using Phoenix.Runtime;
using Phoenix;
namespace Phoenix.Script
{
public class ships
{
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 lode()
{
EnsureContainer(UO.Backpack);
UOItem pilka = UO.Backpack.Items.FindType(0x1035 , 0x0000);
if (pilka.Serial == Serial.Invalid)
{
pilka = World.Player.Layers.FindType(0x1035, 0x0000);
if (pilka.Serial == Serial.Invalid)
{
UO.Print("Nemas pilku:");
return;
}
}
UO.Print("Zvol kontejner s Matrosem:");
UOItem container = new UOItem(UIManager.TargetObject());
UO.Print("Zvol kam davat deedy:");
UOItem hotovylode = new UOItem(UIManager.TargetObject());
for (int i = 2; i > 1; i++)
{
EnsureContainer(container);
container.Items.FindType(0x1BD7, 0x0000).Move(250, UO.Backpack);
UO.Wait(500);
UO.Print("prkna ready");
EnsureContainer(container);
container.Items.FindType(0x1BDD, 0x0000).Move(30, UO.Backpack);
UO.Wait(500);
UO.Print(" logy ready");
EnsureContainer(container);
container.Items.FindType(0x09A9, 0x0841).Move(1, UO.Backpack);
UO.Wait(500);
UO.UseType (0x09A9,0x0841);
EnsureContainer(container);
container.Items.FindType(0x09A9, 0x0841).Move(1, UO.Backpack);
UO.Wait(500);
UO.UseType (0x09A9,0x0841);
UO.UseType (0x09A9,0x0841);
UO.Print(" hrebiky ready ");
EnsureContainer(container);
container.Items.FindType(0x175D, 0x0000).Move(20, UO.Backpack);
UO.Wait(500);
UO.Print(" latka ready");
EnsureContainer(container);
container.Items.FindType(0x1055, 0x0000).Move(20, UO.Backpack);
UO.Wait(500);
UO.Print(" hinges ready");
UO.WaitMenu( "Carpentry", "Deeds to Ships", "Deeds to Ships", "Deed to a small ship" );
UO.UseObject(pilka);
UO.Wait(6000);
UOItem deed = World.Player.Backpack.AllItems.FindType(0x14F1);
UO.MoveItem(deed, 0, hotovylode);
UO.Wait(200);
if (UO.Count(0x102E) >= 25) // 25 hrebiku
{
EnsureContainer(container);
container.Items.FindType(0x1BDD, 0x0000).Move(2, UO.Backpack);
UO.Wait(500);
UO.Print(" logy ready");
UO.WaitMenu( "Carpentry", "Containers & Cont. parts", "Containers & Cont. parts", "Krabicka hrebiku" );
UO.UseObject(pilka);
UO.Wait(6000);
UOItem krabice = World.Player.Backpack.AllItems.FindType(0x09A9);
UO.MoveItem(krabice, 0, container);
UO.Wait(200);
}
}
}
}
}