//Currently not working, no easy method to deposit items. Getting out the guild chest should still work tho. public static void Bank(bool guildBank) { if (_me.IsGhost || _me.Dead) { return; } if (guildBank) { if (_hasGuildChest && UInt32.Parse(Lua.GetReturnValues("return GetSpellCooldown(" + guildChest + ")")[0]) == 0) { Log("Guild Chest available and off cooldown, using"); Lua.DoString("CastSpellByID(" + guildChest + ")"); Thread.Sleep(4000); ObjectManager.Update(); var unitList = ObjectManager.GetObjectsOfType <WoWObject>(); foreach (WoWObject unit in unitList) { if (unit.Entry == 206603) { unit.Interact(); Thread.Sleep(2500); break; } } return; } } if (!guildBank) { if (_hasJeeves && UInt32.Parse(Lua.GetReturnValues("return GetItemCooldown(" + jeeves + ")")[0]) == 0) { Log("Jeeves available, summoning!"); Lua.DoString("UseItemByName(" + jeeves + ")"); Thread.Sleep(2500); ObjectManager.Update(); var unitList = new List <WoWObject>(); foreach (WoWObject unit in unitList) { if (unit.Entry == 35642) { unit.Interact(); Thread.Sleep(2500); Logic.Inventory.Frames.Gossip.GossipFrame gf = Logic.Inventory.Frames.Gossip.GossipFrame.Instance; if (gf.GossipOptionEntries != null) { gf.SelectGossipOption(0); //deposit stuff break; } } } return; } } }
public static void RepairAndVendor() { //Repair/Vendor called if (_me.IsGhost || _me.Dead) { return; } //If we have mammoth and can mount here, do so if (Mount.CanMount() && _hasMammoth) { Log("Mammoth found and useable!"); Lua.DoString("CallCompanion(\"MOUNT\", " + mammoth + ")"); Thread.Sleep(3000); ObjectManager.Update(); var unitList = ObjectManager.GetObjectsOfType <WoWUnit>(); foreach (WoWObject unit in unitList) { if (unit.Entry == repair) { unit.Interact(); var _guildFunds = false; Thread.Sleep(2500); if (Styx.BotManager.Current.Name == "Gatherbuddy2") { var GBSettings = Bots.Gatherbuddy.GatherbuddySettings.Instance; _guildFunds = GBSettings.RepairFromGuildBank; } var vf = Logic.Inventory.Frames.Merchant.MerchantFrame.Instance; StyxWoW.SleepForLagDuration(); Vendors.SellAllItems(); Thread.Sleep(1000); vf.RepairAllItems(_guildFunds); Thread.Sleep(1000); break; } } return; } //if we can't mount, but have jeeves, try him if (!Mount.CanMount() && _hasJeeves) { if (UInt32.Parse(Lua.GetReturnValues("return GetItemCooldown(" + jeeves + ")")[0]) == 0) { //he is off cooldown, using Log("We have Jeeves and he's ready to serve! Summoning."); Lua.DoString("UseItemByName(" + jeeves + ")"); Thread.Sleep(2500); ObjectManager.Update(); var unitList = ObjectManager.GetObjectsOfType <WoWUnit>(); foreach (WoWObject unit in unitList) { if (unit.Entry == 35642) { unit.Interact(); var _guildFunds = false; Thread.Sleep(2500); Logic.Inventory.Frames.Gossip.GossipFrame gf = Logic.Inventory.Frames.Gossip.GossipFrame.Instance; if (gf.GossipOptionEntries != null) { gf.SelectGossipOption(1);//MUST CHECK THAT THIS IS CORRECT! if (Styx.BotManager.Current.Name == "Gatherbuddy2") { var GBSettings = Bots.Gatherbuddy.GatherbuddySettings.Instance; _guildFunds = GBSettings.RepairFromGuildBank; } var vf = Logic.Inventory.Frames.Merchant.MerchantFrame.Instance; StyxWoW.SleepForLagDuration(); Vendors.SellAllItems(); Thread.Sleep(1000); vf.RepairAllItems(_guildFunds); Thread.Sleep(1000); } gf.Close(); break; } } return; } if (_ForceFly) { Log("No mammoth, and Jeeves is on cooldown. Will force flying to vendor."); FieldRepair.RepairFly(); } } }