So today i saw this feature


- added support for assigning a mobile used to allow spawners to issue commands using the "COMMAND/commandstring" keyword by assigning the name of the mobile in the static CommandMobileName variable at line 341 in basexmlspawner.cs.
Commands in RunUO are required to have a mobile associated with their execution to allow accesslevel verification. This mobile will be used to issue all commands executed with the COMMAND keyword. The accesslevel of the mobile will determine the commands that can be issued.
This mobile can be a dummy character/creature that was created just for this purpose, or an existing character.
The commandstring is any string that you would normally type on the command line (without the command prefix).
Code:
private static string CommandMobileName = null;

If the value is left null, then the COMMAND keyword will only work with triggered spawners when the triggering player has sufficient accesslevel to issue the command.

BaseXmlspawner.cs

Code:
   #region Static variable declarations

        // name of mobile used to issue commands via the COMMAND keyword.  The accesslevel of the mobile will determine
        // the accesslevel of commands that can be issued.
        // if this is null, then COMMANDS can only be issued when triggered by players of the appropriate accesslevel
        private static string CommandMobileName = null;

        private static Hashtable typeKeywordHash;
        private static Hashtable typemodKeywordHash;
        private static Hashtable valueKeywordHash;
        private static Hashtable valuemodKeywordHash;
        private static Hashtable itemKeywordHash;

        private static char[] slashdelim = new char[1] { '.' };
        private static char[] commadelim = new char[1] { ',' };
        private static char[] spacedelim = new char[1] { ' ' };
        private static char[] semicolondelim = new char[1] { ';' };

        #endregion



I wonder how it works

I tried COMMAND/startevent but it didnt work

Im trying to make a command be executed every Hour, thats what im trying to do :/

Any help would be much appreciated, thanks
 
Last edited:
Heh, yeah, this is something I wish had gotten finished, well at least finished in terms of being able to execute any command. Commands that require you to target something, will not work. Your StartEvent command...what is it starting? What kind of command is it? Could you instead use an Xmlspawner, with specific trigger properties (TriggeronCarried, PlayerTriggerProperty, MobTrigProperty, etc)?
 
So the feature is not fully implemented?


The command spawn an item


Code:
 public class EggHunt
    {

        public static void Initialize()
        {
  
            CommandSystem.Register("eh", AccessLevel.Seer, new CommandEventHandler(StartEggHunt));
          
        }


Code:
public static void StartEggHunt(CommandEventArgs e)
        {
            Only_One_Egg();
            Item egg = new TheEgg(e.Mobile.Location, e.Mobile.Map);
            World.Broadcast(38, false, "Bla bla bla bla.");

        }

I cant spawn the item using xmlspawner, maybe because is not a constructable?
 
Last edited:
Back