Monitoring ingame events.

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Monitoring ingame events.

#41 Post by rock5 » Sun Jul 03, 2011 8:58 am

If you are not using the filter just leave it out.

Code: Select all

EventMonitorStart("Crush","CHAT_MSG_SAY");
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Monitoring ingame events.

#42 Post by lisa » Mon Jul 04, 2011 5:42 am

Finally got back to this 1, yeah I deffinately need my check to ignore older messages.

Here is the story if you get messaged multiple times one after the other, The first triggers the event, after your code is finished for that event it then checks the next message, which in my case is some time later and acts according to that message.

This example I messaged bot 4 times in a few seconds using the gmmonitor, without the ignore old messages.

Code: Select all

Clearing target.
Large Mayan Plant Pot
Use MACRO: Executing RoMScript "AskPlayerInfo('lolliecharname');".

You have been whispered by: lolliecharname
Pausing for 30 seconds. Press Delete to stop the pause.
Time remaining 20 seconds.
Time remaining 10 seconds.
Time remaining 0 seconds.
reseting monitor
Use MACRO: Executing RoMScript "AskPlayerInfo('lolliecharname');".
1
grow

You have been whispered by: lolliecharname
Pausing for 30 seconds. Press Delete to stop the pause.
Time remaining 20 seconds.
Time remaining 10 seconds.
Time remaining 0 seconds.
reseting monitor
Use MACRO: Executing RoMScript "AskPlayerInfo('lolliecharname');".
Clearing target.
Large Mayan Plant Pot

You have been whispered by: lolliecharname
Pausing for 30 seconds. Press Delete to stop the pause.
Time remaining 20 seconds.
Time remaining 10 seconds.
Time remaining 0 seconds.
reseting monitor
Use MACRO: Executing RoMScript "AskPlayerInfo('lolliecharname');".

You have been whispered by: lolliecharname
Pausing for 30 seconds. Press Delete to stop the pause.
Time remaining 20 seconds.
Time remaining 10 seconds.
Time remaining 0 seconds.
reseting monitor
I had it set to rest for 30 seconds, if I had it set to 10 minutes then it would have paused for 40 minutes even though the last message was received 39 minutes earlier.
So yeah I am back to needing to be able to atleast have a time since message was received, so as to ignore old ones =)
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Monitoring ingame events.

#43 Post by rock5 » Mon Jul 04, 2011 5:51 am

Maybe you could just reset it when you pause. If you restart the monitor it will clear the old log.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Monitoring ingame events.

#44 Post by lisa » Mon Jul 04, 2011 8:06 am

I was actually thinking along the lines of instead of using

Code: Select all

triggerTime = os.time()
in the ingame function, using

Code: Select all

triggerTime = GetTime()
Then we could use a single RoMScript("GetTime()") at the start of the event monitoring, do a comparison type thing to system os.Time() and then can use that calculation for comparing event time to os.Time()

so event log would have 4217.9599609375
or what ever the GetTime() returns.

Then in the bot code have this at start, just once. so maybe onload.

Code: Select all

clienttime = RoMScript("GetTime()")
systemtimedifference = some mathmatical thing (clienttime - + * os.Time())
In the event part have this

Code: Select all

local time, moreToCome, msg = EventMonitorCheck("GMdetect2", "1")
if msg ~= nil then
if 60 > somemaths(time - + systemtimedifference + - os.Time()) then 
-- do stuff.
end
end
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Monitoring ingame events.

#45 Post by rock5 » Mon Jul 04, 2011 8:38 am

I'm all for changing the triggertime to GetTime().

It looks like what you wrote might work but didn't we find an address in memory that had the gettime value? We could compare against that too. Although your way might be easier to implement as long as it works.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Monitoring ingame events.

#46 Post by lisa » Mon Jul 04, 2011 8:49 am

Yeah it's just a theory atm, would need to do some testing to see how posible it is.

The address could work too, wouldn't be so hard to implement into it. Could add in a global in maybe settings with it. So it could be called upon by anything to access the ingame timer.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Monitoring ingame events.

#47 Post by rock5 » Mon Jul 04, 2011 9:22 am

lisa wrote:Yeah it's just a theory atm, would need to do some testing to see how posible it is.

