Example #1
0
        internal static bool Init()
        {
            bool ccLoaded = CCManager.ChooseCustomClassByWowClass(ObjectManager.playerClass);

            if (ccLoaded)
            {
                Calls.DoString("ConsoleExec('Autointeract 0')");
                Calls.DoString("CameraZoomIn(50)");
                engine = new Engine();
                engine.States.Add(new stateAssistIdle());
                engine.States.Add(new stateAssistWalk());
                engine.States.Add(new stateAssistVendor());
                engine.States.Add(new stateAssistNeedRest());
                engine.States.Add(new stateAssistFight());
                engine.States.Add(new stateAssistDeath());
                engine.States.Add(new stateAssistDc());
                engine.States.Add(new stateAssistBuff());
                engine.States.Add(new stateAssistWait());
                engine.States.Add(new stateTeleToMaster());
                return(true);
            }
            else
            {
                MessageBox.Show("No CC found");
            }
            return(false);
        }
Example #2
0
        internal static bool Init()
        {
            bool ccLoaded      = CCManager.ChooseCustomClassByWowClass(ObjectManager.playerClass);
            bool profileLoaded = Data.getProfile();

            if (ccLoaded && profileLoaded)
            {
                string       txt          = "Port to first waypoint?";
                DialogResult dialogResult = MessageBox.Show(txt, "Port", MessageBoxButtons.YesNo);
                if (dialogResult == DialogResult.Yes)
                {
                    Ingame.Tele(Data.Profile[0], 60, false);
                }

                MasterContainer.Reset();
                Calls.DoString("ConsoleExec('Autointeract 0')");
                Calls.DoString("CameraZoomIn(50)");
                Data.curWp = MasterFunctions.GetClosestWaypoint(0);
                engine     = new Engine();
                engine.States.Add(new stateMasterIdle());
                engine.States.Add(new stateMasterWalk());
                engine.States.Add(new stateMasterGetTarget());
                engine.States.Add(new stateGrindEngage());
                engine.States.Add(new stateMasterNeedRest());
                engine.States.Add(new stateMasterLoot());
                engine.States.Add(new stateMasterFight());
                engine.States.Add(new stateMasterUnstuck());
                engine.States.Add(new stateMasterDc());
                engine.States.Add(new stateMasterBuff());
                engine.States.Add(new stateMasterDeath());
                engine.States.Add(new stateMasterVendor());
                engine.States.Add(new stateMasterWaitForSlaves());
                return(true);
            }
            else
            {
                MessageBox.Show("No CC found");
            }
            return(false);
        }
Example #3
0
        internal bool Prepare(string parProfilePath, Action parCallback)
        {
            if (!ObjectManager.EnumObjects() || !API.BMain.IsInGame)
            {
                return(false);
            }

            if (!string.IsNullOrEmpty(parProfilePath))
            {
                Profile = new GrindProfile(parProfilePath);
            }
            else
            {
                Profile = new GrindProfile();
            }


            if (!CCManager.ChooseCustomClassByWowClass((byte)ObjectManager.Player.Class))
            {
                Helpers.Logger.Append($"Couldnt find a usable Custom Class for the { ObjectManager.Player.Class } class! Aborting..");
                return(false);
            }

            StuckHelper = new _StuckHelper();
            Info        = new SessionContainer();
            if (Profile.ProfileValid)
            {
                Info.Waypoints.LoadFirstWaypointsAsync(parCallback);
            }

            var tmpStates = new List <State>
            {
                new StateFishing(700),
                new StateMountUp(699),
                new stateWaitForMembers(600),
                new StateFollowLeader(450),
                new StateIdle(int.MinValue),
                new StateWalkToGather(460),
                new StateFight(850),
                new StateRest(800),
                new StateBuff(750),
                new StateReleaseSpirit(950),
                new StateGhostWalk(900),
                new StateWalkBackToGrind(550),
                new StateAfterFightToPath(330),
                new StateWaitAfterFight(650),
                new StateDoRandomShit(190)
            };

            if (Profile.Factions != null)
            {
                tmpStates.Add(new StateFindTarget(200));
                tmpStates.Add(new StateApproachTarget(340));
            }

            if (Profile.Hotspots != null)
            {
                tmpStates.Add(new StateLoadNextHotspot(150));
                tmpStates.Add(new StateLoadNextWaypoint(140));
                tmpStates.Add(new StateWalk(100));
            }

            if (Settings.Settings.LootUnits)
            {
                tmpStates.Add(new StateLoot(500));
            }

            if (Profile.RepairNPC != null)
            {
                tmpStates.Add(new StateWalkToRepair(410));
                tmpStates.Add(new StateRepair(400));
            }

            if (Settings.Settings.BreakFor != 0 && Settings.Settings.ForceBreakAfter != 0)
            {
                Info.BreakHelper.SetBreakAt(60000);
                tmpStates.Add(new StateStartBreak(1500));
            }

            tmpStates.Sort();

            Engine = new _Engine(tmpStates);

            return(true);
        }
Example #4
0
        internal bool Prepare(string parProfilePath, Action parCallback)
        {
            if (!ObjectManager.EnumObjects())
            {
                return(false);
            }
            Profile = new GrindProfile(parProfilePath);
            if (!Profile.ProfileValid)
            {
                return(false);
            }

            if (!CCManager.ChooseCustomClassByWowClass((byte)ObjectManager.Player.Class))
            {
                MessageBox.Show("Couldnt find a Custom Class we can use");
                return(false);
            }

            StuckHelper = new _StuckHelper();
            Info        = new _Info();
            Info.Waypoints.LoadFirstWaypointsAsync(parCallback);

            var tmpStates = new List <State>
            {
                new StateIdle(),
                new StateLoadNextHotspot(),
                new StateLoadNextWaypoint(),
                new StateWalk(),
                new StateFindTarget(),
                new StateApproachTarget(),
                new StateFight(),
                new StateRest(),
                new StateBuff()
            };

            if (Options.LootUnits)
            {
                tmpStates.Add(new StateLoot());
            }
            tmpStates.Add(new StateReleaseSpirit());
            tmpStates.Add(new StateGhostWalk());
            tmpStates.Add(new StateWalkToRepair());
            tmpStates.Add(new StateWalkBackToGrind());
            tmpStates.Add(new StateAfterFightToPath());
            tmpStates.Add(new StateWaitAfterFight());
            tmpStates.Add(new StateDoRandomShit());

            if (Options.BreakFor != 0 && Options.ForceBreakAfter != 0)
            {
                Info.BreakHelper.SetBreakAt(60000);
                tmpStates.Add(new StateStartBreak());
            }

            if (Profile.RepairNPC != null)
            {
                tmpStates.Add(new StateRepair());
            }
            tmpStates.Sort();

            Engine = new _Engine(tmpStates);
            return(true);
        }