Script to do a waypoint if the EOJ timer doesn't show?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
Hidden
Posts: 101
Joined: Tue May 08, 2012 6:10 pm

Re: Script to do a waypoint if the EOJ timer doesn't show?

#21 Post by Hidden » Sat Nov 03, 2012 12:38 pm

Thanks Rock that removed the error but..

Now it waits till event starts, completes quest, accepts quest and then stands there. Event timer is showing. (Event timer just disappeared and it still waiting there.)

Is there some way of implementing the PEFvisable into the wait for event start function? eg if timer not visible = start script?

Code: Select all

repeat
    yrest(5000)
until PEFisVisible()
I noticed that I haven't put that anywhere not really sure where to put it. and i corrected a homebase tag to start as it should have been.

abron1
Posts: 162
Joined: Wed Feb 22, 2012 12:43 am

Re: Script to do a waypoint if the EOJ timer doesn't show?

#22 Post by abron1 » Sun Nov 04, 2012 1:24 am

add this to your onload

Code: Select all

 if (ScorePE == nil) then
         printf("Score is nil, oh no!")
         __WPL:setWaypointIndex(__WPL:findWaypointTag("ADD YOUR WAYPOINT TAG")); 
         return
      end
 
so it should look like this

Code: Select all

function waitForEventStart()
   	repeat
      yrest(1000) -- check every second
      local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
      if (ScorePE == nil) then
         printf("Score is nil, oh no!")
         __WPL:setWaypointIndex(__WPL:findWaypointTag("timer")); 
         return
      end
      if Count == 2 and YourTargetScore > ScorePE then break end
      until false
	end
so if the timer disappers it will go to the place you want i made a waypoint with the tag timer and have it run to a spot where the timer will show then come back to the event loop and wait

Hidden
Posts: 101
Joined: Tue May 08, 2012 6:10 pm

Re: Script to do a waypoint if the EOJ timer doesn't show?

#23 Post by Hidden » Sun Nov 04, 2012 4:58 am

Thanks Abron,

Will have to settle for getting it to run a second wp and just loop the event. Might just make it run to one further down the road when the timer disappears.

crazzy
Posts: 35
Joined: Sun Feb 17, 2013 4:47 am

Re: Script to do a waypoint if the EOJ timer doesn't show?

#24 Post by crazzy » Sun Feb 17, 2013 1:50 pm

hy guys!

first of all i would like to thank rock and lisa for their work and greetings from germany

i have a problem with the visible eoj timer and i would like to ask you for your help!

the problem is:
i do the event quest onetime.. then the bot goes to the spot where the timer is visible and returns.. do the event
quest onetime and returns..
what i want is:
stand at wp #1 wait for event stand there at event.. do event at #1 till event is over and only move
to timer visible wp´s when timer disappears
can you please have a look at my xml?
thanks

--------------------------------
--------------------------------

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>

YourTargetScore = 5900

function waitForEventStart()
repeat
yrest(1000) -- check every second
local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
if (ScorePE == nil) then
printf("Score is nil, oh no!")
__WPL:setWaypointIndex(__WPL:findWaypointTag("timer"));
return
end
if Count == 2 and YourTargetScore > ScorePE then break end
until false
end

function isEventFinished()
local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
if Count ~= 2 or ScorePE >= YourTargetScore then
__WPL:setForcedWaypointType("RUN")
__WPL:setWaypointIndex(__WPL:findWaypointTag("Home Base"));
end
end

</onload>

<!-- # 1 --><waypoint x="-2734" z="-17945" y="809" tag="Home Base">
waitForEventStart()
__WPL:setForcedWaypointType("NORMAL")
inventory:useItem("Pfeilspitze mit graviertem Namen");yrest(800);
RoMScript("AcceptBorderQuest()");yrest(300);
player:target_NPC("Myan Kellas");
RoMScript("ScriptBorder:Hide()");yrest(100)
if (isEventFinished()) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Home Base"));
end
</waypoint>
<!-- # 2 --><waypoint x="-2723" z="-18032" y="810" tag="timer">
</waypoint>
<!-- # 2 --><waypoint x="-2815" z="-18151" y="811"> </waypoint>
<!-- # 3 --><waypoint x="-2861" z="-18117" y="810"> </waypoint>
<!-- # 4 --><waypoint x="-2912" z="-18048" y="810"> </waypoint>
<!-- # 5 --><waypoint x="-2843" z="-18167" y="810"> </waypoint>
<!-- # 6 --><waypoint x="-2738" z="-18081" y="809"> </waypoint>
<!-- # 7 --><waypoint x="-2734" z="-17945" y="809">
waitForEventStart()
</waypoint>
</waypoints>

abron1
Posts: 162
Joined: Wed Feb 22, 2012 12:43 am

Re: Script to do a waypoint if the EOJ timer doesn't show?

#25 Post by abron1 » Sun Feb 17, 2013 5:46 pm

that the end of your script when you loop back you have to put

Code: Select all

  if (isEventFinished()) then
     __WPL:setWaypointIndex(__WPL:findWaypointTag("Home Base"));
then at home base you should have the wait for event to start function

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

Re: Script to do a waypoint if the EOJ timer doesn't show?

#26 Post by lisa » Sun Feb 17, 2013 6:04 pm

I don't have the dissappearing event score issue but you can always try the function I posted which gets the values from memory.
http://www.solarstrike.net/phpBB3/viewt ... 252#p47252
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

crazzy
Posts: 35
Joined: Sun Feb 17, 2013 4:47 am

Re: Script to do a waypoint if the EOJ timer doesn't show?

