Andor Trainig Range

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Andor Trainig Range

#61 Post by lisa » Mon Nov 12, 2012 9:06 pm

I'm still running the exact same scripts with no crashes

*shrug*
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

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Andor Trainig Range

#62 Post by Cindy » Tue Nov 13, 2012 6:10 pm

Note how I added a line of code to print the objSize (should be objlistSize). See attached screenshot for the failure. The number actually went up even though things were destroyed.

Code: Select all

		local function one(ID)
		   print("targeting: "..ID)
		   local objectList = CObjectList();
		   objectList:update();
		   local objSize = objectList:size()
		   for i = 0,objSize do 
			   printf("List size:"..objSize)
			  obj = objectList:getObject(i)

			  if (obj.Id == ID or ID == 106885) and checkclicked(obj.Address) then
				 player:target(obj)
				 RoMScript("UseExtraAction(1)")
				 yrest(25)
				 player:target(obj)
				 RoMScript("UseExtraAction(1)")
				 if ID == 106883 then
					yrest(25)
					player:target(obj)
					RoMScript("UseExtraAction(1)")   
				 end
				 yrest(100)
			  end
		   end
		end
Attachments
Andor.jpg

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Andor Trainig Range

#63 Post by Cindy » Tue Nov 13, 2012 6:22 pm

Is it possible to do reverse loop in lua?

for i = objSize, 0 do
...
end


Or... what else is in the object list? I was hoping just the mobs to kill.. in that case couldnt we do a

while objsize ~= 0 do
--code to kill
--code to refresh objsize
end

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

Re: Andor Trainig Range

#64 Post by lisa » Tue Nov 13, 2012 6:32 pm

objectlist is every "object"
This includes, NPC's, characters, candles, doors, portals, etc, etc, etc

Seeing the list size get bigger doesn't shock me, would need to do prints of each ID, name, coords to work out why the list gets bigger though.

It might be that the fast turtle that gives you skills is loaded at some stage but stays invisible.
It might be that an "object" appears after each wave, for what ever reason.

Things like that are good to save to a log file so you can have a good look at them later.

You could add the entire object list to a table and then re-sort the table in order of ID (for easy reading) and then save it to a log file.
That might tell you why the extra objects after each wave.
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

Tamyra
Posts: 133
Joined: Tue Feb 01, 2011 6:09 pm

Re: Andor Trainig Range

#65 Post by Tamyra » Tue Nov 13, 2012 6:56 pm

Uhhh, okay I got it to kinda work....game crashed this time. What part of the waypoint determines speed? I get the feeling the bot is casting WAY too fast, faster than necessary.

Edit: Also is there a way to have it cast on each target based on primary importance, or based on target movement speed, like if the object is moving faster towards the line than others? Like killing all the newts first, then the turtles, then the hares then the armored bug?
Last edited by Tamyra on Tue Nov 13, 2012 7:01 pm, edited 1 time in total.

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

Re: Andor Trainig Range

#66 Post by lisa » Tue Nov 13, 2012 7:00 pm

all of the skill casting is done here

Code: Select all

						if (obj.Id == ID or ID == 106885) and checkclicked(obj.Address) then
							player:target(obj)
							RoMScript("UseExtraAction(1)")
							yrest(10)
							player:target(obj)
							RoMScript("UseExtraAction(1)")
							if ID == 106883 then
								yrest(10)
								player:target(obj)
								RoMScript("UseExtraAction(1)")	
							end
							yrest(100)
						end
to slow down the skill casting just increase the value of the yrest which are in miliseconds, so 1000 would be 1 second.
there are 3 yrest in total
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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Andor Trainig Range

#67 Post by lisa » Tue Nov 13, 2012 7:06 pm

Tamyra wrote:Edit: Also is there a way to have it cast on each target based on primary importance, or based on target movement speed, like if the object is moving faster towards the line than others? Like killing all the newts first, then the turtles, then the hares then the armored bug?
this part determines the order things are killed.

Code: Select all

						one(106882)
						one(106882)
						one(106881)
						one(106883)
						one(106884)	
determining the speed of each mob would take to long and you could have clicked 3 or 4 of them before you even worked out which ones are moving faster.
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

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Andor Trainig Range

