NEW:
Code: Select all
player:target_NPC( npc_name );
OUTDATED:
This function is quite similar to the harvesting scan function. It uses the harvesting configuration parameters to define the scan area.
Code: Select all
player:scan_for_NPC( [npc_name] );
e.g.
Code: Select all
<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:scan_for_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>
Code: Select all
player:mouseclickL(x, y [RoM window wide, RoM window high]);
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. As noted before, please insert them also into the function call.
Caution: Similar to the harvesting function, the RoM window has to be in the foreground.
EDIT: Now you can also use target_NPC(). That function don't need the RoM window in the foreground.