Jump to content

morrish

WRobot user
  • Posts

    2
  • Joined

  • Last visited

morrish's Achievements

  1. Hey all, can some one plz explain how to use that function. Problem: 4 quest in the same close area, none linear. Do quest obj, witch is closets / nearest player. 2 of them are pickups item and the rest is kill and loot. Pulse all of them at the same time. Is it possible? Morris
  2. Mine didt work, but VS helped me. I am all new to this. This code here helped me. using System; using System.Collections.Generic; using System.ComponentModel; using System.Configuration; using System.IO; using System.Linq; using System.Reflection; using System.Threading; using robotManager.Helpful; using robotManager.FiniteStateMachine; using robotManager.Products; using wManager.Plugin; using wManager.Wow.Helpers; using wManager.Wow.Bot.States; using wManager.Wow.Enums; using wManager.Wow.ObjectManager; using wManager.Wow.Class; using System.Collections; using System.Runtime.Serialization; public class Main : wManager.Plugin.IPlugin { public void Initialize() { Logging.Write("JCToken: Started."); while (TurnIn() || Repair() || GetQuest()) { } Logging.Write("JCToken: Finished"); } private bool TurnIn() { return HaveRepairedItem() && CompleteQuest(); } private bool Repair() { return HaveQuest() && RepairItem(); } private bool GetQuest() { return HaveItems() && AcceptQuest(); } private bool HaveRepairedItem() { return HaveItemId(43298); } private bool CompleteQuest() { wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(wManager.Wow.ObjectManager.ObjectManager.Me.Position, 28701); System.Threading.Thread.Sleep(1280); Quest.SelectGossipActiveQuest(1); System.Threading.Thread.Sleep(1280); Quest.CompleteQuest(); System.Threading.Thread.Sleep(2560); return true; } private bool HaveQuest() { return HaveItemId(43299); } private bool RepairItem() { foreach (WoWItem item in Bag.GetBagItem()) { ItemInfo info = item.GetItemInfo; int itemId = GetId(info.ItemLink); if (itemId == 43299) { List<int> bagAndSlot = Bag.GetItemContainerBagIdAndSlot(info.ItemName); Lua.LuaDoString("UseContainerItem(" + bagAndSlot[0] + "," + bagAndSlot[1] + ")"); System.Threading.Thread.Sleep(12500); return true; } } return false; } private bool HaveItems() { return HaveItemId(43297) && HaveItemId(36923); } private bool AcceptQuest() { foreach (WoWItem item in Bag.GetBagItem()) { ItemInfo info = item.GetItemInfo; int itemId = GetId(info.ItemLink); if (itemId == 43297) { List<int> bagAndSlot = Bag.GetItemContainerBagIdAndSlot(info.ItemName); Lua.LuaDoString("UseContainerItem(" + bagAndSlot[0] + "," + bagAndSlot[1] + ")"); Lua.LuaDoString("AcceptQuest()"); return true; } } return false; } private bool HaveItemId(int Id) { foreach (WoWItem item in Bag.GetBagItem()) { ItemInfo info = item.GetItemInfo; int itemId = GetId(info.ItemLink); if (itemId == Id) { return true; } } return false; } private int GetId(String itemLink) { String pattern = "Hitem:"; int index = itemLink.IndexOf(pattern); return Int32.Parse(itemLink.Substring(index + 6).Split(':')[0]); } public void Settings() { } public void Dispose() { Logging.Write("JCToken: Stopped."); } }
×
×
  • Create New...