Beispiel #1
0
        private static int FuncBody(IntPtr parLuaState)
        {
            if (Lua.ArgsCount(parLuaState) != 0)
            {
                return(0);
            }

            if (!enabled)
            {
                Lua.Print("Starting to loot all corpses in range");
                if (ObjectManager.EnumObjects())
                {
                    List <WoWUnit> mobs = ObjectManager.Mobs;
                    lootableUnits = mobs.OfType <WoWUnit>()
                                    .Where(i => i.CanBeLooted &&
                                           i.DistanceTo(ObjectManager.Player) < 4.20f)
                                    .OrderBy(i => i.DistanceTo(ObjectManager.Player))
                                    .ToList();
                    lootCounter = 0;
                    lootOpen    = false;
                    enabled     = true;
                    Wait.Remove("LootOpenBlacklist");
                    Wait.Remove("LootClickBlacklist");
                    AntiWarden.HookWardenMemScan.GetHack("LootPatch").Apply();
                    if (AutoLoot.enabled)
                    {
                        OnRightClickUnitHook.Remove();
                        OnRightClickObjectHook.Remove();
                    }
                    DirectX.RunInEndScene(EndScene);
                }
            }
            return(0);
        }
Beispiel #2
0
        private static int FuncBody(IntPtr parLuaState)
        {
            if (!enabled)
            {
                if (Lua.ArgsCount(parLuaState) != 1 || !Lua.IsString(parLuaState, 1))
                {
                    Lua.Print("Usage is UseItem(\\\"name\\\")");
                    return(0);
                }
                string item = Lua.ToString(parLuaState, 1);

                if (!ObjectManager.EnumObjects())
                {
                    return(0);
                }
                target = ObjectManager.Target;
                if (target == null)
                {
                    return(0);
                }

                if (ObjectManager.Player.Inventory.ItemCount(item) == 0)
                {
                    return(0);
                }
                ObjectManager.Player.Inventory.UseItem(item);
                enabled = true;
                DirectX.RunInEndScene(EndScene);
                Wait.Remove("GrenadeTimeout");
            }
            return(0);
        }
Beispiel #3
0
        private static int FuncBody(IntPtr parLuaState)
        {
            if (!enabled)
            {
                if (Lua.ArgsCount(parLuaState) != 1 || !Lua.IsString(parLuaState, 1))
                {
                    Lua.Print("Usage is UseSpell(\\\"name\\\")");
                    return(0);
                }
                string spell = Lua.ToString(parLuaState, 1);

                if (!ObjectManager.EnumObjects())
                {
                    return(0);
                }
                target = ObjectManager.Target;
                if (target == null)
                {
                    return(0);
                }

                Functions.DoString("CastSpellByName('" + spell + "');");
                enabled = true;
                DirectX.RunInEndScene(EndScene);
                Wait.Remove("SpellTimeout");
            }
            return(0);
        }
Beispiel #4
0
 internal ProfileCreator()
 {
     if (DirectX.RunInEndScene(CreateProfile))
     {
         Main.MainForm.lRecording.Text    = "Recording";
         Main.MainForm.lRecording.Visible = true;
     }
 }
Beispiel #5
0
 internal ProfileCreator(Forms.GraphicalProfileCreationForm newProfileForm)
 {
     usedProfileForm = newProfileForm;
     if (DirectX.RunInEndScene(CreateProfile))
     {
         usedProfileForm.lRecording.Text    = "Recording";
         usedProfileForm.Text               = "Recording new Profile";
         usedProfileForm.lRecording.Visible = true;
     }
 }
Beispiel #6
0
 internal bool Run()
 {
     if (!ObjectManager.EnumObjects())
     {
         return(false);
     }
     // start running the grindbot in endscene
     if (DirectX.RunInEndScene(RunGrinder))
     {
         // Enable the ctm patch to not stutter while walking
         Memory.GetHack("Ctm").Apply();
         ObjectManager.Player.TurnOnSelfCast();
         if (ObjectManager.Player.InGhostForm)
         {
             Access.Info.SpiritWalk.GeneratePath = true;
         }
         // we are running now
         Shared.ResetJumper();
         Wait.RemoveAll();
         return(true);
     }
     return(false);
 }