Energy of Justice easily earned

Talk about anything in Runes of Magic. This does not need to pertain to botting.
Message
Author
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Energy of Justice easily earned

#21 Post by ZZZZZ » Sun Jan 05, 2014 2:41 am

whiskerbiscuit wrote:About 2 hours I was able to get a little over 1500 EOJ's.
How can you get 1500 eoj in a 'little' over 2 hours when using 1 character in the manner you say? it would take 14 hours to get that amount (35 max every 20 mins) lol.

whiskerbiscuit
Posts: 5
Joined: Wed Jan 01, 2014 7:23 pm

Re: Energy of Justice easily earned

#22 Post by whiskerbiscuit » Sun Jan 05, 2014 6:48 pm

ZZZZZ wrote:
whiskerbiscuit wrote:About 2 hours I was able to get a little over 1500 EOJ's.
How can you get 1500 eoj in a 'little' over 2 hours when using 1 character in the manner you say? it would take 14 hours to get that amount (35 max every 20 mins) lol.
Probably because I had some already and didn't realize it.. so my bad. Either way it works. Only problem is you're pulling Wilderness stats... not exactly what you want. Been looking for a farm in Sarlo to pull better ones.

hangman04
Posts: 6
Joined: Tue Dec 17, 2013 6:19 pm

Re: Energy of Justice easily earned

#23 Post by hangman04 » Wed Jan 08, 2014 7:16 am

whiskerbiscuit wrote:
ZZZZZ wrote:
whiskerbiscuit wrote:About 2 hours I was able to get a little over 1500 EOJ's.
How can you get 1500 eoj in a 'little' over 2 hours when using 1 character in the manner you say? it would take 14 hours to get that amount (35 max every 20 mins) lol.
Probably because I had some already and didn't realize it.. so my bad. Either way it works. Only problem is you're pulling Wilderness stats... not exactly what you want. Been looking for a farm in Sarlo to pull better ones.
Well my advice is to farm 10000+ in that spot and afterwards go and win 1st manually in 80/82 area. This way you will have access to the top stats.

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Energy of Justice easily earned

#24 Post by noobbotter » Fri Jan 10, 2014 1:07 pm

Does anyone know what servers have EoJ's essentially disabled? On my server it seems like whatever you do, you only earn 1 EoJ per event.

Edit/Update: I was mistaken. I didn't realize that a certain number of points had to be earned to get a certain amount of eoj as a reward. I was under the assumption that if you place 1st, you would get the full reward. Since my original comment, I have managed to get enough points to get higher rewards. Still haven't gotten the full 6000 points though, as it seems hardly anyone is doing eoj events on my server and my script isn't efficient enough to get all the points myself.

jester
Posts: 15
Joined: Sun May 13, 2012 12:48 pm

Re: Energy of Justice easily earned

#25 Post by jester » Fri Jan 24, 2014 9:46 am

Is it possible to change the channel means aadona location?

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Energy of Justice easily earned

#26 Post by BlubBlab » Sun Jan 26, 2014 2:27 pm

kuripot wrote:
ZZZZZ wrote:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
	YourTargetScore = 6000
	
    function waitForEventStart()
      repeat
         yrest(1000) -- check every second
         local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
         if Count == 2 and YourTargetScore > ScorePE then break end
      until false
   end

		function EOJCrysalia()
			waitForEventStart()
			player:target_NPC(120273) -- Papp Hesof
			RoMScript("DeleteQuestByID(425598)");
			EOJCrysalia()
		end	
</onLoad>
	<!-- #  1 --><waypoint x="-9407" z="-18349" y="945">
			player:target(120273) -- Papp Hesof
			EOJCrysalia()
	</waypoint>
</waypoints>
That's what i used.


why it's not work to me.. just stamding on npc.. doing nothing
I can only say this will cause a stack overflow because EOJCrysalia() call EOJCrysalia() infinity times
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
L33t_Of_Lag
Posts: 38
Joined: Thu Jan 02, 2014 7:34 am

Re: Energy of Justice easily earned

#27 Post by L33t_Of_Lag » Tue Jan 28, 2014 10:41 pm

If i only have one char doing it, no stack overflow, if 1 or more chars do it, they both get stack overflow. Dont know why.

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

Re: Energy of Justice easily earned

#28 Post by lisa » Tue Jan 28, 2014 10:58 pm

L33t_Of_Lag wrote:If i only have one char doing it, no stack overflow, if 1 or more chars do it, they both get stack overflow. Dont know why.
1 MM doing it probably just isn't enough to because of your PC performance.

Calling a function from within that same function isn't a good idea, you may aswell just do a repeat loop or something, either way adding a yrest in that loop/function will stop the stack overflow, even just 1 millisecond can be enough but I would go with maybe 500.

