Page 4 of 4
Re: Script to do a waypoint if the EOJ timer doesn't show?
Posted: Thu Mar 28, 2013 6:34 pm
by lisa
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 ==
Re: Script to do a waypoint if the EOJ timer doesn't show?
Posted: Fri Mar 29, 2013 3:47 am
by rock5
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)
Re: Script to do a waypoint if the EOJ timer doesn't show?
Posted: Fri Mar 29, 2013 3:58 am
by lisa
Sounds good =)
Re: Script to do a waypoint if the EOJ timer doesn't show?
Posted: Fri Mar 29, 2013 5:47 pm
by haringpb
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.
Re: Script to do a waypoint if the EOJ timer doesn't show?
Posted: Sat Mar 30, 2013 12:52 am
by rock5
Not all servers will have 3 channels. That might cause problems for some users.