Výroba lockpicků

Skripty týkající se tohoto externího programu

Moderátor: Caleb

Odpovědět
Lmk
Inkless
Inkless
Příspěvky: 22
Registrován: 13 dub 2014 16:20
Kontaktovat uživatele:

Výroba lockpicků

Příspěvek od Lmk »

Upraveno podle nějakýho jinýho skriptu.

Funkce: Zaměříte bednu s bronz ingama, vezme z ní 100 bronzu, vyrábí locky, když jich najde v báglu 100, tak je vrátí do bedny odkud bere bronz. Kdo by chtěl vyrábet po 50ti. Stačí řádek

Kód: Vybrat vše

UO.WaitMenu("Tinkering", "Tools", "Tools", "Lockpick");
změnit na

Kód: Vybrat vše

UO.WaitMenu("Tinkering", "Tools", "Tools", "50x Lockpick");
(snad) =)

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix.WorldData;
using Phoenix.Runtime;
using Phoenix;


namespace Phoenix.Script
{
  public class tink
  {
    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 locky()
    {
      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 kontejner s ingy:");
      UOItem container = new UOItem(UIManager.TargetObject());
      EnsureContainer(container);
      UOItem ingy = null;
      if ((ingy = container.Items.FindType(0x1BEF, 0x06D6)) == null)
      {
        UO.Print("Dosly Ingy:");
        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(lingy);
        UO.UseObject(tinkertools);
        UO.WaitMenu("Tinkering", "Tools", "Tools", "Lockpick");
        JournalEventWaiter jew = new JournalEventWaiter(true, "You put the", "You fail to create the item" );
        jew.Wait(2700);
        
        if ((ingy = UO.Backpack.Items.FindType(0x14FB, 0x0000)).Amount == 100)
        {
           
           UO.Backpack.Items.FindType(0x14FB, 0x0000).Move(100, container);
           UO.Print("Prenasim do bedny");
           UO.Wait(500);
           }

      }
    }

    public static UOItem GetIng(UOItem container)
    {
      UOItem ingy = null;
      if ((ingy = UO.Backpack.Items.FindType(0x1BEF, 0x06D6)).Serial != Serial.Invalid) return ingy;
      container.Items.FindType(0x1BEF, 0x06D6).Move(100, UO.Backpack);
      UO.Wait(500);      
      return UO.Backpack.Items.FindType(0x1BEF, 0x06D6);
    }
  }
}
Odpovědět