Working with Quests

From SolarStrike wiki
Jump to: navigation, search

Using RoMBot Functions with Quests[edit]

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.

RoM Api Functions[edit]

The following will be Runes of Magic Api functions that you can use with RoMScript and sendMacro to execute.



local dqCount, dqPerDay = RoMScript("Daily_count()");

Returns the number of dailies completed and the number of dailies allowed per day.

More info:

OnClick_QuestListButton(1, index)


sendMacro("OnClick_QuestListButton(1, 3)");

Selects the quest in the index, ie quest 3 in the example.

More info:



sendMacro("AcceptQuest()"); yrest(750);

Accepts the quest of the currently active quest window. Usually wants to be followed by a small wait.

More info: