Example #1
0
 public override void Run()
 {
     if (ObjectManager.FreeBagSlots > 3)
     {
         StockadesContainer.done = false;
         Calls.DoString("ResetInstances();");
         StockadesContainer.doOncePerRun = true;
         Ingame.Tele(StockadesContainer.posZoneIn1, 60, true);
         Ingame.setCoords(StockadesContainer.posZoneIn2);
         while (StockadesContainer.isOutside && ObjectManager.FreeBagSlots > 3 && !Ingame.IsDc())
         {
             Thread.CurrentThread.Join(10);
         }
     }
     else
     {
         if (ObjectManager.isGhost)
         {
             Ingame.Tele(spiritHealerPos, 5, false);
             spiritHealer = ObjectManager.GetUnitByName("Spirit Healer");
             if (spiritHealer.baseAdd != 0)
             {
                 Calls.OnRightClickUnit(spiritHealer.baseAdd, 0);
                 Thread.CurrentThread.Join(250);
                 while (ObjectManager.isGhost && !Ingame.IsDc())
                 {
                     Calls.OnRightClickUnit(spiritHealer.baseAdd, 0);
                     Thread.CurrentThread.Join(500);
                     Calls.DoString("AcceptXPLoss();");
                     Thread.CurrentThread.Join(500);
                 }
             }
         }
         else
         {
             Ingame.Tele(StockadesContainer.posVendor, 60, false);
             vendor = ObjectManager.GetUnitByName(StockadesContainer.nameVendor);
             if (vendor.baseAdd != 0)
             {
                 Calls.OnRightClickUnit(vendor.baseAdd, 1);
                 if (Ingame.IsVendorFrameOpen())
                 {
                     Ingame.SellAll();
                 }
             }
         }
     }
 }
