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");" />