#68 Post by Cindy » Tue Nov 13, 2012 7:25 pm

lisa wrote:Ok this function just scored 1900 and got to round 13, I just call it when it says go.

Code: Select all

function tort()
	
	local function one(ID)
		local objectList = CObjectList();
		objectList:update();
		local objSize = objectList:size()
		for i = 0,objSize do 
			obj = objectList:getObject(i)
			if obj.Id == ID or ID == 106885 then
				print(obj.Name)
				player:target(obj)
				RoMScript("UseExtraAction(1)")
				yrest(10)
				player:target(obj)
				RoMScript("UseExtraAction(1)")
				if ID == 106883 then
					yrest(10)
					player:target(obj)
					RoMScript("UseExtraAction(1)")	
				end
				yrest(20)
			end
		end
	end
	one(106882)
	one(106882)	
	one(106881)
	one(106883)
	one(106884)	
end

It does do some "casts" to turtles that have already dissappeared but it is fast enough to just keep up. There is probably an indicator that the "mob" has already been cast on and is in the process of dissappearing.
Lisa, why are you attacking 106882 twice?

(This is why coding standards ask for meaningful names :)

Code: Select all

        tortoiseID = 106881;
	newtID = 106882;
	armoredbugID = 106883;
	rabbitID = 106884;
	ammunitionturtleID = 106885;

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

Re: Andor Trainig Range

#69 Post by lisa » Tue Nov 13, 2012 7:32 pm

Because when I set up a WP it would sometimes try to attack before the blue swirly veil would be out of the way, can't kill them while it is active.

It is also a double check to make sure the newts are all dead, if they are all dead when the second "one" is called it literally takes a few milliseconds, so no great waste of time.
Could probably do all of them twice I guess.

Also sometimes it takes a couple of attacks to kill them, I have had it when manually playing I have had to attack the same mob 4 or 5 times before it died.
This is why coding standards ask for meaningful names
Original code posted had them all listed, just got deleted at some stage I guess.
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

Tamyra
Posts: 133
Joined: Tue Feb 01, 2011 6:09 pm

Re: Andor Trainig Range

#70 Post by Tamyra » Tue Nov 13, 2012 7:41 pm

So far so good with slowing it down, but now I've only scored 900-ish points. Still got 500 guild runes, or the equivalent....so next question would be what's the minimum score required to get 500 of anything good? Also is it random that the rubies are gained or do you have to get a specific score to get those?

dejfit
Posts: 23
Joined: Wed Oct 05, 2011 6:25 am

Re: Andor Trainig Range

#71 Post by dejfit » Tue Nov 13, 2012 7:48 pm

I run it on 3 acc and rewards look totally random. A set score to 3,5k and only difference is that i sometimes get 2 packages as a reword and sometimes 3, but don't know why...

Tamyra
Posts: 133
Joined: Tue Feb 01, 2011 6:09 pm

Re: Andor Trainig Range

#72 Post by Tamyra » Tue Nov 13, 2012 8:01 pm

Okay, I just ran it on another character after adjusting the speed, and the game crashed mid way through round 3, dont think it broke more than 500 points, maybe not even 400, I waited to close the game until after I thought the remaining mobs in that wave would have crossed the line and then logged back in. I got 5x Teardrop Ruby aka 500 rubies when I logged in. So now the question is, when you guys get more than one package, do you mean you can get more than 5 of any one item? Or 5 of one and 5 of another?

dejfit
Posts: 23
Joined: Wed Oct 05, 2011 6:25 am

Re: Andor Trainig Range

#73 Post by dejfit » Tue Nov 13, 2012 8:08 pm

You can get 1 x 5 or 2 x 5 or 3 x 5. The best is when you get 3 x 5 Teardrop Ruby but its extremely rare. :)

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Andor Trainig Range

#74 Post by Cindy » Tue Nov 13, 2012 8:45 pm

lisa wrote:Because when I set up a WP it would sometimes try to attack before the blue swirly veil would be out of the way, can't kill them while it is active.

It is also a double check to make sure the newts are all dead, if they are all dead when the second "one" is called it literally takes a few milliseconds, so no great waste of time.
Could probably do all of them twice I guess.