#27 Post by crazzy » Mon Feb 18, 2013 12:47 am

thanks for your fast answer..! :)

i´ll try it later after work ~ bb

btw:
i´ll think i have to put a "end" after that one?! ->

if (isEventFinished()) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Home Base"));

crazzy
Posts: 35
Joined: Sun Feb 17, 2013 4:47 am

Re: Script to do a waypoint if the EOJ timer doesn't show?

#28 Post by crazzy » Mon Feb 18, 2013 5:19 am

hy guys..!
i´d tried it but it doesn´t work :(

what the bot still does is:
do the event quest onetime(!) - start wp´s #2-#7 - do the event q onetime - ...

what i need is:
do the event quest till score is reached or event is over - wait till next event starts - AND if event NOT
visible -> start wp´s #2-#7 to get timer visible

*need help!*

thanks for your work..!
i really appr. it!!

thanks frank

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

Re: Script to do a waypoint if the EOJ timer doesn't show?

#29 Post by lisa » Mon Feb 18, 2013 5:41 am

maybe look at my file here as an example.

http://www.solarstrike.net/phpBB3/viewt ... 435#p46435
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

crazzy
Posts: 35
Joined: Sun Feb 17, 2013 4:47 am

Re: Script to do a waypoint if the EOJ timer doesn't show?

#30 Post by crazzy » Mon Feb 18, 2013 6:22 am

hy lisa :)
i know your file.. i use it for my dq!
for the event i want to do the arrowhead q but still got problems with the visibility of the timer :(
maybe you can have a look at it.. wp # 2 - #7 are only for getting the timer back.. the char should
stay there at # 1 and wait and do event quest!
BUT he does the event q only once.. then do the wp 2-7 do the q once and again :|
i think i should have something like:
"do till event finished the quest"
*help!*
i´ll post my xml
Attachments
EoJ_Pfeilspitzen_2TEST.xml
(1.74 KiB) Downloaded 242 times

haringpb
Posts: 29
Joined: Fri Feb 22, 2013 1:19 pm

Re: Script to do a waypoint if the EOJ timer doesn't show?

#31 Post by haringpb » Fri Feb 22, 2013 1:32 pm

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 ;)

crazzy
Posts: 35
Joined: Sun Feb 17, 2013 4:47 am

Re: Script to do a waypoint if the EOJ timer doesn't show?

#32 Post by crazzy » Mon Feb 25, 2013 11:30 am

haringpb wrote:and hoping to work that out with you guys ;)
i really hope that some of the pro´s like lisa or rock5 will have a look at that problem.. ;)

i think there must be a solution to fix it..!

some way to read out that timer.. mmh ~ my skills end right here(!)

btw ~ on our server the event is only on ch 1

bb

haringpb
Posts: 29
Joined: Fri Feb 22, 2013 1:19 pm

Re: Script to do a waypoint if the EOJ timer doesn't show?

#33 Post by haringpb » Mon Feb 25, 2013 5:36 pm

Well if you want a solution you could check timer every x secounds and if doevent() = nil then loadpaths("searchtimer")
With a Searchtimer waypoint witch has loadpaths("publicevent").
But this doesnt solve the problem with the timer not being shown on the outher server and even more, that you cant see the score there. If you could read this out it would be great.

crazzy
Posts: 35
Joined: Sun Feb 17, 2013 4:47 am

Re: Script to do a waypoint if the EOJ timer doesn't show?

#34 Post by crazzy » Tue Feb 26, 2013 3:28 am

Sounds interesting to me..
Did you have some kind of code for that..?!
My skills end here^^
Or maybe Lisa will have a look at the code..

Bye Bye

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

Re: Script to do a waypoint if the EOJ timer doesn't show?

#35 Post by lisa » Tue Feb 26, 2013 6:58 am

If the code I posted that reads it directly from memory doesn't work while the event is "missing" then you will just have to resort to
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 have no way of knowing what score you have or whether the event is over.

There is already code posted somewhere to tell what time it is.
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

crazzy
Posts: 35
Joined: Sun Feb 17, 2013 4:47 am

Re: Script to do a waypoint if the EOJ timer doesn't show?

#36 Post by crazzy » Tue Feb 26, 2013 1:04 pm

hy..! :)

tried the other methods already.. but.. and i think there are many more.. it doesn´t work. :(
regardly to the 3. method - reading the time - i can´t find any code in the forum.. i searched every
single post here..
*help*

bb

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

Re: Script to do a waypoint if the EOJ timer doesn't show?

#37 Post by lisa » Tue Feb 26, 2013 6:03 pm

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

crazzy
Posts: 35
Joined: Sun Feb 17, 2013 4:47 am

Re: Script to do a waypoint if the EOJ timer doesn't show?

#38 Post by crazzy » Thu Feb 28, 2013 9:50 am

Hyhy!

I think it could be a solution.. But I am not able to write that function
With os.time and so on..! Because my prgramming skills end right
There :)
MAybe Lisa will have a short look at it ;) I really hope so

haringpb
Posts: 29
Joined: Fri Feb 22, 2013 1:19 pm

Re: Script to do a waypoint if the EOJ timer doesn't show?

#39 Post by haringpb » Sun Mar 03, 2013 8:46 am

Hi seems since the last patch the function

Code: Select all

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
doesn´t work anymore can we get an update or could anybody explain how i could update it?

crazzy
Posts: 35
Joined: Sun Feb 17, 2013 4:47 am

Re: Script to do a waypoint if the EOJ timer doesn't show?

#40 Post by crazzy » Mon Mar 04, 2013 4:20 pm

*word*
push!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 12 guests