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 void CheckPosition(object gump)
        {
            Size size = Core.GetGumpSize((ushort)gump);

            int nextX   = (int)OpenEUO.Get("NextCPosX")[0];
            int nextY   = (int)OpenEUO.Get("NextCPosY")[0];
            int cliLeft = (int)OpenEUO.Get("CliLeft")[0];
            int cliTop  = (int)OpenEUO.Get("CliTop")[0];
            int cliXRes = (int)OpenEUO.Get("CliXRes")[0] - size.Width;
            int cliYRes = (int)OpenEUO.Get("CliYRes")[0] - size.Height;

            if (nextX < cliLeft || nextX > cliLeft + cliXRes)
            {
                OpenEUO.Set("NextCPosX", cliLeft);
            }
            if (nextY < cliTop || nextY > cliTop + cliYRes)
            {
                OpenEUO.Set("NextCPosY", cliTop);
            }
        }
Beispiel #3
0
 private static void OnServerOrCharList(PacketReader p, PacketHandlerEventArgs args)
 {
     OpenEUO.CallAsync("Key", "ENTER");
 }
Beispiel #4
0
 private void OnUse()
 {
     new Assistant.Macros.UseSkillAction((int)skill).Perform();
     World.Player.LastSkill = (int)skill;
     OpenEUO.SetAsync("LSkill", (int)skill);
 }