Also sometimes it takes a couple of attacks to kill them, I have had it when manually playing I have had to attack the same mob 4 or 5 times before it died.
This is why coding standards ask for meaningful names
Original code posted had them all listed, just got deleted at some stage I guess.
ah got it... i noticed the one ending in 5 is missing, is that by design?

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

Re: Andor Trainig Range

#75 Post by lisa » Tue Nov 13, 2012 9:51 pm

Cindy wrote: ah got it... i noticed the one ending in 5 is missing, is that by design?

Code: Select all

 if obj.Id == ID or ID == 106885 then
It checks for 5 every time, so it "should" click the one that gives you a buff every time, I've never seen it actually do it while botting though *shrug*
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

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Andor Trainig Range

#76 Post by ZZZZZ » Tue Nov 13, 2012 10:02 pm

I got 46 points on an alt earlier and got the best reward i have seen. Got 3 certs and 500 rubies....so rewards are definitely random.

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

Re: Andor Trainig Range

#77 Post by lisa » Tue Nov 13, 2012 10:10 pm

ZZZZZ wrote:I got 46 points on an alt earlier and got the best reward i have seen. Got 3 certs and 500 rubies....so rewards are definitely random.
yup
lisa wrote:Ok this function easily scores 4000+ and you don't actually get any exciting items, loot seems same as scoring 1800ish.
Seems very random to me, you could probably score 500 and still get same loot as scoring 4000.
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

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Andor Trainig Range

#78 Post by Cindy » Thu Nov 15, 2012 10:27 am

Progress: I made one crash go away, the stupid printf after the event with buffed.Level. I will test when I get a chance with a character that hasn't done it yet, and see if I can figure out what else is crashing it...

Codemod:

Code: Select all

<!-- #  2 --><waypoint x="53" z="411" y="963">
         repeat
            tort()
			printf("Updating...\n")
            player:update()
            buffed = player:getBuff(622402)
			local lvl = 1
			if (buffed == nil) then
				printf(" Not Buffed ?!?!? \n")
				lvl = 3555
				player:sleep()
			else
				local lvl = buffed.Level
			end
			printf("Level: "..lvl.."\n")
            yrest(250)
         until (not RoMScript("TimeKeeperFrame:IsVisible()")) or (buffed and lvl >= 3123)
         print("Event finished, end score was "..lvl)
</waypoint>

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Andor Trainig Range

#79 Post by Cindy » Thu Nov 15, 2012 1:17 pm

So I did this:

Code: Select all

		local function one(ID)
		   print("targeting: "..ID)
		   local objectList = CObjectList();
		   objectList:update();
		   local objSize = objectList:size()
		   for i = 0,objSize do 
			   --printf("List size:"..objSize)
			  obj = objectList:getObject(i)
			  if (obj.Id ~= 0 and obj.Type ~= -1) then			  
				  if (obj.Id == ID or ID == 106885) and checkclicked(obj.Address) then
					 player:target(obj)
					 printf(obj.Id.." Obj: "..obj.Name.."\n")
					 yrest(100)
					 if obj.Attackable then	 RoMScript("UseExtraAction(1)") end
					 yrest(100)
					 player:target(obj)
					 yrest(100)
					 if obj.Attackable then	 RoMScript("UseExtraAction(1)") end
					 if ID == 106883 then
						yrest(100)
						player:target(obj)
						yrest(100)
						if obj.Attackable then	 RoMScript("UseExtraAction(1)") end
					 end
					 yrest(100)
				  end
			  end
		   end
		end
And it got horribly slow, its printing still, 5 min after the game crashed after I tried to manually play it for a while.
Attachments
Andor.jpg

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

Re: Andor Trainig Range

#80 Post by rock5 » Thu Nov 15, 2012 1:40 pm

I think it was mentioned previously that some of them explode or something and take out other mobs? If so, some of the mobs may no longer exist as you are going through the list. Try adding an "obj:update()" after "obj = objectList:getObject(i)". If the object no longer exists then the update will reset the id to 0 so it will be skipped. I think I mentioned this already.
  • 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

Post Reply

Who is online

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