Example #2
0
        private void Run()
        {
            while (Running)
            {
                Calls.DoString("GetNumRaidMembers() InviteByName('" + groupGuy + "')");
                while (Running && ObjectManager.party1Guid == 0)
                {
                    Thread.Sleep(100);
                }
                //Calls.DoString("for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do link = GetContainerItemLink(bag,slot) if link then name = gsub(link,'^.*%[(.*)%].*$','%1') if '1' == '1' and string.find(name, 'Bijou') == nil then PickupContainerItem(bag,slot) if (CursorHasItem()) then DeleteCursorItem(); end end end end end");
                Thread.Sleep(1000);
                Calls.DoString("ConvertToRaid()");
                while (Running && Calls.GetText("troll1 = GetNumRaidMembers()", "troll1", 10).Trim() == "0")
                {
                    Calls.DoString("ConvertToRaid()");
                    Thread.Sleep(100);
                }
                Calls.DoString("SetLootMethod('freeforall');");
                Thread.Sleep(250);
                if (Running)
                {
                    Ingame.TeleNoZFake(Entrance, 50, true);
                    Ingame.setCoords(ZoneIn);
                }

                while (Running && ObjectManager.MapId == 0)
                {
                    Thread.Sleep(100);
                }
                if (Running)
                {
                    Thread.Sleep(250);
                    //Ingame.TeleNoZFake(PullSpot3, 50, true);
                    //Thread.Sleep(500);
                    //Calls.SetTarget(pullMobGuid3);
                    //Thread.Sleep(10);
                    //Calls.TurnCharacter(ObjectManager.TargetObject.Pos);
                    //Thread.Sleep(250);
                    //Calls.DoString("CastSpellByName('Frostbolt(rank 1)')");
                    //Thread.Sleep(10);
                    //while (Running && ObjectManager.IsCasting)
                    //{
                    //    Thread.Sleep(100);
                    //}

                    //Ingame.TeleNoZFake(PullSpot2, 50, true);
                    //Thread.Sleep(3000);
                    //Calls.SetTarget(pullMobGuid2);
                    //Thread.Sleep(10);
                    //Calls.TurnCharacter(ObjectManager.TargetObject.Pos);
                    //Thread.Sleep(250);
                    //Calls.DoString("CastSpellByName('Frostbolt(rank 1)')");
                    //Thread.Sleep(10);
                    //while (Running && ObjectManager.IsCasting)
                    //{
                    //    Thread.Sleep(100);
                    //}

                    Ingame.TeleNoZFake(PullSpot1, 50, true);
                    Thread.Sleep(500);
                    Calls.SetTarget(pullMobGuid1);
                    Thread.Sleep(10);
                    Calls.TurnCharacter(ObjectManager.TargetObject.Pos);
                    Thread.Sleep(250);
                    Calls.DoString("CastSpellByName('Frostbolt(rank 1)')");
                    Thread.Sleep(10);
                    while (Running && ObjectManager.IsCasting)
                    {
                        Thread.Sleep(100);
                    }
                }
                if (Running)
                {
                    Ingame.TeleNoZFake(SafeSpot, 50, true);
                }

                while (Running && ObjectManager.TargetObject.Pos.differenceToPlayer() >= 15)
                {
                    Thread.Sleep(250);
                }
                if (Running)
                {
                    Calls.TurnCharacter(ObjectManager.TargetObject.Pos);
                }

                while (Running && ObjectManager.aggroCountPlain() != 0)
                {
                    if (ObjectManager.PlayerObject.isChanneling == 0)
                    {
                        Calls.CastAoe("Blizzard", AoePos);
                    }
                    Thread.Sleep(500);
                }
                Thread.Sleep(500);
                List <Objects.UnitObject> lootMobs = ObjectManager.AllLootableMobs();
                if (Running)
                {
                    Ingame.TeleNoZFake(lootMobs[0].Pos, 50, true);
                    Thread.Sleep(250);
                }
                foreach (Objects.UnitObject u in lootMobs)
                {
                    if (Running)
                    {
                        Calls.DoString("for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do link = GetContainerItemLink(bag,slot) if link then name = gsub(link,'^.*%[(.*)%].*$','%1') if string.find(name, 'Coin') ~= nil or string.find(name, 'Totem') ~= nil or string.find(name, 'Libram') ~= nil or string.find(name, 'Idol') ~= nil or string.find(name, 'Blood Scythe') ~= nil or string.find(name, 'Voodoo') ~= nil or string.find(name, 'Sceptre') ~= nil then PickupContainerItem(bag,slot) if (CursorHasItem()) then DeleteCursorItem(); end end end end end");
                        Calls.OnRightClickUnit(u.baseAdd, 0);
                        while (Running && Calls.IsLooting() == 0)
                        {
                            ;
                        }
                        Thread.Sleep(100);
                        while (Running && Calls.IsLooting() == 1)
                        {
                            Calls.AutoLoot();
                            Thread.Sleep(250);
                        }
                        Thread.Sleep(100);
                    }
                }
                Thread.Sleep(750);
                if (Running)
                {
                    Ingame.TeleNoZFake(Exit, 50, true);
                    Ingame.setCoords(ZoneOut);
                }
                while (Running && ObjectManager.MapId == 309)
                {
                    Thread.Sleep(100);
                }
                if (Running)
                {
                    Thread.Sleep(250);
                    Calls.DoString("LeaveParty()");
                }

                if (ObjectManager.FreeBagSlots < 10)
                {
                    Ingame.TeleHb(new Objects.Location(-14377.8f, 411.6882f, 6.626376f), 60, true);

                    Objects.UnitObject vendorObject = new Objects.UnitObject(0, 0, 0);
                    while (vendorObject.baseAdd == 0 && Running)
                    {
                        vendorObject = ObjectManager.GetUnitByName("Zarena Cromwind");
                    }

                    Calls.OnRightClickUnit(vendorObject.baseAdd, 0);

                    while (!(Calls.GetText("troll1 = 'false' if MerchantFrame:IsVisible() then troll1 = 'true' end;", "troll1", 10).Trim() == "true") && Running)
                    {
                        Thread.Sleep(100);
                    }

                    string[] items = new string[] { "Bloodvine", "Bijou", "Major Mana Potion", "Zulian Ceremonial Staff", "Zulian Hacker of the Tiger", "Traveler\\'s Backpack" };
                    Ingame.SellAllBut(items);
                }
            }

            Exchange.IsEngineRunning = false;
            Exchange.CurrentEngine   = "None";
            DupeEngine.engine        = null;
        }
Example #3
0
        private void Run()
        {
            while (Running)
            {
                while (Running && Calls.GetText("troll1 = GetNumRaidMembers()", "troll1", 10).Trim() == "0")
                {
                    Thread.Sleep(100);
                }
                Thread.Sleep(1000);
                if (Running)
                {
                    Ingame.TeleHb(Entrance, 50, true);
                    Ingame.setCoords(ZoneIn);
                }

                while (Running && ObjectManager.MapId == 0)
                {
                    Thread.Sleep(100);
                }
                if (Running)
                {
                    Thread.Sleep(1000);

                    Ingame.TeleHb(SafeSpot, 50, true);
                    Thread.Sleep(500);
                }
                while (ObjectManager.GetPlayerByGuid(ObjectManager.party1Guid).Pos.differenceToPlayer() > 3 && Running)
                {
                    Thread.Sleep(500);
                }
                Thread.Sleep(5000);
                while (Running && ObjectManager.aggroCountOnGuid(ObjectManager.party1Guid) != 0)
                {
                    Thread.Sleep(100);
                }
                Thread.Sleep(500);

                if (Running)
                {
                    Ingame.TeleHb(Exit, 50, true);
                    Ingame.setCoords(ZoneOut);
                }
                while (Running && ObjectManager.MapId == 309)
                {
                    Thread.Sleep(100);
                }
                if (Running)
                {
                    Thread.Sleep(500);
                    Ingame.TeleHb(Entrance2, 50, true);
                }

                while (Running && Calls.GetText("troll1 = GetNumRaidMembers()", "troll1", 10).Trim() != "0")
                {
                    Thread.Sleep(100);
                }

                //while (Running && ObjectManager.aggroCountPlain() != 0)
                //{
                //    if (ObjectManager.PlayerObject.isChanneling == 0)
                //    {
                //        Calls.CastAoe("Blizzard", AoePos);
                //    }
                //    Thread.Sleep(500);
                //}
                //Thread.Sleep(500);
                //List<Objects.UnitObject> lootMobs = ObjectManager.AllLootableMobs();
                //if (Running)
                //{
                //    Ingame.TeleHb(lootMobs[0].Pos, 50, true);
                //    Thread.Sleep(250);
                //}
                //foreach (Objects.UnitObject u in lootMobs)
                //{
                //    if (Running)
                //    {
                //        Calls.OnRightClickUnit(u.baseAdd, 0);
                //        while (Running && Calls.IsLooting() == 0) ;
                //        Thread.Sleep(250);
                //        while (Running && Calls.IsLooting() == 1)
                //        {
                //            Calls.AutoLoot();
                //            Thread.Sleep(250);
                //        }
                //        Thread.Sleep(250);
                //    }
                //}
                //Thread.Sleep(750);
                //if (Running)
                //{
                //    Ingame.TeleHb(Exit, 50, true);
                //    Ingame.setCoords(ZoneOut);
                //}
                //while (Running && ObjectManager.MapId == 309)
                //{
                //    Thread.Sleep(100);
                //}
                //if (Running)
                //{
                //    Thread.Sleep(250);
                //    Calls.DoString("LeaveParty()");
                //}
            }

            Exchange.IsEngineRunning = false;
            Exchange.CurrentEngine   = "None";
            DupeEngine.engine        = null;
        }