Event Handling ?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
FactorY
Posts: 7
Joined: Sun Aug 02, 2009 9:00 pm

Event Handling ?

#1 Post by FactorY » Sat Oct 03, 2009 4:31 am

Please correct me if i'm wrong, but as far as I know and tested, it is not possible to implement event handling in rombot.
(If there is actually a way, can someone please inform me or write a tutorial on it?)

So my question/suggestion is...
Is it possible to create an empty addon which registers all events, which then goes and triggers interrupt functions within the rombot lua?
eg...

Code: Select all

<Ui>
 <Script file="\MICROMACRO DIRECTORY\ ROMBOT LUA FILE.lua"/>
   <Frame name="micromacro" parent="UIParent" enableMouse="false">
    <Scripts>
      <OnLoad>     
		this:RegisterEvent("VARIABLES_LOADED");
		this:RegisterEvent("SEND_MAIL_SUCCESS");
		this:RegisterEvent("UNIT_PORTRAIT_UPDATE");
      </OnLoad>
      <OnEvent>
		CALL_MICRO_MACRO(event);
      </OnEvent>	  
    </Scripts>
  </Frame>
</Ui> 
Not only will the bot be able to react better to the ingame environment, it will provide us rombot users better access to our own customized bot.

It'll be nice to be able to have like an interrupt function lua file which we can code ourselves during certain triggers.


Edit: NEW IDEA
Is it possible to read the SaveVariables.lua file?
If so, we can always set our event handling addon to change the variables in the file which can then act as interrupts.

User avatar
droppen
Posts: 179
Joined: Mon Aug 03, 2009 10:32 pm

Re: Event Handling ?

#2 Post by droppen » Sat Oct 03, 2009 9:24 am

we dont want to make rombot so hard to use so that you would have to install addons to your rom. but there is a way to do the event handling. take a look at RoMScript function. writes to memory the macro1 slot, then by using EditMacro rom function rombot writes the return values to macro2 slot, where rombot then reads the return values. you can make an addon to the game, that registers all events and saves the values of the events to macro3 slot or something, then check every second for an update in micromacro for the macro3 slot, then you know what event gave what in micromacro, but it will not be the same as actually calling a function from rombot while the event is being processed

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest