Stránka 1 z 1

Tinkering jen ze dřeva

Napsal: 02 črc 2013 20:26
od balík
Předělanej kript odněkud. Není třeba žádnej iron, jen si vezme dvojnásob dřeva,který není problém sehnat.

Kód: Vybrat vše


 
 /////////////////////////////////////////////////////////////////////////
 //
 //     www.ultima.smoce.net
 //     Name: axly
 //
 /////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;
using Phoenix.WorldData;
using Phoenix.Runtime;
using Phoenix;


namespace Phoenix.Script
{
  public class tinkering
  {
    public static void EnsureItem(UOItem item)
    {
      if (String.IsNullOrEmpty(item.Name)) item.Click();
      UO.Wait(800);
    }

    public static void EnsureContainer(UOItem container)
    {
      EnsureItem(container);
      container.Use();
      UO.Wait(500);
    }

    [Executable]
    public static void kraftiaxly()
    {
      EnsureContainer(UO.Backpack);
      UOItem tinkertools = UO.Backpack.Items.FindType(0x1EBC, 0x0000);
      

      
      if (tinkertools.Serial == Serial.Invalid) 
      {
        tinkertools = World.Player.Layers.FindType(0x0F51, 0x0000);
        if (tinkertools.Serial == Serial.Invalid)
        {
          UO.Print("Nemas naradi:");
          return;
        }
      }

      UO.Print("Zvol konterjner s logy:");
      UOItem container = new UOItem(UIManager.TargetObject());
      EnsureContainer(container);
      UOItem logs = null;
      if ((logs = container.Items.FindType(0x1BDD, 0x0000)) == null)
      {
        UO.Print("DoslyLogy:");
        return;
      }

      int count = logs.Amount;

      for (int i = 2; i > 1; i++)
      {
        if (UO.InJournal("World save"))
                  {
                     UO.Wait(30000);
                     UO.DeleteJournal();
                     
                  }
        
        UOItem log = GetLog(container);
        if (log.Serial == Serial.Invalid)
        {
          UO.Print("Invalid:");
          return;
        }
        //UO.Print("Dalsi prosim.");
        //UO.WaitTargetObject(log);
        UO.UseObject(tinkertools);
        UO.WaitMenu("Tinkering", "Wooden Items", "Wooden Items", "Axle");
        JournalEventWaiter jew = new JournalEventWaiter(true, "You put the", "You fail to create the item" );
        jew.Wait(2700);
        
        if ((log = UO.Backpack.Items.FindType(0x105B, 0x0000)).Amount == 100)
        {
           
           UO.Backpack.Items.FindType(0x105B, 0x0000).Move(100, container);
           UO.Print("Prenasim do bedny");
           UO.Wait(500);
           }

      }
    }

    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(100, UO.Backpack);
      UO.Wait(500);      
      return UO.Backpack.Items.FindType(0x1BDD, 0x0000);
    }
  }
}