예제 #1
0
        public void takeOff()
        {
            //ChatWriter.send(MemoryHandler.process.MainWindowHandle, "/run if IsMounted() == nil then CallCompanion('MOUNT', " + mountNum + ") end");//"/click MultiBarRightButton1"

            if (getCurrRage() > 0)
            {
                System.Console.WriteLine("megtámadtak, bladestorm");
                ChatWriter.hitKey(ChatWriter.THREE);
                ChatWriter.hitKey(ChatWriter.THREE);
                ChatWriter.hitKey(ChatWriter.TWO);
                Thread.Sleep(8000);
                ChatWriter.hitKey(ChatWriter.FOUR);
                Thread.Sleep(2000);
            }

            ChatWriter.hitKey(ChatWriter.ONE);
            Thread.Sleep(2500);

            MemoryHandler.writeFloat(CTM_X, MemoryHandler.readFloat(X));
            MemoryHandler.writeFloat(CTM_Y, MemoryHandler.readFloat(Y));
            MemoryHandler.writeFloat(CTM_Z, MemoryHandler.readFloat(Z) + 800.0f);
            MemoryHandler.writeInt(CTM_Action, 4);

            //néha nem repül fel egyből, hanem megáll 1 méterre a föld felett, ezért ujra kell kattintani
            Thread.Sleep(1000);
            MemoryHandler.writeInt(CTM_Action, 4);

            Thread.Sleep(10000);
        }
예제 #2
0
 public void cannibalize()
 {
     stop();
     Thread.Sleep(1000);
     ChatWriter.hitKey(ChatWriter.I);
     Thread.Sleep(11000);
 }
예제 #3
0
        public void figth()
        {
            ChatWriter.hitKey(ChatWriter.NINE);
            if (0.7f > getHPPercentage() && metElite)
            {
                ChatWriter.hitKey(ChatWriter.EIGTH);
            }
            if (0.2f > getHPPercentage())
            {
                ChatWriter.hitKey(ChatWriter.V);
            }
            ChatWriter.hitKey(ChatWriter.SEVEN);
            if (800 < getCurrRage())
            {
                ChatWriter.hitKey(ChatWriter.SIX);
            }
            if (metElite)
            {
                ChatWriter.hitKey(ChatWriter.FIVE);
            }

            ChatWriter.hitKey(ChatWriter.FOUR);
            ChatWriter.hitKey(ChatWriter.THREE);
            ChatWriter.hitKey(ChatWriter.TWO);
            ChatWriter.hitKey(ChatWriter.ONE);
        }
예제 #4
0
 public void ressurrect()
 {
     while (getCurrHP() < 2)
     {
         ChatWriter.hitKey(ChatWriter.J);
         Thread.Sleep(2000);
         ulong shGUID = ObjectManager.sharedOM().getSpiritHealer();
         interactWithMouseOver(shGUID, 4000);
         ChatWriter.hitKey(ChatWriter.U);
     }
 }
예제 #5
0
 public void ressurrect()
 {
     ChatWriter.send(MemoryHandler.process.MainWindowHandle, "/script RepopMe()");
     Thread.Sleep(2000);
     //MemoryHandler.writeFloat(CTM_Distance, 0.5f);
     MemoryHandler.writeInt64(MOUSE_OVER_GUID, ObjectManager.sharedOM().getSHGUID());
     Thread.Sleep(500);
     ChatWriter.hitKey(0x042);
     Thread.Sleep(6000);
     ChatWriter.send(MemoryHandler.process.MainWindowHandle, "/run SelectGossipOption(1) AcceptXPLoss()");
     Thread.Sleep(6000);
 }
예제 #6
0
        public void interactWithMouseOver(ulong guid, int sleepTime = 1300)
        {
            //mozgás közben nem lehet lootolni
            stop();

            //az értékek beírása a memoriába
            MemoryHandler.writeULong(MOUSE_OVER_GUID, guid);

            ChatWriter.hitKey(ChatWriter.K);

            Thread.Sleep(sleepTime);
        }
예제 #7
0
        public void clickToLoot(Position3D position, ulong guid)
        {
            //az értékek beírása a memoriába
            MemoryHandler.writeULong(MOUSE_OVER_GUID, guid);
            //System.Console.WriteLine(guid.ToString("X"));
            ChatWriter.hitKey(ChatWriter.K);

            //MemoryHandler.writeInt(CTM_Action, 7);

            //amíg az action 7, azaz mozgásban van, addig várok

            Thread.Sleep(200);
        }
예제 #8
0
        public void runTo(Position3D pos)
        {
            MemoryHandler.writeFloat(CTM_X, pos.x);
            MemoryHandler.writeFloat(CTM_Y, pos.y);
            MemoryHandler.writeFloat(CTM_Z, pos.z);//MemoryHandler.readFloat(Z));
            MemoryHandler.writeInt(CTM_Action, 4);

            Thread.Sleep(200);
            if (nearPosition(pos, 6))
            {
                ChatWriter.hitKey(ChatWriter.W);
                Thread.Sleep(100);
            }
        }
예제 #9
0
        public void clickToLoot(Position3D position, Int64 guid)
        {
            //az értékek beírása a memoriába
            MemoryHandler.writeInt64(MOUSE_OVER_GUID, guid);
            System.Console.WriteLine(guid);
            ChatWriter.hitKey(0x042);

            //MemoryHandler.writeInt(CTM_Action, 7);

            //amíg az action 7, azaz mozgásban van, addig várok
            while (MemoryHandler.readInt(CTM_Action) == 7)
            {
                Thread.Sleep(200);
            }
            Thread.Sleep(400);
        }
예제 #10
0
        public void eat()
        {
            stop();
            ChatWriter.hitKey(ChatWriter.G);
            int  i      = 0;
            bool combat = false;

            while (i < 5 && !combat)
            {
                Thread.Sleep(3000);
                if (ObjectManager.sharedOM().getEnemies().Count > 0)
                {
                    combat = true;
                }
                ++i;
            }
        }
예제 #11
0
        public void attack(ulong guid, bool shouldCharge = false)
        {
            //az értékek beírása a memoriába
            MemoryHandler.writeULong(MOUSE_OVER_GUID, guid);

            ChatWriter.hitKey(ChatWriter.K);

            if (shouldCharge)
            {
                charge();
            }

            Thread.Sleep(800);
            //mer össze vissza rohangál
            stop();

            Thread.Sleep(200);
        }