yrest(500)

Code: Select all

      function EOJCrysalia()
         waitForEventStart()
         player:target_NPC(120273) -- Papp Hesof
         RoMScript("DeleteQuestByID(425598)");
         yrest(500)
         EOJCrysalia()
      end 
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

User avatar
L33t_Of_Lag
Posts: 38
Joined: Thu Jan 02, 2014 7:34 am

Re: Energy of Justice easily earned

#29 Post by L33t_Of_Lag » Tue Jan 28, 2014 11:57 pm

Good idea

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Energy of Justice easily earned

#30 Post by rock5 » Wed Jan 29, 2014 1:08 am

I don't think the yrest is the issue. The code inside the loop takes time to execute so the yrest wont make much difference. I'm not 100% sure but I think stack overflow error means the function called itself too many times. So, even though a function calling itself is bad practice, it should work as long as you stop before getting the stack overflow happens.

Just as a test I started the commandline and to see how many times MM will allow a function to call itself.

Code: Select all

Lua> c=0 function test() c=c+1 test() end test()
onLoad error: C:\Program Files (x86)\MICROMACRO\lib\lib.lua:491: stack overflow
Lua> print(c)
999960
So as long as you stop the bot before it does the event 999960 times, you shouldn't get a stack overflow. :)
  • 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

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

Re: Energy of Justice easily earned

#31 Post by lisa » Wed Jan 29, 2014 1:38 am

it depends greatly on what is inside the function.

example

Code: Select all

Command> c=0 function test() c=c+1 test() end test()
onLoad error: [string "c=0 function test() c=c+1 test() end test()"]:1: stack overflow
Command> print(c)
999954
Command> c=0 local z = 0 function test() local z = z+1 if stack then print("sure") end c=c+1 test() end test()
onLoad error: [string "c=0 local z = 0 function test() local z = z+1..."]:1: stack overflow
Command> print(c)
499976
Command> c=0 local z = 0 function test() z = z+1 if stack then print("sure") end
 if z == 500 then print("lol") end c=c+1 test() end test()
lol
onLoad error: [string "c=0 local z = 0 function test() z = z+1 if st..."]:1: stack overflow
Command> print(c)
999953
Don't ask me why lol

Also see what happens when you add even a yrest(1) to your loop ;)

Code: Select all

Command> st = os.time() c=0 function test() yrest(1) c=c+1 if c == 10000 then print(os.time() - st) return else test() end end test()
10
takes 10 seconds to do 10,000 loops with just 1 signle yrest(1) in there. without it you do 999960 in approx 1 second. So no stack overflow.


Also using a repeat loop won't get you a stack overflow no matter how big you make it, even without a yrest(1)

Code: Select all

Command> st = os.time() local c = 0 repeat c = c + 1 until c == 100000000 print(os.time() - st)
7
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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Energy of Justice easily earned

#32 Post by rock5 » Wed Jan 29, 2014 2:48 am

lisa wrote:it depends greatly on what is inside the function.
I suspected as much but when I attempted to put extra stuff in the loop I ended up with the same number, so I didn't mention it. Obviously I didn't add the right stuff to affect the count.
  • 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

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Energy of Justice easily earned

#33 Post by BlubBlab » Wed Jan 29, 2014 6:48 pm

Yeah I changed the code also and tested it

First this function didn't work:

Code: Select all

 function waitForEventStart()
      repeat
         yrest(1000) -- check every second
         local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
         if Count == 2 and YourTargetScore > ScorePE then break end
      until false
   end
So I ignored it at the and I got only 4 EoJ's. I'm playing on the offical server maybe the shout it down or changed it?
or must I found the window were I can see how much time the round has to make it count?
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

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

Re: Energy of Justice easily earned

#34 Post by lisa » Wed Jan 29, 2014 8:40 pm

It's been a while but i am pretty sure the in game functions don't work if the event info is bugged and you can't see the score on your screen.
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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Energy of Justice easily earned

#35 Post by rock5 » Wed Jan 29, 2014 11:41 pm

Every now and then I think to my self "someone should write a foolproof general purpose userfunction to return the event status". Then every time someone asks questions about fixing their event code we could direct them to the userfunction. I never did it myself because I've never done the events so am unfamiliar with them but there are a lot of working code out there that should be able to be adapted to a userfunction.
  • 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

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

Re: Energy of Justice easily earned

#36 Post by lisa » Thu Jan 30, 2014 12:34 am

I did post some memory stuff a long time ago, but I think it was unstable for some users, can't remember now.
I did have the score and such straight from memory and it worked regardless of if the screen was bugged or not, I think, been a while since I did it.

