Working with Quests
 Using RoMBot Functions with Quests
The number one RoMBot function you are going to need when trying to interact with quest interfaces is the sendMacro function and its relative the RoMScript function; Both of these functions allow the bot to communicate with the Runes of Magic client by running lua code through the in game macro. Functions that you will need will be listed below.
RoMScript( _script );
Send a macro to the client and execute it ingame by pressing the MACRO hotkey. There are up to 10 return values possible.
sendMacro( _script );
Same as "RoMScript. Additionally you will see a message in the MM window.
getQuestStatus( _questname )
This will return the status of the quest. It will return 'complete' if the quest is completed and ready to be turned in, 'incomplete' if you have accepted the quest but haven't
completed it yet and 'not accepted' if you have not accepted the quest. The use of this function requires that the ingamefunctions folder be installed in the games addon folder.
player:target_Object(_objname, _waittime, _harvestall, _donotignore);
This will target an object similarly to target_NPC but this function has more options to cater for the different behaviors of different objects.
_objname = name or id of object to target. Accepts partial names.(Required)
_waittime = time to wait if the object takes time to open in ms. (Optional, default is 0)
_harvestall = true if you wish to collect all in the immediate area.(Default is false ie. opens/collects only once)
_donotignore = By default, when collecting multiple objects with the _harvestall option, the bot will ignore the current node when searching for the next nearest node so it can quickly move on to the next node while the current one is still disappearing. Set this option to 'true' if you don't want to ignore the current node because it requires more than 1 click to collect it. (Default is false).
player:target_Object("Harf Daily Quest Board") -- Targets 'Harf Daily Quest Board' with no wait time afterward.
player:target_Object("Mysterious Mound",3000) -- Target then wait 3 seconds for search to end. Done only once.
player:target_Object("Ranch Hen", 8000, true, true) -- Feed all nearby hens, waiting 8s after each. And do not ignore the current hen when searching for the next closest.