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="
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" />