///////////////////////////////////////////////////////////////////////// // // www.ultima.smoce.net // Name: Horse mount - set target2 // ///////////////////////////////////////////////////////////////////////// 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_1779630707 { [Command] public static void MountSet() { UO.Print("Select your mount:"); Serial mount = UIManager.TargetObject(); if (mount.IsValid) Config.Profile.UserSettings.SetElement(mount, "Mount"); } [Command] public static void Mount() { if (!World.Player.Layers[Layer.Mount].Serial.IsValid) { Serial mount = Serial.Parse(Config.Profile.UserSettings.GetElement(Serial.Invalid.ToString(), "Mount")); if (!mount.IsValid) throw new ScriptErrorException("Invalid mount"); UO.UseObject(mount); } else UO.UseObject(World.Player.Serial); } } }