///////////////////////////////////////////////////////////////////////// // // www.ultima.smoce.net // Name: Horse mount - autosearch // ///////////////////////////////////////////////////////////////////////// using System; using System.Collections.Generic; using System.Text; using Phoenix; using Phoenix.WorldData; using System.Linq; using Phoenix.Communication; using Phoenix.Runtime; using Phoenix.Runtime.Reflection; namespace Scripts.DarkParadise { public class ultima_smoce_net_1779630862 { [Executable] public void VyhodJezditko() { Graphic[] jezditka = new Graphic[10]; jezditka[0] = 0x2124; jezditka[1] = 0x2120; jezditka[2] = 0x211F; jezditka[3] = 0x2121; jezditka[4] = 0x2136; jezditka[5] = 0x2137; jezditka[6] = 0x2126; jezditka[7] = 0x2127; jezditka[8] = 0x2135; jezditka[9] = 0x20F6; // mustang foreach (UOItem jezditko in World.Player.Backpack.AllItems) { for (int i = 0; i < jezditka.Length; i++) { if (jezditko.Graphic == jezditka) { { World.Player.ChangeWarmode(WarmodeChange.Switch); World.Player.ChangeWarmode(WarmodeChange.Switch); jezditko.Use(); UO.Print("Vyhazuji Jezditko"); UO.Wait(200); foreach (UOCharacter ch in World.Characters) { //if ((ch.Distance <= 5) && (ch.Renamable == true) && (ch.Serial != World.Player.Serial)) if ((ch.Distance == 0) && (ch.Serial != World.Player.Serial)) { UO.AddObject("mount", ch.Serial); UO.UseObject(Aliases.GetObject("Mount")); return; } } } } } } UO.Print("Nemas jezditko"); } } } } }