예제 #12
0
        public void startMining(object mountNum)
        {
            isMining = true;
            player.goToPlace(startingPlaces[currentFarmingPlace]);

            while (isMining)
            {
                enemies = ObjectManager.sharedOM().getEnemies();
                foreach (WowObject e in enemies)
                {
                    if (!enemiesToLoot.Contains(e.Guid))
                    {
                        enemiesToLoot.Add(e.Guid);
                    }
                }

                //ha a következő pont közelébe van elenfél, akkor meg fogom támadni a "menj a köv helyre" részben
                enemyNearPos = ObjectManager.sharedOM().getEnemyNearPos(farmingPlaces[currentFarmingPlace][currentPoint]);
                if (!enemiesToLoot.Contains(enemyNearPos) && enemyNearPos != 0)
                {
                    enemiesToLoot.Add(enemyNearPos);
                }

                //éledj
                if (player.isDead())
                {
                    System.Console.WriteLine("Ha hallott vagy éledj");
                    player.ressurrect();
                    currentPoint    = 0;
                    player.metElite = false;
                    eliteGUID       = 0;
                    player.goToPlace(Darmend.landingPlace);
                    player.interactWithMouseOver(Darmend.guid, 5000);
                    for (int i = 0; i < 8; ++i)
                    {
                        ChatWriter.hitKey(ChatWriter.W);
                        Thread.Sleep(60000);
                        ChatWriter.hitKey(ChatWriter.S);
                    }
                    player.goToPlace(startingPlaces[currentFarmingPlace]);
                    continue;
                }
                //lootolj
                else if (isThereEnemyToLoot())
                {
                    System.Console.WriteLine("Lootolj");
                    enemiesToRemove.Clear();
                    foreach (ulong guid in enemiesToLoot)
                    {
                        if (ObjectManager.sharedOM().getHealthByGUID(guid) == 0)
                        {
                            player.interactWithMouseOver(guid);
                            enemiesToRemove.Add(guid);
                            if (guid == eliteGUID)
                            {
                                eliteGUID = 0;
                            }
                        }
                    }
                    foreach (ulong guid in enemiesToRemove)
                    {
                        enemiesToLoot.Remove(guid);
                    }
                }
                //harcolj
                else if (enemies.Count > 0)
                {
                    System.Console.WriteLine("Harcolj");

                    WowObject enemy = enemies[0];

                    if (eliteGUID == 0)
                    {
                        player.attack(enemy.Guid);
                    }
                    else
                    {
                        player.attack(eliteGUID);
                    }
                    player.figth();
                }
                //másik player

                /*else if(ObjectManager.sharedOM().isPlayerNear(player.getPosition3D())){
                 *  if (!player.isMounted()) {
                 *      Position3D lastPos = player.getPosition3D();
                 *  }
                 *  player.takeOff();
                 *  while (ObjectManager.sharedOM().isPlayerNear(player.getPosition3D())) {
                 *      Thread.Sleep(1000);
                 *  }
                 *  player.goToPlace(posBeforeOtherCome);
                 * }*/
                //egyél
                else if (0.5f > player.getHPPercentage())
                {
                    if (shouldCannibalize)
                    {
                        player.cannibalize();
                    }
                    if (0.5f > player.getHPPercentage())
                    {
                        player.eat();
                    }
                }
                //menj a vendorhoz
                else if (goToVendor)
                {
                    goToVendor = false;
                    player.goToPlace(Darmend.landingPlace);
                    player.interactWithMouseOver(Darmend.guid, 5000);
                    player.goToPlace(startingPlaces[currentFarmingPlace]);
                }
                //menj a köv helyre
                else if (ObjectManager.sharedOM().getEnemies().Count < 1)
                {
                    System.Console.WriteLine("Menj a köv helyre");
                    player.runTo(farmingPlaces[currentFarmingPlace][currentPoint]);
                    triedToRun++;
                    System.Console.WriteLine(currentPoint);
                    if (triedToRun == 100)
                    {
                        triedToRun   = 0;
                        currentPoint = 0;
                        eliteGUID    = 0;

                        player.metElite = false;
                        currentFarmingPlace++;
                        if (currentFarmingPlace == startingPlaces.Length)
                        {
                            currentFarmingPlace = 0;
                            runNum++;
                        }

                        player.goToPlace(startingPlaces[currentFarmingPlace]);
                    }
                    //ha van a pont közelébe ellenfél akkor megtámadom
                    else if (enemyNearPos != 0)
                    {
                        player.attack(enemyNearPos, true);
                    }
                    else if (player.nearPosition(farmingPlaces[currentFarmingPlace][currentPoint]))
                    {
                        currentPoint++;
                        triedToRun = 0;

                        //ha az adott farming place végén vagy, menj a következő farming place re
                        if (currentPoint == farmingPlaces[currentFarmingPlace].Length)
                        {
                            currentPoint = 0;
                            eliteGUID    = 0;

                            player.metElite = false;
                            currentFarmingPlace++;
                            if (currentFarmingPlace == startingPlaces.Length)
                            {
                                currentFarmingPlace = 0;
                                runNum++;
                            }
                            if (runNum >= maxRun)
                            {
                                runNum     = 0;
                                goToVendor = true;
                            }
                            else
                            {
                                player.goToPlace(startingPlaces[currentFarmingPlace]);
                            }
                        }
                    }
                }
            }
        }
예제 #13
0
 public void dismount()
 {
     ChatWriter.send(MemoryHandler.process.MainWindowHandle, "/run Dismount();");
 }
예제 #14
0
 public void eat()
 {
     ChatWriter.send(MemoryHandler.process.MainWindowHandle, "/click MultiBarRightButton2");
     Thread.Sleep(25000);
 }
예제 #15
0
 public void dismount()
 {
     ChatWriter.hitKey(ChatWriter.Z);
     Thread.Sleep(4000);
 }
예제 #16
0
 public void charge()
 {
     ChatWriter.hitKey(ChatWriter.ZERO);
 }