internal static bool PetIsSpellReady(string name) { name = name.Replace("()", ""); if (!PetCooldownManager.Contains("GCD") && !PetCooldownManager.Contains(name)) { string LuaStatement = "eins, zwei = gotPetSpellCd('" + name + "')"; string[] result = Calls.GetText(LuaStatement, new string[] { "eins", "zwei" }, 20); if (result[0].Trim() == "0") { return(true); } else { if (result[0] != "" && result[1] != "") { double timeStamp = Convert.ToDouble(result[0].Replace(".", "")); double secCd = TimeSpan.FromSeconds(Convert.ToDouble(result[1].Replace(".", ","))).TotalMilliseconds; if (secCd == 1500) { PetCooldownManager.Add("GCD", timeStamp + secCd); } PetCooldownManager.Add(name, timeStamp + secCd); } } } return(false); }
internal static bool IsBgFrameOpen() { string LuaStatement = "function IsOpen() if BattlefieldFrame:IsVisible() then return 'true' else return 'false' end end " + "tesko1 = IsOpen();"; return(Calls.GetText(LuaStatement, "tesko1", 5).Trim() == "true"); }
internal static bool IsBgEnd() { string LuaStatement = "test123 = GetBattlefieldWinner()"; return(Calls.GetText(LuaStatement, "test123", 10) == ""); }
internal static bool CanJoinBg() { string LuaStatement = "test123 = GetBattlefieldPortExpiration(1)"; return(Calls.GetText(LuaStatement, "test123", 10) != "0"); }
internal static int GetLatency() { string LuaStatement = "_,_,drei = GetNetStats()"; return(Int32.Parse(Calls.GetText(LuaStatement, "drei", 2))); }
internal static bool IsInQ() { string LuaStatement = "test12 = GetBattlefieldTimeWaited(1)"; return(Calls.GetText(LuaStatement, "test12", 10) != "0"); }
private static bool UseQueryBag(int bagnumber, string item) { int totalSlots = 0; switch (bagnumber) { case 0: totalSlots = 16; break; case 1: totalSlots = ObjectManager.Bag1.TotalSlots; break; case 2: totalSlots = ObjectManager.Bag2.TotalSlots; break; case 3: totalSlots = ObjectManager.Bag3.TotalSlots; break; case 4: totalSlots = ObjectManager.Bag4.TotalSlots; break; default: totalSlots = 0; break; } string LuaStatement = "tryhard = useItemInBag(" + totalSlots + "," + bagnumber + ",'" + item + "');"; return(Calls.GetText(LuaStatement, "tryhard", 5) == "1"); }
private void Run() { Ingame.Tele(spawnObject, 50, true); while (Running) { Objects.GameObject spawner = new Objects.GameObject(0, 0, 0); while (spawner.baseAdd == 0 && Running) { spawner = ObjectManager.GetGameObjectById(spawnObjectId); } Calls.OnRightClickObject(spawner.baseAdd, 0); while (!(Calls.GetText(gossipOpenLua, "troll1", 10).Trim() == "true") && Running) { Thread.Sleep(100); } Thread.Sleep(250); while ((Calls.GetText(gossipOpenLua, "troll1", 10).Trim() == "true") && Running) { Calls.DoString("GossipTitleButton1:Click() QuestFrameCompleteQuestButton:Click()"); } } Exchange.IsEngineRunning = false; Exchange.CurrentEngine = "None"; DupeEngine.engine = null; }
internal static bool IsPartyEatingOrDrinking() { try { return(Convert.ToBoolean(Calls.GetText("maxo = isGroupResting()", "maxo", 5))); } catch { return(false); } }
internal static bool IsDc() { try { if (ObjectManager.playerPtr == 0) { string LuaStatement = "test123 = 0 if AccountLogin ~= nil or CharacterSelect ~= nil then test123 = 1 end"; return(Calls.GetText(LuaStatement, "test123", 10) != "0"); } return(false); } catch { return(false); } }
internal static bool GotBuff(string name) { if (!BuffManager.Contains(name)) { string LuaStatement = "finalresult = hasBuff('" + name + "');"; if (Calls.GetText(LuaStatement, "finalresult", 5).Trim() == "true") { BuffManager.Add(name); return(true); } else { return(false); } } return(true); }
private static int QueryBag(int bagnumber, string item) { int totalSlots = 0; switch (bagnumber) { case 0: totalSlots = 16; break; case 1: totalSlots = ObjectManager.Bag1.TotalSlots; break; case 2: totalSlots = ObjectManager.Bag2.TotalSlots; break; case 3: totalSlots = ObjectManager.Bag3.TotalSlots; break; case 4: totalSlots = ObjectManager.Bag4.TotalSlots; break; default: totalSlots = 0; break; } string LuaStatement = "itemcount1 = getItemsInBag(" + totalSlots + "," + bagnumber + ",'" + item + "');"; int tmpInt; Int32.TryParse(Calls.GetText(LuaStatement, "itemcount1", 10), out tmpInt); return(tmpInt); }
private void bGetCount_Click(object sender, EventArgs e) { string lua = "totalCount = 0 for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do name = GetContainerItemLink(bag,slot) if name then name = gsub(name,'^.*%[(.*)%].*$','%1') if string.find(name, '" + mtbItem.Text + "') ~= nil then _, stack = GetContainerItemInfo(bag, slot) totalCount = totalCount + stack; end end end end"; MessageBox.Show(Calls.GetText(lua, "totalCount", 10)); }
internal static bool IsTargetInCombat() { return(Calls.GetText("abc = UnitAffectingCombat('target')", "abc", 1) == "1"); }
internal static int GetComboPoints() { return(Convert.ToInt32(Calls.GetText("points = GetComboPoints('target')", "points", 1))); }
internal static bool GotDebuff(string name, string unit) { string LuaStatement = "finalresult = hasDebuff('" + name + "','" + unit + "');"; return(Calls.GetText(LuaStatement, "finalresult", 5).Trim() == "true"); }
internal static string getSpellId(string name) { string LuaStatement = "finalresult = getSpellId('" + name + "');"; return(Calls.GetText(LuaStatement, "finalresult", 6)); }
private void button1_Click_2(object sender, EventArgs e) { MessageBox.Show(Calls.GetText("money = GetMoney();", "money", 10)); }
internal static bool IsVendorFrameOpen() { string LuaStatement = "troll1 = IsVendorOpen();"; return(Calls.GetText(LuaStatement, "troll1", 10).Trim() == "true"); }
internal static bool PetGotTextureAsBuff(string tex) { string LuaStatement = "finalresult = hasBuffWithTexture('" + tex + "', 'pet');"; return(Calls.GetText(LuaStatement, "finalresult", 5).Trim() == "true"); }
internal static bool PopupVisible() { string LuaStatement = "troll1 = 'false' if StaticPopup1:IsVisible() then troll1 = 'true'; else troll1 = 'false' end"; return(Calls.GetText(LuaStatement, "troll1", 10).Trim() == "true"); }
internal static string ZoneText() { string LuaStatement = "tesko1 = GetRealZoneText()"; return(Calls.GetText(LuaStatement, "tesko1", 30)); }
private void Run() { int runCounter = 0; while (Running) { try { if (ObjectManager.isProcessOpen) { if (ObjectManager.IsWowCrashed()) { Process.GetProcessById(BmWrapper.memory.ProcessId).Kill(); continue; } if (ObjectManager.LoginState == "login") { Calls.DoString("DefaultServerLogin('" + Data.AccName + "', '" + Data.AccPw + "');"); int wait = 0; while (!ObjectManager.IsWowCrashed() && ObjectManager.characterCount() == 0) { Thread.Sleep(500); wait++; if (wait >= 120) { Process.GetProcessById(BmWrapper.memory.ProcessId).Kill(); break; } } afterDc = true; } else if (ObjectManager.LoginState == "charselect" && afterDc) { if (!ObjectManager.IsWowCrashed()) { // Enter -> Login SendMessage(BmWrapper.memory.WindowHandle, WM_KEYDOWN, 0x0D, 0); SendMessage(BmWrapper.memory.WindowHandle, WM_KEYUP, 0x0D, 0); } while (!ObjectManager.IsWowCrashed() && ObjectManager.playerPtr == 0 && Running) { Thread.Sleep(100); } while (!ObjectManager.IsWowCrashed() && ObjectManager.PlayerObject.Pos.x == 0 && Running) { Thread.Sleep(100); } if (!ObjectManager.IsWowCrashed()) { Ingame.Tele(Mailbox, 60, true); Calls.SendMovementUpdate(0xEE, (uint)Environment.TickCount); } } if (runCounter < 60) { if (ObjectManager.playerPtr != 0) { while (!ObjectManager.IsWowCrashed() && ObjectManager.PlayerObject.Pos.differenceTo(Mailbox) > 2) { Ingame.Tele(Mailbox, 60, true); } afterDc = false; Calls.AntiAfk(); Objects.GameObject mailbox = new Objects.GameObject(0, 0, 0); while (!ObjectManager.IsWowCrashed() && mailbox.baseAdd == 0 && Running && !(ObjectManager.LoginState == "login")) { mailbox = ObjectManager.GetGameObjectById(mbId); } if (!ObjectManager.IsWowCrashed()) { Calls.OnRightClickObject(mailbox.baseAdd, 0); } while (!ObjectManager.IsWowCrashed() && !(Calls.GetText(mailLua, "troll1", 10).Trim() == "true") && Running && !(ObjectManager.LoginState == "login")) { Thread.Sleep(100); } Thread.Sleep(1500); if (!ObjectManager.IsWowCrashed()) { //Calls.DoString("TakeInboxItem(1, 1) Logout()"); SendMessage(BmWrapper.memory.WindowHandle, WM_KEYDOWN, 0x31, 0); SendMessage(BmWrapper.memory.WindowHandle, WM_KEYUP, 0x31, 0); Calls.PacketZoneChange(); Calls.PacketSendLogout(); } while (!ObjectManager.IsWowCrashed() && ObjectManager.characterCount() == 0 && Running && !(ObjectManager.LoginState == "login")) { Thread.Sleep(100); } Thread.Sleep(250); if (!ObjectManager.IsWowCrashed()) { // Enter -> Login SendMessage(BmWrapper.memory.WindowHandle, WM_KEYDOWN, 0x0D, 0); SendMessage(BmWrapper.memory.WindowHandle, WM_KEYUP, 0x0D, 0); } while (!ObjectManager.IsWowCrashed() && ObjectManager.playerPtr == 0 && Running && !(ObjectManager.LoginState == "login")) { Thread.Sleep(100); } runCounter++; } } else { if (doVendor) { while (!ObjectManager.IsWowCrashed() && ObjectManager.PlayerObject.Pos.differenceTo(Vendor) > 2) { Ingame.Tele(Vendor, 60, true); } if (!ObjectManager.IsWowCrashed()) { Calls.SendMovementUpdate(0xEE, (uint)Environment.TickCount); } Objects.UnitObject vendorObject = new Objects.UnitObject(0, 0, 0); while (!ObjectManager.IsWowCrashed() && vendorObject.baseAdd == 0 && Running) { vendorObject = ObjectManager.GetUnitByName(vendorName); } if (!ObjectManager.IsWowCrashed()) { Calls.OnRightClickUnit(vendorObject.baseAdd, 0); } while (!ObjectManager.IsWowCrashed() && !(Calls.GetText(vendorLua, "troll1", 10).Trim() == "true") && Running) { Thread.Sleep(100); } if (!ObjectManager.IsWowCrashed()) { Ingame.SellAll(); } while (!ObjectManager.IsWowCrashed() && ObjectManager.PlayerObject.Pos.differenceTo(Mailbox) > 2) { Ingame.Tele(Mailbox, 60, true); } if (!ObjectManager.IsWowCrashed()) { Calls.SendMovementUpdate(0xEE, (uint)Environment.TickCount); } runCounter = 0; } else { break; } } } else { if (!ObjectManager.isProcessOpen) { ObjectManager.runThread = false; ChatReader.runThread = false; Inject.Restore(); BmWrapper.memory.Close(); Process WoW = Process.Start(@"C:\Users\Cody\Desktop\WoW 1.12.1\Feenix 1.12 client\WoW.exe"); Thread.Sleep(30000); BmWrapper.memory.OpenProcessAndThread(WoW.Id); Inject.Apply(); Inject.Init(); MoveWindow(BmWrapper.memory.WindowHandle, 0, 0, 153, 119, true); ObjectManager.getObjThread = new Thread(ObjectManager.getObj); ObjectManager.getObjThread.IsBackground = true; ObjectManager.runThread = true; ObjectManager.getObjThread.Start(); ChatReader.readChatThread = new Thread(ChatReader.readChat); ChatReader.readChatThread.IsBackground = true; ChatReader.runThread = true; ChatReader.readChatThread.Start(); } } } catch { } } Exchange.IsEngineRunning = false; Exchange.CurrentEngine = "None"; DupeEngine.engine = null; }
private void button1_Click(object sender, EventArgs e) { MessageBox.Show(Calls.GetText("lol = 'haha'", "lol", 4)); }
internal static bool IsInStance(string name) { string LuaStatement = "_, _, active, _ = GetShapeshiftFormInfo(returnStanceIndex('" + name + "'))"; return(Calls.GetText(LuaStatement, "active", 1) == "1"); }
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; }
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; }