Page 1 of 1

Calling ingame macros via RomBot

Posted: Sun Jan 04, 2015 2:43 am
by Nobodyknows
I'm looking to create a simple waypoint file that targets a particular NPC and then runs 2 different in game macros that I have already created and fully tested and then repeats this in a loop until the bot is either paused or ended.

Basically it just needs to be:

Target NPC
Run in-game macro 1
Run in-game macro 2
Rinse and repeat

Can anyone help me out with this?

I've tried looking in the wiki and around the forum and I didn't find a good way to call an in-game macro via the bot.

Re: Calling ingame macros via RomBot

Posted: Sun Jan 04, 2015 10:56 am
by BlubBlab
I would use the search function there is a function target_NPC if you use a macro to press menu points there is also some function choiceOption which can do this for you.

Re: Calling ingame macros via RomBot

Posted: Sun Jan 04, 2015 3:44 pm
by Nobodyknows
I figured out how to target the NPC that's needed. I'm turning in a quest using dailynotes add-on and the in-game macros I created.

I've moved the in-game macros so they're at positions 8 and 9 on the action bar. Now all I need to figure out is how to get the bot to trigger them without it having to be a mouse click which would force the client to have to be in the foreground all the time.

Basically I'm looking for something that says "target x NPC, use thingy in action bar position 8, wait x seconds, use thingy in action bar position 9, wait x seconds, repeat from the beginning." The difficulty I'm having is it's easy to tell the bot to use a particular skill by name, but not easy with something like macro that I have a button for in the action bar.

Any suggestions?

Re: Calling ingame macros via RomBot

Posted: Sun Jan 04, 2015 4:55 pm
by BlubBlab
You can also press buttons with MM since it is a macro system you can but like I said you can also use choiceOption or choiceByName

Re: Calling ingame macros via RomBot

Posted: Sun Jan 04, 2015 11:05 pm
by rock5
Target NPC. http://www.solarstrike.net/wiki/index.p ... _Functions

Code: Select all

player:target_NPC("npc name")
Use action bar. http://runesofmagic.gamepedia.com/API:UseAction

Code: Select all

RoMCode("UseAction(8)")
Wait some time in ms, eg. 1 second. http://www.solarstrike.net/wiki/index.p ... rary#yrest

Code: Select all

yrest(1000)

Re: Calling ingame macros via RomBot

Posted: Sun Jan 04, 2015 11:25 pm
by Nobodyknows
rock5 wrote:Use action bar. http://runesofmagic.gamepedia.com/API:UseAction

Code: Select all

RoMCode("UseAction(8)")
^^^^^^^ That is the part I couldn't figure out! I knew there had to be a way to send a keystroke directly to the client.

The NPC targeting and the yrest part I already had but thank you for including that.

Thank you all for your help. I need to tweak things a bit but it's working the way I want it to now.

Cheers! :D