September 1, 20205 yr Hey , I wanted to change some of my druid fightclass, so that he goes out of Catform once he tries to loot Quest items on the floor, like a piece of wood (not of kill quests). This is the code i currently use to get out of catform to farm ores. var nodesNearMe = ObjectManager.GetObjectWoWGameObject().FindAll(p => p.GetDistance <= 8 && p.CanOpen); // break bear for the nodes if (nodesNearMe.Count > 0 && !(ObjectManager.Me.InCombatFlagOnly) && ObjectManager.Me.HaveBuff("Bear Form")) { Lua.LuaDoString("CastSpellByName(\"Bear Form\",1)"); Thread.Sleep(400); } Which function could i use here so the Bot detects questitems and not nodes? greet Red
September 1, 20205 yr I am not quite sure if WRobot is able to distinguish between quest objects from any other game object that is interactable. You may need to make a list, or dictionary with quest id, and quest item id.. but you can just compare the nodeNearMe by the name of the object, aka Quest item. var nodeNearMe = ObjectManager.GetObjectWoWGameObject().Where(t => t != null && t.CanOpen).OrderBy(u => ObjectManager.Me.Position.DistanceTo(u.Position)).FirstOrDefault(); if (nodeNearMe != null && nodeNearMe.Name == "Quest Item Name Here" && ObjectManager.Me.Position.DistanceTo(nodeNearMe.Position) <= 8) { // break bear for the nodes if (!ObjectManager.Me.InCombatFlagOnly && ObjectManager.Me.HaveBuff("Bear Form")) { Lua.LuaDoString("CastSpellByName(\"Bear Form\",1)"); Thread.Sleep(400); } } Edited September 1, 20205 yr by Apexx
Create an account or sign in to comment