The address could work too, wouldn't be so hard to implement into it. Could add in a global in maybe settings with it. So it could be called upon by anything to access the ingame timer.
Although probably this will be the one and only time it's used. Normally if you want to time something you would use the rombot time functions.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

wizzyslo
Posts: 119
Joined: Sun Nov 01, 2009 6:09 pm

Re: Monitoring ingame events.

#48 Post by wizzyslo » Mon Jul 04, 2011 9:27 am

Somehow i cant get it to work all the time same problem:

Code: Select all

D:/micromacro/scripts/rom/classes/player.lua:669: onSkillCast error: [string "..
."]:5: bad argument #1 to 'find' (string expected, got nil)
game chat said this:
Cannot get log event for monitor 'Crush'. No such monitor name exists.

Code: Select all

  
<onSkillCast>
      
      repeat
          local time, moretocome, msg = EventMonitorCheck("Crush","1")
          if string.find(msg, "I'll crush you!") then
       	__WPL:setWaypointIndex(__WPL:findWaypointTag("away"));
          end
      until moretocome == false

   </onSkillCast>

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- # 21 --><waypoint x="1658" z="-4960" y="758" tag="teleport">
	while not RoMScript("UnitExists('party1')") do
		sendMacro('InviteByName("alt_name")'); yrest(1000)
	end  
 	EventMonitorStart("Crush","CHAT_MSG_SAY"); 
	</waypoint>
	<!-- # 22 --><waypoint x="1696" z="-5162" y="773">	
	waitForLoadingScreen(10); 
	
	if sendMacro("GetCurrentWorldMapID();") == 209 then
	__WPL:setWaypointIndex(__WPL:findWaypointTag("teleport"));
		end
	</waypoint>	
	<!-- #  1 --><waypoint x="1771" z="2880" y="433">	</waypoint>
	<!-- #  2 --><waypoint x="1900" z="2873" y="433">	</waypoint>
	<!-- #  3 --><waypoint x="2116" z="2605" y="432">
	changeProfileOption("HARVEST_DISTANCE", 80);  
	yrest(2000);
	keyboardPress(key.VK_SPACE);
	</waypoint>
	<!-- #  4 --><waypoint x="2255" z="2409" y="401">	</waypoint>
	<!-- #  5 --><waypoint x="2395" z="2484" y="401" tag="away"> yrest(500)	</waypoint>
	<!-- #  4 --><waypoint x="2255" z="2409" y="401">	__WPL:setForcedWaypointType("NORMAL");	</waypoint>
	<!-- #  6 --><waypoint x="2215" z="2495" y="401">	EventMonitorStop("Crush");	</waypoint>
	<!-- #  7 --><waypoint x="1901" z="2870" y="433">	</waypoint>
	<!-- # 8 --><waypoint x="1700" z="2885" y="433">	waitForLoadingScreen(10);	</waypoint>
	</waypoints>
Should IGF write some word on chat?? I sow only "igf Event Monitor loaded." and that worning at error.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Monitoring ingame events.

#49 Post by rock5 » Mon Jul 04, 2011 9:35 am

And another thing Lisa, I still don't think it's really needed. You should regularly check your messages or reset the monitor when starting to check it again.

And I been thinking about how you pause when you receive a message. Your problem is because you stop checking for messages. What if you continued checking and clearing messages while you're waiting?

Let's say you want to wait 10 minutes from the last message received. Let's say you recieve 3 messages separated by 1 minute intervales. When you get the first message you start the pause but continue checking messages. When you get the second message you reset the timer to zero and continue waiting. The same with the third message. Then 10 minutes after the 3rd message you go again having waited 12 minutes. No need to check the message time.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Monitoring ingame events.

#50 Post by lisa » Mon Jul 04, 2011 9:42 am

The issue I had before using the ignore old messages was that if I don't have the bot stuck in a loop for the set time it starts to move, even just 1 step.
That is enough for a GM to think you are actually a bot if you don't reply to their messages. Any movement is a sign of being at keyboard, at keyboard and not replying to a GM in their mind means your a bot.

wizzy add in a check to see if their is a message or not

Code: Select all

<onSkillCast>
      
      repeat
          local time, moretocome, msg = EventMonitorCheck("Crush","1")
if msg ~= nil then
         if string.find(msg, "I'll crush you!") then
          __WPL:setWaypointIndex(__WPL:findWaypointTag("away"));
          end
end
      until moretocome == false

   </onSkillCast>
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

wizzyslo
Posts: 119
Joined: Sun Nov 01, 2009 6:09 pm

Re: Monitoring ingame events.

#51 Post by wizzyslo » Mon Jul 04, 2011 10:34 am

If i add I get only spamming on chat: "Cannot get log event for monitor 'Crush'. No such monitor name exists." nothing else. Somehow it doesnt start monitor.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Monitoring ingame events.

#52 Post by rock5 » Mon Jul 04, 2011 11:02 am

wizzyslo wrote:If i add I get only spamming on chat: "Cannot get log event for monitor 'Crush'. No such monitor name exists." nothing else. Somehow it doesnt start monitor.
That's because the monitor wont start until you get to the waypoint where it starts but the monitor is checked every time you cast a skill.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

wizzyslo
Posts: 119
Joined: Sun Nov 01, 2009 6:09 pm

Re: Monitoring ingame events.

#53 Post by wizzyslo » Mon Jul 04, 2011 11:35 am

It should start it at 1st waypoint ( # 21) after making party.
I added it at 2nd, 3rd waypoint but dont help. Only if i write it wrong.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Monitoring ingame events.

#54 Post by rock5 » Tue Jul 05, 2011 1:04 am

wizzyslo wrote:It should start it at 1st waypoint ( # 21) after making party.
I added it at 2nd, 3rd waypoint but dont help. Only if i write it wrong.
Does it keep doing the error or only just at the start? Because I think the bot applies buffs before going to the first waypoint so you will always get that message after the initial buff casts.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

wizzyslo
Posts: 119
Joined: Sun Nov 01, 2009 6:09 pm

Re: Monitoring ingame events.

#55 Post by wizzyslo » Tue Jul 05, 2011 5:44 am

Allways does that error no matter on which waypoint it is.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Monitoring ingame events.

#56 Post by lisa » Tue Jul 05, 2011 6:32 am

Easiest/Best solution is probably to just check the boss is your target before checking eventmonitor.

Code: Select all

<onSkillCast>
    --  if target.Name = "boss guy" then
      repeat
          local time, moretocome, msg = EventMonitorCheck("Crush","1")
if msg ~= nil then
         if string.find(msg, "I'll crush you!") then
          __WPL:setWaypointIndex(__WPL:findWaypointTag("away"));
          end
end
      until moretocome == false
    --  end
   </onSkillCast>
Obviously that code won't work, I am at work so can't spend any time of doing the actual code but you get the idea.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

wizzyslo
Posts: 119
Joined: Sun Nov 01, 2009 6:09 pm

Re: Monitoring ingame events.

#57 Post by wizzyslo » Fri Jul 08, 2011 3:14 am

In which folder or file is addon saving events? Maybe at that way i can find what is wrong. My idea is that file where events should be saving dont exist or bot doesnt make it.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Monitoring ingame events.

#58 Post by lisa » Fri Jul 08, 2011 4:56 am

change bossguy to name of the boss and see if this fixes your issue.

Code: Select all

<onSkillCast>

local target = player:getTarget();

    if target and target.Name = "bossguy" then
printf("targeting mad mallen\n")
      repeat
          local time, moretocome, msg = EventMonitorCheck("Crush","1")
if msg ~= nil then
         if string.find(msg, "I'll crush you!") then
          __WPL:setWaypointIndex(__WPL:findWaypointTag("away"));
          end
end
      until moretocome == false
else
printf("Using skill but not targeting mad mullen or the name is incorrect.\n")
     end
   </onSkillCast>
With this it will print on MM if targeting him or if not targeting him. If you are targeting him and you get the not targeting print then the name is incorrect.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: Monitoring ingame events.

#59 Post by MiesterMan » Fri Jul 08, 2011 12:14 pm

Atm this works for getting GetTime():

Code: Select all

memoryReadDoublePtr(getProc(),0x00606FF2,0)
Again, the value I gave before was right before a patch. In this case the address listed above is actually where the variable is declared in the executable and is right before the function if you'd like to write a pattern match for it.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Monitoring ingame events.

#60 Post by lisa » Fri Jul 08, 2011 1:08 pm

I just tested event monitor for first time since patch. For some reason it's not working for me. I'll have a look into it maybe tomorrow.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Post Reply

Who is online

Users browsing this forum: No registered users and 187 guests