Horse mount - set target2

Datum: 22/11/2014 23:17:16

Staženo: 381x

Popis:

SET a UNSET (target)


Hodnocení: 3.8/10 (108 hlasy)

Download file:cs

Příkazy:

  • ,mountset
  • ,mount

Kód:

      [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);
        }

Nový komentář