Difference between revisions of "RoM Auto repair"

From SolarStrike wiki
Jump to: navigation, search
(New page: Here is a thread on how to do auto repair, the topic should be converted to the wiki.. please do it. [http://www.solarstrike.net/phpBB3/viewtopic.php?f=21&t=496 link])
 
Line 2: Line 2:
  
 
[http://www.solarstrike.net/phpBB3/viewtopic.php?f=21&t=496 link]
 
[http://www.solarstrike.net/phpBB3/viewtopic.php?f=21&t=496 link]
 +
 +
For using the autorepair ingame, you need normaly to press the 'repair' button. You can do this by using the 'player:mouseclickL();' function within the bot. Or you just install the ingame addon [http://rom.curse.com/downloads/rom-addons/details/streamline.aspx Streamline]. Streamline will automaticly repair if you open a dialog window with a merchant and it will automaticly deliver quests, if you open a dialog with a quest NPC.
 +
 +
You can open the ingame dialog window with a NPC with the function:
 +
 +
<source lang="lua">player:target_NPC( npc_name );</source>
 +
 +
It will try to target the nearest NPC's and find the NPC by name. After that, the bot will open the dialog window. It will also work while using multiple bots.
 +
 +
e.g.
 +
<source lang="lua"><waypoints>
 +
  <!-- Thats a demo to interact with the NPC York Harris in Logar -->
 +
  <!-- For autorepairs you need the addon 'streamline'            --> 
 +
  <!-- # 1 --><waypoint x="-808" z="-6067">
 +
  player:rest(5);
 +
  player:target_NPC("York");
 +
  player:rest(2);
 +
  <!-- The coordinates depends from your screen resolution/window -->
 +
  <!-- size. We recalculate them for the actual RoM windows size  --> 
 +
  <!-- hence we need the original values (here 800x617)          -->     
 +
  player:mouseclickL(130, 200, 800, 617);
 +
  player:rest(2);
 +
  player:mouseclickL(130, 300, 800, 617);
 +
  </waypoint>
 +
</waypoints></source>
 +
In that case we click some points of the dialog. If it would be a merchant, the store window would open and streamline will autorepair. As you see, you can also use:
 +
<source lang="lua">player:mouseclickL(x, y [RoM window wide, RoM window high]);</source>
 +
to left click an point and by that, interact with the npc. x, y is relative to the RoM window. So it is your fiddly task to find the right values to click the right buttons. We remember the RoM windows size (800 x 617) for that click positions. By doing that, we can later recalculate the mouse click points if we run the bot in a different RoM windows size.
 +
 +
You can use a [http://www.softpedia.com/progDownload/Mouse-Pointer-Locator-Download-88312.html Mouse Locator Tool] to find the click points more easy. You just have to subtract the position of your RoM window (upper left corner) to get the relative values for within the RoM window. The values are depending from your screen resolution or windows size. They will be printed in the MicroMakro window at the start of the bot. As noted before, please insert them also into the function call.

Revision as of 14:51, 25 August 2009

Here is a thread on how to do auto repair, the topic should be converted to the wiki.. please do it.

link

For using the autorepair ingame, you need normaly to press the 'repair' button. You can do this by using the 'player:mouseclickL();' function within the bot. Or you just install the ingame addon Streamline. Streamline will automaticly repair if you open a dialog window with a merchant and it will automaticly deliver quests, if you open a dialog with a quest NPC.

You can open the ingame dialog window with a NPC with the function:

player:target_NPC( npc_name );

It will try to target the nearest NPC's and find the NPC by name. After that, the bot will open the dialog window. It will also work while using multiple bots.

e.g.

<waypoints>
   <!-- Thats a demo to interact with the NPC York Harris in Logar -->
   <!-- For autorepairs you need the addon 'streamline'            -->   
   <!-- # 1 --><waypoint x="-808" z="-6067">
   player:rest(5);
   player:target_NPC("York");
   player:rest(2);
   <!-- The coordinates depends from your screen resolution/window -->
   <!-- size. We recalculate them for the actual RoM windows size  -->   
   <!-- hence we need the original values (here 800x617)           -->      
   player:mouseclickL(130, 200, 800, 617);
   player:rest(2);
   player:mouseclickL(130, 300, 800, 617);
   </waypoint>
</waypoints>

In that case we click some points of the dialog. If it would be a merchant, the store window would open and streamline will autorepair. As you see, you can also use:

player:mouseclickL(x, y [RoM window wide, RoM window high]);

to left click an point and by that, interact with the npc. x, y is relative to the RoM window. So it is your fiddly task to find the right values to click the right buttons. We remember the RoM windows size (800 x 617) for that click positions. By doing that, we can later recalculate the mouse click points if we run the bot in a different RoM windows size.

You can use a Mouse Locator Tool to find the click points more easy. You just have to subtract the position of your RoM window (upper left corner) to get the relative values for within the RoM window. The values are depending from your screen resolution or windows size. They will be printed in the MicroMakro window at the start of the bot. As noted before, please insert them also into the function call.