Beispiel #1
0
 private void OnUse()
 {
     if (spell.Circle != 100)
     {
         KeyData key = HotKey.Get(spell.Name);
         if (key == null)
         {
             spell.OnCast(new CastSpellFromMacro((ushort)spell.GetID()));
         }
         else
         {
             key.Callback();
         }
         OpenEUO.SetAsync("LSpell", spell.GetID() - 1);
     }
     else
     {
         OpenEUO.CallAsync("Macro", spell.Number == 0 ? 35 : 36, 0);
     }
 }
Beispiel #2
0
        private static bool Hotkey(string command, Variable[] vars, bool quiet, bool force)
        {
            if (vars.Length < 1)
            {
                throw new RunTimeError("Usage: hotkey ('name of hotkey') OR (hotkeyId)");
            }

            string query = vars[0].AsString();

            KeyData hk = HotKey.GetByNameOrId(query);

            if (hk == null)
            {
                throw new RunTimeError($"{command} - Hotkey '{query}' not found");
            }

            hk.Callback();

            return(true);
        }
Beispiel #3
0
        private static bool Hotkey(string command, Argument[] args, bool quiet, bool force)
        {
            if (args.Length < 1)
            {
                throw new RunTimeError(null, "Usage: hotkey ('name of hotkey') OR (hotkeyId)");
            }

            string query = args[0].AsString();

            KeyData hk = HotKey.GetByNameOrId(query);

            if (hk == null)
            {
                throw new RunTimeError(null, $"Hotkey '{query}' not found");
            }

            hk.Callback();

            return(true);
        }