Jump to content

Bronson

Members
  • Posts

    34
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Bronson reacted to Droidz in Snippets codes for quest profiles   
    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;  
  2. Like
    Bronson reacted to Droidz in helpful stuff for quest profile developer - if endif while conditions   
    Hello, do not hesitate to post here http://wrobot.eu/forums/topic/2681-snippets-codes-for-quest-profiles/ links to your posts.
  3. Like
    Bronson reacted to inselmann in helpful stuff for quest profile developer - if endif while conditions   
    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)) &lt; 15);</IsCompleteCondition>
    for every part.

    With this workaround you can make precise movement in small areas if it is necessary.
     

  4. Like
    Bronson reacted to inselmann in helpful stuff for quest profile developer - if endif while conditions   
    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() &gt; 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);&#xD;&#xA; RunMacroText(&quot;/use &quot; .. 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...
     
     
     
  5. Like
    Bronson reacted to inselmann in helpful stuff for quest profile developer - if endif while conditions   
    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 == &quot;Tanaris&quot;" />
        <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 &gt;= 80" />
        <QuestsSorted Action="If" NameClass="wManager.Wow.Helpers.Usefuls.MapZoneName == &quot;Mount Hyjal&quot;" />
        <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)) &lt; 2000" />
        <QuestsSorted Action="RunCode" NameClass="var position = new Vector3(1791.696f, -4273.472f, 7.674594f);&#xD;&#xA;int objEntryId = 195142;&#xD;&#xA;&#xD;&#xA;if (wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithGameObject(position, objEntryId))&#xD;&#xA;{&#xD;&#xA;    System.Threading.Thread.Sleep(1500);&#xD;&#xA;}" />
        <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 (&quot;/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&quot;);" />
        <QuestsSorted Action="Wait" NameClass="2000" />
        <QuestsSorted Action="RunLuaCode" NameClass="RunMacroText (&quot;/ag scan&quot;);" />
        <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 (&quot;/run for i=1,GetNumQuestLogEntries() do SelectQuestLogEntry(i); SetAbandonQuest(); AbandonQuest(); end&quot;);" />
     
     
     
×
×
  • Create New...