-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#61
Post
by lisa » Thu Mar 28, 2013 6:34 pm
tested with this and it works fine.
Code: Select all
Command> EventMonitorStart("Tortevent", "WARNING_MESSAGE") while(true) do local
time, moreToCome, name = EventMonitorCheck("Tortevent",1) yrest(10) if name
then print(name) end end EventMonitorStop("Tortevent")
|cffffff80Regional event now restarting!|r
|cffffff80Regional event has ended successfully!|r
Note the colour stuff (cffffffff80) , so like in the andor wp you will need to do a string.find and not just ==
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#62
Post
by rock5 » Fri Mar 29, 2013 3:47 am
For warning messages and using the latest bot you could also use the new "getLastWarning(message, age)" function. No need to set up monitors although you will need to know the message. Something like this should work.
Code: Select all
msg = getTEXT("SC_ZONE_PE_3TH_ST1START")
repeat
yrest(10)
until getLastWarning(msg, 10)
- 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.”
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#63
Post
by lisa » Fri Mar 29, 2013 3:58 am
Sounds good =)
-
haringpb
- Posts: 29
- Joined: Fri Feb 22, 2013 1:19 pm
#64
Post
by haringpb » Fri Mar 29, 2013 5:47 pm
Allright big thanks to you lisa and rock5
So for those who are even less in pogramming:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<waypoints>
<onload>
function doquest()
local gomsg = getTEXT("SC_ZONE_PE_3TH_ST1START")
repeat
yrest(10)
until getLastWarning(gomsg, 10)
local endmsg = getTEXT("SC_ZONE_PE_3TH_FAIL")
repeat
yrest(10)
quest()
until getLastWarning(endmsg, 10)
sendMacro("ChangeParallelID(2);");
player:rest(30)
local id = RoMScript("GetCurrentParallelID()")
if id ~= 2 then
RoMScript("ChangeChar(1,nil,2)")
waitForLoadingScreen()
repeat
yrest(10)
until getLastWarning(gomsg, 10)
end
repeat
yrest(10)
quest()
until getLastWarning(endmsg, 10)
sendMacro("ChangeParallelID(3);");
player:rest(30);
id = RoMScript("GetCurrentParallelID()")
if id ~= 3 then
RoMScript("ChangeChar(1,nil,3)")
waitForLoadingScreen()
repeat
yrest(10)
until getLastWarning(gomsg, 10)
end
repeat
yrest(10)
quest()
until getLastWarning(endmsg, 10)
sendMacro("ChangeParallelID(1);");
player:rest(30);
id = RoMScript("GetCurrentParallelID()")
if id ~= 1 then
RoMScript("ChangeChar(1,nil,1)")
waitForLoadingScreen()
repeat
yrest(10)
until getLastWarning(gomsg, 10)
end
end
function quest()
inventory:useItem("Arrowhead Carved with Name")
RoMScript("AcceptBorderQuest()")
RoMScript("ScriptBorder:Hide()")
player:target_NPC("Myan Kellas")
CompleteQuestByName("Last Luck","public")
end
</onload>
<!-- # 1 --><waypoint x="-2699" z="-17935" y="810">
doquest()
</waypoint>
</waypoints>
This will do the local event on every 3 channels and checks if the channelbuggs and reloggs if this is the case. You will need Loginxml by rock5.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#65
Post
by rock5 » Sat Mar 30, 2013 12:52 am
Not all servers will have 3 channels. That might cause problems for some users.
- 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.”
Who is online
Users browsing this forum: Bing [Bot] and 9 guests