Пример #1
0
        private void Run()
        {
            while (Running)
            {
                while (!ObjectManager.IsCasting && Running)
                {
                    Thread.Sleep(250);
                    Calls.DoString(getFirstNeck);
                }
                while (Running && Calls.IsLooting() == 0)
                {
                    Thread.Sleep(100);
                }
                Calls.AutoLoot();
                while (Running && Calls.IsLooting() == 1)
                {
                    Thread.Sleep(100);
                }
                Thread.Sleep(500);
            }
            //string money = Calls.GetText("money = GetMoney();", "money", 20);
            //double copperCount = 0;
            //bool one = Double.TryParse(money, out copperCount);
            //if (one)
            //{
            //    copperCount = (copperCount - (Data.MailerCharacters.Length * 30)) / Data.MailerCharacters.Length;
            //    foreach (string x in Data.MailerCharacters)
            //    {
            //        Calls.DoString("ClearSendMail() SetSendMailMoney(" + copperCount + ") SendMail('" + x + "', 'hello', 'do you attend the next raid?')");
            //        Thread.CurrentThread.Join(1000);
            //    }
            //}
            //else
            //{
            //    MessageBox.Show("Cannot convert " + money + " to double");
            //}

            Exchange.IsEngineRunning = false;
            Running = false;
            Exchange.CurrentEngine = "None";
            MailEngine.engine      = null;
        }
Пример #2
0
        public override void Run()
        {
            if (!StockadesContainer.done && !ObjectManager.isDeath)
            {
                if (StockadesContainer.doOncePerRun)
                {
                    waitTollerance = 0;
                    Calls.DoString("ResetInstances()");
                }
                Thread.Sleep(250);
                List <Objects.GameObject> chestList = ObjectManager.GetGameObjectsByName("Large Solid Chest");
                int i = 0;
                while (i < chestList.Count)
                {
                    if (Ingame.IsDc())
                    {
                        return;
                    }
                    if (ObjectManager.FreeBagSlots >= 3)
                    {
                        if (chestList[i].baseAdd != 0)
                        {
                            if (chestList[i].Pos.differenceToPlayer() > 2)
                            {
                                Objects.Location tmpPos = new Objects.Location();
                                tmpPos.x = chestList[i].Pos.x;
                                tmpPos.y = chestList[i].Pos.y;
                                tmpPos.z = chestList[i].Pos.z - 4;
                                Ingame.Tele(tmpPos, 60, false);
                                waitTollerance = 0;
                            }
                            else
                            {
                                try
                                {
                                    int tmp = Environment.TickCount;
                                    Calls.OnRightClickObject(chestList[i].baseAdd, 1);
                                    Thread.CurrentThread.Join(1000);
                                    while (ObjectManager.PlayerObject.IsCasting != 0 && Environment.TickCount - tmp <= 8000)
                                    {
                                        Thread.CurrentThread.Join(10);
                                    }
                                    tmp = Environment.TickCount;
                                    while (Calls.IsLooting() == 1 && Environment.TickCount - tmp <= 1000)
                                    {
                                        Thread.CurrentThread.Join(10);
                                    }
                                    Console.WriteLine("WAITING");
                                    i++;
                                }
                                catch
                                {
                                    break;
                                }
                            }
                        }
                        else
                        {
                            waitTollerance += 1;
                            if (waitTollerance == 3)
                            {
                                StockadesContainer.done = true;
                                i = int.MaxValue;
                                break;
                            }
                        }
                    }
                    else
                    {
                        StockadesContainer.done = true;
                        i = int.MaxValue;
                        break;
                    }
                }
                StockadesContainer.done = true;
            }

            if (!ObjectManager.isDeath)
            {
                Ingame.KillPlayer();
                while (StockadesContainer.isInside && !Ingame.IsDc())
                {
                    Thread.CurrentThread.Join(10);
                }
            }
            else
            {
                Calls.DoString("RepopMe();");
            }
        }
Пример #3
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;
        }