Monitoring ingame events.

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Monitoring ingame events.

#61 Post by lisa » Fri Jul 08, 2011 10:39 pm

Working fine again now, not sure what happened yesterday.

Ok so I am doing some testing using GetTime()

Code: Select all

local triggerTime = GetTime()
When I do a print in MM for time

Code: Select all

local time, moreToCome, name, msg = EventMonitorCheck("GMdetect", "4,1")
    if time ~= nil then -- make sure something was returned
	printf("time "..time.."\n")
"time 1310138962.9844"
When I do a RoMScript it does this
"6424.1801757813"
I don't see how the same ingame function can return different values when done within a second of each other.

Also did more testing in commandline. same print as last page
6217.130859375
6216.5170898438
6216.6040039063

Code: Select all

print(RoMScript("GetTime()")) print(memoryReadFloat(getProc(), 0x9a8288)) print(memoryReadFloatPtr(getProc(),0x9c57ec, 0xe14))
Also tried using print(memoryReadFloat(getProc(), 0x9a8288)) in the userfunction as a print and it returned same value. So not sure why the time from the event monitor is so different.
Maybe to do with the filtering of the args?
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.

#62 Post by rock5 » Fri Jul 08, 2011 11:11 pm

lisa wrote:Ok so I am doing some testing using GetTime()

Code: Select all

local triggerTime = GetTime()
Might be a silly question but did you change it to GetTime() in the devtools folder or the interface/addons folder?

Also,
lisa wrote:I don't see how the same ingame function can return different values when done within a second of each other.
They wouldn't necessarilly be the same, as the first value is when the event happened and the second is the current time. But still, it doesn't explain the hug difference in 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.

#63 Post by lisa » Sat Jul 09, 2011 2:00 am

changed it in client/interface/addons

I didn't even concider the devtools were actually used.
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.

#64 Post by rock5 » Sat Jul 09, 2011 2:46 am

I thought you might have made a mistake? Obviously you didn't. Like I said, it was a silly question.

Another silly question, did you restart the game or run reloadui afte making the change?
  • 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.

#65 Post by lisa » Sat Jul 09, 2011 8:40 am

Yesterday I did reloadUI which is why I think it wasn't working. I killed d303 to make sure it was using the GetTime()

Today is deff fresh start up of client. So the time posted is deff GetTime() but it is being changed and my thought is because of the filter.

Code: Select all

	-- filter returned args
	local toSend = {}
	if returnFilter then
		for val in string.gmatch(returnFilter,"[^]+(.*)[,]+") do
			local val = tonumber(val)
			if val and entryToSend.Args[val] then
				table.insert(toSend,entryToSend.Args[val])
			end
		end
	else
		for k, v in pairs(entryToSend.Args) do
			if v ~= nil  then
				table.insert(toSend,v)
			end
		end
	end

	entryToSend.Args = toSend

	return entryToSend.Time, moreFound, unpack(entryToSend.Args)
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.

#66 Post by rock5 » Sat Jul 09, 2011 9:31 am

The filter doesn't change the values, it just selects which values to return.

This is what I did (after changing it to GetTime),

Code: Select all

        RomBot command line
Type in 'q' (without quotes) to quit.
Command> EventMonitorStart("test","CHAT_MSG_SAY")
Command> time, moreToCome, msg = EventMonitorCheck("test","1") print(time) print(RoMScript("GetTime()"))
46189.703125
46251.21484375
Command>
So it looks like it's working for me. So I don't know what's going on.

That really big number does look like the result of os.time(). You said you changed it in client/interface/addons and you've restarted the client. The only thing I can think of is you changed it in the wrong client, maybe? Don't you have more than 1 client installed?

It's probably not that but I get the destinct impression that it will end up being something stupid and you'll kick yourself when you realise. :D
  • 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
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: Monitoring ingame events.

#67 Post by MiesterMan » Sat Jul 09, 2011 10:25 am

The value is a double, not a float.

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

Re: Monitoring ingame events.

#68 Post by rock5 » Sat Jul 09, 2011 10:09 pm

MiesterMan wrote:The value is a double, not a float.
No, the value she got from memory is a float. Evident by the fact that it was the same as the GetTime() value.
  • 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
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: Monitoring ingame events.

#69 Post by MiesterMan » Sat Jul 09, 2011 11:34 pm

Ok, I must have missed something. I thought she was getting a different value from memory.

Also, the value I found was a double so I must be confusing that too... I'll try to reread but I'm obviously having trouble following what the issue is. :oops:

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

Re: Monitoring ingame events.

#70 Post by lisa » Sat Jul 09, 2011 11:39 pm

MiesterMan wrote:Ok, I must have missed something. I thought she was getting a different value from memory.

Also, the value I found was a double so I must be confusing that too... I'll try to reread but I'm obviously having trouble following what the issue is. :oops:
That makes 2 of us, I can't for the life of me work out why it is returning such a different number for time then the value of GetTime().

I'll get back to it another day, I have higher priorities atm =(
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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Monitoring ingame events.

#71 Post by lisa » Sun Jul 10, 2011 2:45 am

Well that is slightly weird, I did in game /script SendSystemChat(os.time()) and it posted the value I have been getting for time from event monitor. But I changed it to GetTime().

I need to look into it some more.
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

warlord
Posts: 8
Joined: Sun Jul 17, 2011 8:51 pm

Re: Monitoring ingame events.

#72 Post by warlord » Sun Jul 17, 2011 9:07 pm

lisa wrote: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.
hi, I tried this code but it end with error /scripts/rom/settings.lua:697: Failed to compile and run Lua code for onSkillCast in character profile.

i also tried that code mentioned before without target check but that also did not work for me - it stuck on first used skill and probably not finish that repeat and not continue to next skill

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>
txs for advice

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

Re: Monitoring ingame events.

#73 Post by lisa » Sun Jul 17, 2011 10:08 pm

warlord wrote:hi, I tried this code but it end with error /scripts/rom/settings.lua:697: Failed to compile and run Lua code for onSkillCast in character profile
Can you post the code you tried.
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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Monitoring ingame events.

#74 Post by lisa » Sun Jul 17, 2011 10:13 pm

it was my bad, I had = "bossguy"and not =="bossguy"
try this

Code: Select all

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
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

warlord
Posts: 8
Joined: Sun Jul 17, 2011 8:51 pm

Re: Monitoring ingame events.

#75 Post by warlord » Mon Jul 18, 2011 4:36 am

lisa wrote:it was my bad, I had = "bossguy"and not =="bossguy"
try this

Code: Select all

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
oh thanks, I should find out that by myself too, but even it solved that compiling error, script stuck on first casted skill with repeatly pressing RB command macro key
there was no message like "targeting malen", even no message like "Using skill but not targeting mad mullen" only pressing that key and script not continue

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
    <!-- #  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"> EventMonitorStart("crush","CHAT_MSG_SAY");   </waypoint>
   <!-- #  5 --><waypoint x="2395" z="2484" y="401">   </waypoint>
   <!-- #  5 --><waypoint x="2495" z="2584" y="401" type="TRAVEL" 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>

Code: Select all

<onSkillCast>
   
local target = player:getTarget();

    if target and target.Name == "Okander \"Mad Man\" Mallen" 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>

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

Re: Monitoring ingame events.

#76 Post by rock5 » Mon Jul 18, 2011 5:36 am

warlord wrote:script stuck on first casted skill with repeatly pressing RB command macro key
To figure out what it's trying to do, open the macro interface, find the "RB Command", open it and see what command it was trying to execute.
  • 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

warlord
Posts: 8
Joined: Sun Jul 17, 2011 8:51 pm

Re: Monitoring ingame events.

#77 Post by warlord » Mon Jul 18, 2011 7:19 am

rock5 wrote:
warlord wrote:script stuck on first casted skill with repeatly pressing RB command macro key
To figure out what it's trying to do, open the macro interface, find the "RB Command", open it and see what command it was trying to execute.
i let it run longer and it went this way:
cast first skill
then targeting malen condition print that text
and then repeats RB Command macro till boss say anything
and after that it uses second skill and again waiting for boss to say something

RB command

Code: Select all

/script R='' a={igf_events:GetLogEvent('crush','1', nil)} for i=1,#a do R=R..tostring(a[i])..'	' end EditMacro(3,'RB',7,R)

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

Re: Monitoring ingame events.

#78 Post by rock5 » Mon Jul 18, 2011 7:43 am

I'd say either the event wasn't started; maybe you encounterd the boss before the correct waypoint or you restarted the waypoint file after the startmonitor waypoint.

Or, you don't have the "ingamefunctions" folder installed in the games "interface/addons" folder or it's not up to date.

Also it's possible that until there is a message, moretocome will = nil so try changing

Code: Select all

      until moretocome == false
to

Code: Select all

      until moretocome ~= true
Actually, try this first. It will probably fix it.
  • 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.

#79 Post by wizzyslo » Wed Jul 20, 2011 5:44 am

At least it works :D Is this posible to use in party bot becouse that choo choo train is pritty lame?

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest