Droidz 2739 Posted February 1, 2016 Share Posted February 1, 2016 Snippets codes for quest profiles ps: Feel free to share your tips on this post. If your message is poorly presented or contains a question, it will be deleted. sith500, TheSmokie, BetterSister and 2 others 5 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/ Share on other sites More sharing options...
Droidz 2739 Posted February 1, 2016 Author Share Posted February 1, 2016 Quest log cleaner Abandon all quests Add step type "RunLuaCode" with code: for i=1,GetNumQuestLogEntries() do SelectQuestLogEntry(i); SetAbandonQuest(); AbandonQuest(); end Abandon quest by quest id Add step type "RunLuaCode with code (replace 12345 by the quest id at abandon): local questId = 12345; for i=1,GetNumQuestLogEntries() do local _, _, _, _, _, _, _, id = GetQuestLogTitle(i); if id == questId then SelectQuestLogEntry(i); SetAbandonQuest(); AbandonQuest(); end end Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-12203 Share on other sites More sharing options...
Droidz 2739 Posted February 1, 2016 Author Share Posted February 1, 2016 Use item on hostile weakened mob Add step type "PickUp" (put quest name in parameter) Add step type "RunCode", in parameter put this code: Thread t = new Thread(() => { uint itemId = 62899; int questId = 28000; while (robotManager.Products.Products.IsStarted) { if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { if (!Quest.HasQuest(questId)) break; if (ObjectManager.Target.IsValid && ObjectManager.Target.IsAlive && ObjectManager.Target.HealthPercent <= 25) { ItemsManager.UseItem(itemId); } } Thread.Sleep(500); } }); t.Start(); (you need to have quest in your questlog, you can replace "62899" but the item id, "28000" by the quest id and "25" by the max target health) Add step type "Pulse" (put quest name in parameter) (use quest type kill or interact) Add step type "TurnIn" (put quest name in parameter) (sample if based on this quest: http://www.wowhead.com/quest=28000/do-the-imp-possible ) eeny, Pudge and thakane 2 1 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-12204 Share on other sites More sharing options...
Droidz 2739 Posted February 1, 2016 Author Share Posted February 1, 2016 Force to use Flightmaster / Taxi WRobot takes the taxi automaticly generally, but if you want force to use taxi you can look this sample: UseFlightPath.xml (guide is written in the first step). loobrush 1 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-12205 Share on other sites More sharing options...
Droidz 2739 Posted February 1, 2016 Author Share Posted February 1, 2016 Quest by race Two possibilities: Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-12207 Share on other sites More sharing options...
Droidz 2739 Posted February 1, 2016 Author Share Posted February 1, 2016 Add grind area (don't forget to give a name at this "Quest" and add in the steps a step type "Pulse") Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-12208 Share on other sites More sharing options...
Droidz 2739 Posted February 1, 2016 Author Share Posted February 1, 2016 Starting quest from items (picked up) Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-12209 Share on other sites More sharing options...
Droidz 2739 Posted February 1, 2016 Author Share Posted February 1, 2016 Change WRobot settings You can change WRobot settings with step type "RunCode" like this: Disable "Stop bot if player teleported" (to avoid problem with you use Hearthstone or portals): wManager.wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = false; To disable "attack before being attacked": wManager.wManagerSetting.CurrentSetting.AttackBeforeBeingAttacked = false; ... (to get names of settings, you can edit file with nodepad "WRobot\Settings\General-..........xml") Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-12212 Share on other sites More sharing options...
Droidz 2739 Posted February 1, 2016 Author Share Posted February 1, 2016 Use Portals To use portails, you can look this sample: UsePortal.xml (guide is written in the first step). Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-12213 Share on other sites More sharing options...
Droidz 2739 Posted March 25, 2016 Author Share Posted March 25, 2016 Ignore fighting back To disable detection when the character is attacked, use this c# code: wManager.Wow.Helpers.Conditions.ForceIgnoreIsAttacked = true; To reactivate attack detection: wManager.Wow.Helpers.Conditions.ForceIgnoreIsAttacked = false; (don't forget to reactivate it, or restart WRobot if you want use other profile/product) You can also ignore fighting back with specific mob: WoWUnit unit = new WoWUnit(0); if (unit.IsValid && !wManager.Wow.ObjectManager.ObjectManager.BlackListObjectManagerGuid.Contains(unit.Guid)) wManager.Wow.ObjectManager.ObjectManager.BlackListGetUnitAttackPlayerGuidTime.Add(unit.Guid, System.DateTime.Now + System.TimeSpan.FromMinutes(2)); wow20230625 1 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-13088 Share on other sites More sharing options...
Droidz 2739 Posted April 26, 2016 Author Share Posted April 26, 2016 Train spells This sample is for WoD, in this sample the profile train the spell http://www.wowhead.com/spell=2018/blacksmithing at http://www.wowhead.com/npc=514/smith-argus : TrainSpell.xml To adapt this profile at you, in "Is complete condition" quest option replace "2018" by your spell id, in "hotspots" put your trainer position and in "target entry" put your trainer entry id. Bronson 1 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-13536 Share on other sites More sharing options...
Droidz 2739 Posted July 8, 2016 Author Share Posted July 8, 2016 Buy item testbuy.xml Bronson 1 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-15365 Share on other sites More sharing options...
eeny 523 Posted July 19, 2016 Share Posted July 19, 2016 Use item on dead mob ( after looting) Use like the use item on weakened mob- you need to modify the item ID and Quest ID for your quest. Thread t = new Thread(() => { uint itemId = 9618; int questId = 25336; while (robotManager.Products.Products.IsStarted) { if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { if (!Quest.HasQuest(questId)) break; if (ObjectManager.Target.IsValid && ObjectManager.Target.IsDead) { ItemsManager.UseItem(itemId); } } Thread.Sleep(500); } }); t.Start(); Droidz, Bronson and Pudge 3 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-15758 Share on other sites More sharing options...
AudreyH 17 Posted August 27, 2016 Share Posted August 27, 2016 KILL AND LOOT "is complete condition" for killing a boss (instance, raid) with no quest return ObjectManager.GetWoWUnitByEntry(16151).Count == 0; with the id of the boss dont forget to select "true" in "not required in quest log" Bronson, Pudge and BetterSister 3 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-17303 Share on other sites More sharing options...
Droidz 2739 Posted September 9, 2016 Author Share Posted September 9, 2016 Dump all quests in "Quests log" with lua ret = ''; local numEntries, numQuests = GetNumQuestLogEntries(); for questLog = 1, numEntries do local questTitle, _, _, _, _, _, _, id = GetQuestLogTitle(questLog); if id > 0 and questTitle then local q = '\n================='; q = q .. '\n' .. tostring(questTitle) .. ' (' .. id .. ')'; local numObjectives = GetNumQuestLeaderBoards(questLog); for i=1,numObjectives do local description, objectiveType, isCompleted = GetQuestLogLeaderBoard(i,questLog); if description then q = q .. '\nObjective count: ' .. i .. ', Description: ' .. tostring(description) .. ', ObjectiveType: ' .. tostring(objectiveType) .. ', IsCompleted: ' .. tostring(isCompleted); end end q = q .. '\n================='; print(q); ret = ret .. q; end end Go to WRobot tab "Tools" > "Development Tools" > paste this lua code in textbox and click on button "Lua (return value in 'ret')" Bugreporter and Bronson 2 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-17783 Share on other sites More sharing options...
Droidz 2739 Posted March 6, 2017 Author Share Posted March 6, 2017 Catch Zeppelin/Ship Quest profile: Catch Zeppelin and Ship Sample.xml // Sample of how to use Zeppelin/Ship // In this sample, WRobot catch Zeppelin from Kalimdor (Ogrimmard) to Northrend (Borean Tundra (Warsong Hold)) /* Quest settings: * Can condition: "return Usefuls.ContinentId == (int) ContinentId.Kalimdor;" * Is complete condition: "return Usefuls.ContinentId == (int) ContinentId.Northrend && !ObjectManager.Me.InTransport;" * Not required in quest log: "True" * Quest type: "OverridePulseCSharpCode" */ // You can get zeppelin/ship/player positions and entry ID in tab "Tools" > "Development Tools" > "Dump all informations" (or "Memory information"). // Settings: var zeppelinEntryId = 186238; // Zeppelin/Ship EntryId // From var fromZeppelinWaitPosition = new Vector3(1775.066, -4299.745, 151.0326); // Position where Zeppelin/Ship waits players (from) var fromPlayerWaitPosition = new Vector3(1762.322, -4282.175, 133.1072); // Position where the player waits Zeppelin/Ship (from) var fromPlayerInZeppelinPosition = new Vector3(1768.199, -4289.856, 133.1912); // Position where the player waits in the Zeppelin/Ship (from) // To var toZeppelinWaitPosition = new Vector3(2837.908, 6187.443, 140.1648); // Position where Zeppelin/Ship waits players (to) var toPlayerLeavePosition = new Vector3(2836.5, 6184.367, 121.9332); // Position to go out the Zeppelin/Ship (to) // Change WRobot settings: wManager.wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = false; // Code: if (!Conditions.InGameAndConnectedAndProductStartedNotInPause) return true; if (Usefuls.ContinentId == (int)ContinentId.Kalimdor) { if (!ObjectManager.Me.InTransport) { if (GoToTask.ToPosition(fromPlayerWaitPosition)) { var zeppelin = ObjectManager.GetWoWGameObjectByEntry(zeppelinEntryId).OrderBy(o => o.GetDistance).FirstOrDefault(); if (zeppelin != null && zeppelin.Position.DistanceTo(fromZeppelinWaitPosition) < 1) { GoToTask.ToPosition(fromPlayerInZeppelinPosition); } } } } else if (Usefuls.ContinentId == (int)ContinentId.Northrend) { if (ObjectManager.Me.InTransport) { var zeppelin = ObjectManager.GetWoWGameObjectByEntry(zeppelinEntryId).OrderBy(o => o.GetDistance).FirstOrDefault(); if (zeppelin != null && zeppelin.Position.DistanceTo(toZeppelinWaitPosition) < 1) { GoToTask.ToPosition(toPlayerLeavePosition); } } } return true; bizza, Pudge and Bronson 3 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-24442 Share on other sites More sharing options...
Droidz 2739 Posted May 12, 2017 Author Share Posted May 12, 2017 Change position of path generated by WRobot (this can help you to resolve stuck on specific doors and doorways) With this code, you can replace specific point of path by another. // Continent (item1), DefaultPosition (item2), DefaultPositionSearchRange (item3), NewPosition (item4) var positionChange = new List<Tuple<ContinentId, Vector3, float, Vector3>> { new Tuple<ContinentId, Vector3, float, Vector3>(ContinentId.Kalimdor, new Vector3(1422.318, -4662.921, 35.46182), 0.5f, new Vector3(1422.063, -4665.421, 35.46295)), /// new Tuple<ContinentId... }; wManager.Events.MovementEvents.OnMovementPulse += delegate(List<Vector3> points, CancelEventArgs cancelable) { var continent = (ContinentId) Usefuls.ContinentId; foreach (var p in points) { foreach (var pchange in positionChange) { if (p != null && pchange.Item1 == continent && p.DistanceTo(pchange.Item2) <= pchange.Item3) { Logging.WriteDebug("Change path position of " + p + " to " + pchange.Item4); p.X = pchange.Item4.X; p.Y = pchange.Item4.Y; p.Z = pchange.Item4.Z; p.Type = pchange.Item4.Type; p.Action = pchange.Item4.Action; } } } }; (you need to run this code one time by WRobot session, you can run this code in step type "RunCode") Bean, eeny, bizza and 2 others 4 1 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-26713 Share on other sites More sharing options...
Droidz 2739 Posted September 6, 2017 Author Share Posted September 6, 2017 Use Hearthstone sample if (wManager.Wow.Helpers.Usefuls.ContinentId != (int) wManager.Wow.Enums.ContinentId.Azeroth || wManager.Wow.ObjectManager.ObjectManager.Me.Position.DistanceTo2D(new robotManager.Helpful.Vector3(1, 2, 3)) > 1000) { wManager.wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = false; wManager.Wow.Helpers.ItemsManager.UseItem(6948); // http://www.wowhead.com/item=6948/hearthstone System.Threading.Thread.Sleep(1000 * 20); // 20 secondes wManager.wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = true; } Line 1 replace "Azeroth" by your destination continent. Line 2 replace "1, 2, 3" by your destination position (you can also replace "1000" by your minimum distance to destination to use Hearthstone). Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-31681 Share on other sites More sharing options...
Droidz 2739 Posted January 30, 2018 Author Share Posted January 30, 2018 Blacklist object/unit in ObjectManager WRobot will 100% ignore blacklisted objects WoWUnit unit = new WoWUnit(0); if (unit.IsValid && !wManager.Wow.ObjectManager.ObjectManager.BlackListObjectManagerGuid.Contains(unit.Guid)) wManager.Wow.ObjectManager.ObjectManager.BlackListObjectManagerGuid.Add(unit.Guid); (this code can disrupt WRobot, use it only if you know what you're doing) nudl and TheSmokie 2 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-38628 Share on other sites More sharing options...
FNV316 65 Posted February 9, 2018 Share Posted February 9, 2018 (edited) Force Taxi (Vanilla) & automatically get TaxiButton by name var position = new Vector3(-8835.76f, 490.084f, 109.6157f); int npcEntryId = 352; if (!ObjectManager.Me.IsOnTaxi) { if (wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(position, npcEntryId)) { int node; Usefuls.SelectGossipOption(GossipOptionsType.taxi); node = wManager.Wow.Helpers.Lua.LuaDoString<int>("for i=0,30 do if string.find(TaxiNodeName(i),'Ironforge') then return i end end"); wManager.Wow.Helpers.Lua.LuaDoString("TakeTaxiNode(" + node + ")"); } } Step "RunCode" and wrap it into a while loop (as shown in Droidz example). For 'position' you have to add the position of the flight master the bot is going to use. For 'npcEntryID' you have to add the ID of the corresponding flight master. For 'Ironforge' you have to change it to the name of the taxi node you wanna travel to. Has not to be the full name, an explizit part of the destination is enough (f.e. 'Stormwind' instead of 'Stormwind City'). The code above makes the bot travelling from Stormwind to Ironforge. Edited April 9, 2018 by FNV316 TheSmokie and Pudge 2 Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-39174 Share on other sites More sharing options...
TheSmokie 242 Posted April 9, 2020 Share Posted April 9, 2020 Click on Item and KILL mob (Overridepulse) var pos = new Vector3(x, y, z); // Vector3 postion int npc = 1; // hostile unit int clickitem = 1; // item you need to click on var target = ObjectManager.GetObjectWoWUnit().FirstOrDefault(o => o.Entry == npc && o.Position.DistanceTo(ObjectManager.Me.Position) < 50 && o.IsAlive); GoToTask.ToPosition(pos); while (MovementManager.InMovement) { Thread.Sleep(250); } if (ObjectManager.Me.Position.DistanceTo2D(new Vector3(pos)) < 3) { Interact.InteractGameObject(ObjectManager.GetWoWGameObjectByEntry(clickitem).FirstOrDefault().GetBaseAddress); Thread.Sleep(1500); } if (target != null && target.IsAlive) { ObjectManager.Me.Target = target.Guid; if (ObjectManager.Me.Position.DistanceTo(target.Position) >= 30) MovementManager.MoveTo(target.Position); if (ObjectManager.Target.Name == "unit") //name of the unit { Fight.StartFight(); } } return true; 1 - edit to your needs, change the info. 2 - use overridepulse 3- in quest order editer, do Pulseallinone Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-57567 Share on other sites More sharing options...
TheSmokie 242 Posted April 10, 2020 Share Posted April 10, 2020 Go to Vector3 And Use Item (Overridepulse) var pos = new Vector3(x, y, z); // position to where you need to be to use the item string item = "Name"; // item Sring - change name to what item you are using. GoToTask.ToPosition(pos); // move to position while (MovementManager.InMovement) { Thread.Sleep(250); } if (ObjectManager.Me.Position.DistanceTo2D(pos) < 3) { ItemsManager.UseItem(item); Thread.Sleep(500); } return true; Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-57571 Share on other sites More sharing options...
TheSmokie 242 Posted April 10, 2020 Share Posted April 10, 2020 Go to Vector3 And click on object (Overridepulse) var pos = new Vector3(x, y, z); // position to where you need to interact with object int clickonobject = 0; // the object ID GoToTask.ToPosition(pos); while (MovementManager.InMovement) { Thread.Sleep(250); } if (ObjectManager.Me.Position.DistanceTo2D(pos) < 3) { Interact.InteractGameObject(ObjectManager.GetWoWGameObjectByEntry(clickonobject).FirstOrDefault().GetBaseAddress); Thread.Sleep(500); } return true; Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-57572 Share on other sites More sharing options...
TheSmokie 242 Posted August 16, 2020 Share Posted August 16, 2020 (edited) Many Useful Functions (Vanilla - WOTLK) RunCode (Action): - Tool.LearningSpells("Name Of spell"); // Put in name of the spell you wish to buy. - Tool.Craft("profession", "RecipeName", 1); // This code will only work for Wrath of the lich king - Tool.RemoveItem(55); // Removes item by ID - Tool.UseItem(55); // Uses item by ID - Tool.AbandonQuest("Quest Name"); //Abandon Quest by Name - Tool.Sellitem("Item Name"); // sell item by name - Tool.Fish(new Vector3(1, 1, 1), new Vector3(1, 1, 1), 0, 75, 6562, 111); - Tool.CheckUpdate(); // updates quester profiles from github.raw - Tool.SendItems("name", "note", new List<string> { "Super Healing Potion", }); // mail itemlist to another player If statements : - Tool.RecipeIsKnown("profession", "RecipeName") == true // check if you have this Recipe! If statement! - Tool.HasItem("itemname") <= 0 - Tool.Faction("Name of the faction", 5) == true // add name of faction, and amount of rep you want to check aganst. 42999 is max rep. - Tool.haveKey(KeyID) // checks if you have a key Travel Functions added(Vanilla - WOTLK) Flight : - Travel.Flight.ThunderBluffToOrgrimmar(); - Travel.Flight.OrgrimmarToThunderBluff(); Full code here: https://wrobot.eu/forums/topic/12034-toolboxvanilla-wotlk-many-useful-functions-custom-script/ Edited August 22, 2020 by TheSmokie Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-59571 Share on other sites More sharing options...
Droidz 2739 Posted October 6, 2020 Author Share Posted October 6, 2020 Try resolve navigation problem In some zone (mainly if you are on a moving gameobject like boat) use this option can help to resolve navigation problem (you need to enable this option also when you record path or get npc/gameobject positions) wManager.Wow.ObjectManager.WoWUnit.ForceRelativePosition = true; (don't forget to disable this option after, wrobot only turns it off itself after a restart) Link to comment https://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/#findComment-60168 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now