hi was working on the same problem, and the first thing i would like to recommend is to read out the time till event starts and then use a yrest till this point. Here is how i do it:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<waypoints>
<onload>
function doevent()
local read1
read1 = memoryReadRepeat("intptr",getProc(), addresses.staticTablePtr - 0x40 ,{0x3CC,0x4B8,0x230,0x94,0x90})
if not read1 then --32bit code didn't work, try 64bit.
read1 = memoryReadRepeat("intptr",getProc(), addresses.staticTablePtr - 0x40 ,{0x338,0x38,0x230,0x94,0x90})
end
return read1;
end
function doquest()
local Counter = doevent()
if Counter > 6000 then
yrest(Counter)
inventory:useItem("Arrowhead Carved with Name")
RoMScript("AcceptBorderQuest()")
RoMScript("ScriptBorder:Hide()")
player:target_NPC("Myan Kellas")
CompleteQuestByName("Last Luck","public")
else
inventory:useItem("Arrowhead Carved with Name")
RoMScript("AcceptBorderQuest()")
RoMScript("ScriptBorder:Hide()")
player:target_NPC("Myan Kellas")
CompleteQuestByName("Last Luck","public")
end
end
</onload>
<!-- # 1 --><waypoint x="-2699" z="-17935" y="810">
doquest()
</waypoint>
</waypoints>
but the problem nearly all here are revering too is when the timer disappears doevent() will be nil and as comparing nil to an int you will get an error.
So the doevent function or eventscore only works as long the timer is shown, although you if you read it out with the function lisa coded so there are 3 opportunities here:
1. find out how to ask the server after the timer
2. check if doevent returns nil and wait/search for the timer
3. as the event starts every 20min. Buildng function that checks if current time is == 00:11 or 00:31 or 00:51 or 01:11 or 01:31 and so on.
And one more thing would be interesting to find out. The event in Chrysalia is not only on 1 channel its also on the outher 2 so if we could read out the timer without it being shown, we would be able to do event on the other channels as well and im locking for a function to change channel
sry for my bad english and hoping to work that out with you guys