yrest system message?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

yrest system message?

#1 Post by Lamkefyned » Sun Jul 20, 2014 8:20 am

RAScrnShot_20140720_151026.jpg
I can put it as a break till I make what I circled in red?
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: yrest system message?

#2 Post by Administrator » Sun Jul 20, 2014 9:02 pm

You mean wait for 10 seconds and print a message every one second? Sure. Something like this:

Code: Select all

for i = 1,10 do
  local startTime = getNow();
  while( deltaTime(getNow(), startTime) < 1 ) do
    yrest(10);
  end
  printf("%d seconds passed.\n", i);
end
Instead of using the print, you could use RoMScript() to send it to the game.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: yrest system message?

#3 Post by Lamkefyned » Wed Jul 23, 2014 5:41 pm

no, not that

when I set the system message of the event follow the script
If you think something is right just because everyone else believes,you're not thinking.

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

Re: yrest system message?

#4 Post by rock5 » Wed Jul 23, 2014 10:32 pm

Are you saying you want to wait until "Etapa 10" appears in chat? You can do that with the EventMonitor commands. Example.

Code: Select all

EventMonitorStart("MyMonitor","CHAT_MSG_SYSTEM")
repeat
	yrest(100)
	local time, moreToCome, msg = EventMonitorCheck("MyMonitor", "1")
until string.find(msg, "Etapa 10")
EventMonitorStop("MyMonitor")
I think that should work. I think the correct event to monitor is "CHAT_MSG_SYSTEM" but I could be wrong.
  • 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
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: yrest system message?

#5 Post by Lamkefyned » Sat Jul 26, 2014 4:10 pm

Error

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<waypoints>
	<!-- Updated>26/07/2014 5:00 AM PST<-->
	
	<!-- Enter Guild --> 
	<!-- #  1 --><waypoint x="-22152" z="6469" y="-179">
			player:target_NPC(111731)
			sendMacro("ChoiceOption(2);");
			waitForLoadingScreen()
	</waypoint>
	<!-- #  2 --><waypoint x="177" z="-487" y="6">	</waypoint>
	<!-- #  3 --><waypoint x="180" z="-408" y="8">	
			player:target_NPC(112896)
			sendMacro("ChoiceOption(1);");
			waitForLoadingScreen()
	</waypoint>

	<!-- Drill Ground --> 
	<!-- #  3 --><waypoint x="5121" z="2519" y="13">
		if (getCurrency("honor") >= 25000) then
			player:sleep()
		end
		
        player:updateBuffs();
	 	if not player:hasBuff(506684) then
        	 	inventory:useItem(207200);
	 	end
		
   		fly()
	</waypoint>
	<!-- #  4 --><waypoint x="5136" z="2566" y="130">	</waypoint>
	<!-- #  5 --><waypoint x="4625" z="3049" y="292">	</waypoint>
	<!-- #  6 --><waypoint x="2470" z="4243" y="292">	</waypoint>
	<!-- #  8 --><waypoint x="2088" z="4632" y="13">
		if RoMScript("StaticPopup1:IsVisible()") then
			sendMacro('StaticPopup_OnClick(StaticPopup1, 1);')
		end
	</waypoint>
	<!-- #  1 --><waypoint x="2419" z="4324" y="335">	</waypoint>
	<!-- #  2 --><waypoint x="3632" z="3941" y="337">
	EventMonitorStart("MyMonitor","CHAT_MSG_SYSTEM")
	  repeat
		yrest(100)
		local time, moreToCome, msg = EventMonitorCheck("MyMonitor", "1")
	  until string.find(msg, "Etapa 10")
	EventMonitorStop("MyMonitor")
	</waypoint>

</waypoints>
Sin título.jpg
If you think something is right just because everyone else believes,you're not thinking.

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

Re: yrest system message?

#6 Post by lisa » Sat Jul 26, 2014 7:49 pm

change

Code: Select all

until string.find(msg, "Etapa 10")
to

Code: Select all

until msg and string.find(msg, "Etapa 10")
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 188 guests