inselmann 28 Posted December 2, 2016 Share Posted December 2, 2016 I did not find lots of information for if endif conditions or while conditions so i write some stuff down here to help other people: IF/ENDIF: - LEVEL CHECKING / if char level = or above run task <QuestsSorted Action="If" NameClass="ObjectManager.Me.Level >= 70" /> <QuestsSorted Action="EndIf" NameClass="" /> - CONTINENT CHECKING / if on continent northrend run task or gotostep in your quest profile <QuestsSorted Action="If" NameClass="wManager.Wow.Helpers.Usefuls.ContinentId == (int)wManager.Wow.Enums.ContinentId.Northrend" /> <QuestsSorted Action="GoToStep" NameClass="451" /> <QuestsSorted Action="EndIf" NameClass="" /> - ZONE CHECKING / if in zone Tanaris run task <QuestsSorted Action="If" NameClass="wManager.Wow.Helpers.Usefuls.MapZoneName == "Tanaris"" /> <QuestsSorted Action="GoToStep" NameClass="175" /> <QuestsSorted Action="EndIf" NameClass="" /> Use:http://wow.gamepedia.com/MapID - Two IF/ENDIF conditions / if level 80 or above and in zone Mount Hyjal do task or gotostep <QuestsSorted Action="If" NameClass="ObjectManager.Me.Level >= 80" /> <QuestsSorted Action="If" NameClass="wManager.Wow.Helpers.Usefuls.MapZoneName == "Mount Hyjal"" /> <QuestsSorted Action="GoToStep" NameClass="551" /> <QuestsSorted Action="EndIf" NameClass="" /> <QuestsSorted Action="EndIf" NameClass="" /> You can also combine in one IF/ENDIF, but i like to seperate everything. (Thx Droidz) wManager.Wow.Helpers.Usefuls.ContinentId == (int)wManager.Wow.Enums.ContinentId.Northrend && wManager.Wow.ObjectManager.ObjectManager.Me.Level >= 71 && wManager.Wow.ObjectManager.ObjectManager.Me.Level <= 79 While Conditions: repeats a task with a special condition, can be a portal use/ taxi node or even zeppelin workaround <QuestsSorted Action="While" NameClass="ObjectManager.Me.Position.DistanceTo2D(new Vector3(1791.696f, -4273.472f, 7.674594f)) < 2000" /> <QuestsSorted Action="RunCode" NameClass="var position = new Vector3(1791.696f, -4273.472f, 7.674594f);
int objEntryId = 195142;

if (wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithGameObject(position, objEntryId))
{
 System.Threading.Thread.Sleep(1500);
}" /> <QuestsSorted Action="EndWhile" NameClass="" /> other useful stuff: #get button names in wow /run print(GetMouseFocus():GetName()) #equip transmog gear for your collection and then equip your normal gear again with addon autogear /run for b=0,NUM_BAG_SLOTS do for s=1,GetContainerNumSlots(b) do local l=GetContainerItemLink(b,s) if l then if format('%9$s',GetItemInfo(l)) ~= '' then EquipItemByName(l) end end end end /ag scan <QuestsSorted Action="RunLuaCode" NameClass="RunMacroText ("/run for b=0,NUM_BAG_SLOTS do for s=1,GetContainerNumSlots(b) do local l=GetContainerItemLink(b,s) if l then if format('%9$s',GetItemInfo(l)) ~= '' then EquipItemByName(l) end end end end");" /> <QuestsSorted Action="Wait" NameClass="2000" /> <QuestsSorted Action="RunLuaCode" NameClass="RunMacroText ("/ag scan");" /> <QuestsSorted Action="Wait" NameClass="2000" /> #in wow /script print(GetAreaMapInfo(GetCurrentMapAreaID())) /dump (GetMapInfo()) /dump (GetMapContinentsInfo()) #aborts all quests, i hate questlogs, lets dump them all <QuestsSorted Action="RunLuaCode" NameClass="RunMacroText ("/run for i=1,GetNumQuestLogEntries() do SelectQuestLogEntry(i); SetAbandonQuest(); AbandonQuest(); end");" /> Droidz, Bronson, maylu and 1 other 4 Link to comment https://wrobot.eu/forums/topic/4556-helpful-stuff-for-quest-profile-developer-if-endif-while-conditions/ Share on other sites More sharing options...
inselmann 28 Posted December 2, 2016 Author Share Posted December 2, 2016 Use hearthstone and check if not attacked by mobs, if attacked wait 5 seconds and check again. (if you want to use hearthstone after grind area) If no mobs go home <QuestsSorted Action="None" NameClass="TELEPORT HOME" /> <QuestsSorted Action="None" NameClass="detect if player is attacked" /> <QuestsSorted Action="If" NameClass="ObjectManager.GetNumberAttackPlayer() > 0" /> <QuestsSorted Action="Wait" NameClass="5000" /> <QuestsSorted Action="GoToStep" NameClass="3" /> <QuestsSorted Action="EndIf" NameClass="" /> <QuestsSorted Action="Wait" NameClass="2000" /> <QuestsSorted Action="RunCode" NameClass="wManager.wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = false;" /> <QuestsSorted Action="RunLuaCode" NameClass="local itemName, _, _, _, _, _, _, _ = GetItemInfo(6948);
 RunMacroText("/use " .. itemName);" /> <QuestsSorted Action="Wait" NameClass="20000" /> <QuestsSorted Action="None" NameClass="TELEPORT HOME ENDE" /> - edit: <QuestsSorted Action="GoToStep" NameClass="3" /> (<- change this number according to your step number in your profile) A while condition should be even a better solution without gotostep... Droidz, Bronson and Cokol 3 Link to comment https://wrobot.eu/forums/topic/4556-helpful-stuff-for-quest-profile-developer-if-endif-while-conditions/#findComment-21225 Share on other sites More sharing options...
inselmann 28 Posted December 2, 2016 Author Share Posted December 2, 2016 Precise movement in small areas: Recently i had problems with a small cave and the waypoints in a quester profile killandloot uses nearest waypoint, so the problem was that if i kill mobs too far away from the player the bot used the nearest waypoint instead of the latest waypoint. With bad luck you go inside a cave, kill a mob and go outside again :-) That might be a problem if you want to run through all the cave, kill all mobs and leave after and repeat. I want maximum mobs per hour to kill, so its important to run the entire cave without going back too far for respawn times. My workaround for this problem: You can make precise movement with a failsafe return point So lets make 10 killandloot routines with this special cave, not one! <QuestsSorted Action="Pulse" NameClass="caveentry1" /> <QuestsSorted Action="Pulse" NameClass="cavepart2" /> <QuestsSorted Action="Pulse" NameClass="cavepart3" /> <QuestsSorted Action="Pulse" NameClass="cavepart4" /> <QuestsSorted Action="Pulse" NameClass="cavepart5" /> <QuestsSorted Action="Pulse" NameClass="cavepart6" /> <QuestsSorted Action="Pulse" NameClass="cavepart7" /> <QuestsSorted Action="Pulse" NameClass="cavepart8" /> <QuestsSorted Action="Pulse" NameClass="cavepart9" /> <QuestsSorted Action="Pulse" NameClass="caveexit10" /> Now record only parts of the routines, go 100-200 meters, then get the coordinate and then do the next part from the end location of part1. (if the iscomplete condition is not triggered due a mob kill that was too far away it only runs back a few meters and next time it triggers and runs the next cavepart) Use <IsCompleteCondition>return (ObjectManager.Me.Position.DistanceTo2D(new Vector3(x, y, z)) < 15);</IsCompleteCondition> for every part. With this workaround you can make precise movement in small areas if it is necessary. Droidz, Cokol and Bronson 3 Link to comment https://wrobot.eu/forums/topic/4556-helpful-stuff-for-quest-profile-developer-if-endif-while-conditions/#findComment-21226 Share on other sites More sharing options...
Droidz 2738 Posted December 5, 2016 Share Posted December 5, 2016 Hello, do not hesitate to post here http://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/ links to your posts. Bronson 1 Link to comment https://wrobot.eu/forums/topic/4556-helpful-stuff-for-quest-profile-developer-if-endif-while-conditions/#findComment-21285 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