yrest system message?
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
yrest system message?
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.
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: yrest system message?
You mean wait for 10 seconds and print a message every one second? Sure. Something like this:
Instead of using the print, you could use RoMScript() to send it to the game.
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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: yrest system message?
no, not that
when I set the system message of the event follow the script
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.
Re: yrest system message?
Are you saying you want to wait until "Etapa 10" appears in chat? You can do that with the EventMonitor commands. Example.
I think that should work. I think the correct event to monitor is "CHAT_MSG_SYSTEM" but I could be wrong.
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")
- 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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: yrest system message?
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>
If you think something is right just because everyone else believes,you're not thinking.
Re: yrest system message?
change
to
Code: Select all
until string.find(msg, "Etapa 10")
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Who is online
Users browsing this forum: No registered users and 188 guests