Did some searching and people said the memory reads failed if event stuff was bugged on screen aswell, so yeah no joy there anyway.
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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Energy of Justice easily earned

#37 Post by rock5 » Thu Jan 30, 2014 2:23 am

A reliable userfunction would have to rely on the alert messages.

You know, seeing as the igf remembers the messages all it would have to do is get the last start and end message and see which was the latest to know if it's still in the event or not. Of course it would have to deal with if there is no messages, such as when you just start the game or you just entered the region with the event.
  • 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

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Energy of Justice easily earned

#38 Post by noobbotter » Thu Jan 30, 2014 10:21 am

While this doesn't address the issue of finding out if the event is currently underway, I've found this to be very reliable in detecting the start and end of the event. This is basically a very stripped down version of what I use. Now for the actual code of accepting, turning in, and deleting the specific quests, I have all that in a macro so once the event starts, all I do is repeatedly press my macro key which is what this script will do.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
	
		
	function waitevent() <!-- this will wait for event start message. Works every time regardless of display -->
		local gomsg = getTEXT("SC_ZONE_PE_3TH_ST1START")
		print("Wait for event start...\n") -- wait here
		repeat
			yrest(500)
		until getLastWarning("|cffffff80"..gomsg.."|r", 30)
		starttime = os.time()
		print("Event has started...\n")
	end
	
	function EOJCrysalia()
		keyboardPress( key.VK_I ) <!-- Presses the i key which is where my macro is for this event -->
		yrest(100)
	end   
	
	function main()		<!-- at Papp Hesof -->
		roundno = roundno + 1 <!-- increment round number - just for informational purposes-->
		cprintf(cli.red,"\nRound %s.\n",roundno)
		local eojs = getCurrency("eoj") <!-- reset number of eoj's in inventory for start of round -->
		cprintf(cli.green,"Starting EOJs for round %s: %s.\n",roundno, eojs)
		player:target_Object(120273) <!-- ensures my player targets Papp before round start -->
		waitevent() <!-- this calls the function to wait for round start -->
		repeat
			EOJCrysalia()
			<!-- To detect end of event, I look for a change in the number of eoj's that I have. -->
			<!-- Even if I'm way low on the list of contributors, I'll still earn at least 1 eoj.-->
		until getCurrency("eoj") > eojs
		<!-- Next 4 lines is just to print a summary of the round. -->
		local roundtime = (os.time()-starttime)/60
		local neweoj = getCurrency("eoj")
		local gained = neweoj-eojs
		cprintf(cli.red,"EOJ Gained this round: %s.\t\tCurrent Energy of Justice: %s.\t\tRound took %0.1f minutes\n",gained, neweoj,roundtime)
	end
	
	starttime = os.time() 
	roundno = 0
</onload>
	<!-- # 1 --><waypoint x="-9362" z="-18321" y="952" tag="eoj">
		<!-- at Papp Hesof -->
		main()
	</waypoint>
	<!-- # 2 --><waypoint x="-9362" z="-18321" y="952"> 
		<!-- at this point you could have your character go somewhere else, go sit down, -->
		<!-- or whatever for a certain period, until just prior to next round. -->
		__WPL:setWaypointIndex(1)
	</waypoint>
</waypoints>
I use the event message for start of round, which seems to work every time regardless of if the screen display is bugged or not.

To detect the end of the round, I look for a change in the number of Energy of Justice in my inventory. Works every time.

**EDIT: I had a typo on a line so I corrected it in the code above.

*** EDIT 2: To note, if the round takes less than 30 seconds (which happened to me tonight) you might want to reduce the number of seconds it looks back for the round start message. In the line

Code: Select all

until getLastWarning("|cffffff80"..gomsg.."|r", 30)
change the 30 to a lower number like 15 or so.
Last edited by noobbotter on Thu Jan 30, 2014 11:17 pm, edited 2 times in total.

wiedzmin97
Posts: 44
Joined: Wed Jul 03, 2013 1:37 pm

Re: Energy of Justice easily earned

#39 Post by wiedzmin97 » Thu Jan 30, 2014 12:48 pm

Code: Select all

Moving to waypoint #1, (-9362, -18321)
The game client did not crash.
6:47pm - [string "..."]:20: attempt to perform arithmetic on global 'roundno' (a
 nil value)
i have this error when i starting bot wp ;/

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Energy of Justice easily earned

#40 Post by noobbotter » Thu Jan 30, 2014 12:59 pm

My bad, I had a spelling error when I was removing and cleaning up my code.

On the last line of the <onload> section, this line:

Code: Select all

roundo = 0
should be

Code: Select all

roundno = 0

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests