Rock5's Ancient Treasure

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
AngelDrago
Posts: 133
Joined: Fri May 06, 2011 10:39 am

Re: Rock5's Ancient Treasure

#141 Post by AngelDrago » Mon Nov 05, 2012 4:29 am

AlterEgo95 wrote:This is an error that exists since the runes of magic beta. It tells the server, that you are somewhere you normally can't be. I get this error too, always while teleporting up after harvesting the first fragment. But you get this error at many places in the open world so I would say - No. Your account won't be banned. Gameforge gets this message million times per day, so it's harmless.
Thx for the input... got me scared their for a minute...LOL

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: Rock5's Ancient Treasure

#142 Post by kenzu38 » Sun Dec 02, 2012 9:07 am

Hi rock5, first of all, thanks for making this script. It's working very good for me.

I just have a request though, since I'm not good with coding. Can you please make a script for AT that starts with Kat Rojo in Varanas? This is the guy that teleports you directly to Ange Rasa.

Thanks.

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

Re: Rock5's Ancient Treasure

#143 Post by rock5 » Sun Dec 02, 2012 10:02 am

Here's mine that goes from Malatina to AT. Ignore the stuff in waypoint #4. It's out of date so I commented it out. This file was for my personal use so it's in English, translate if necessary.
Attachments
toat.xml
(1.74 KiB) Downloaded 188 times
  • 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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: Rock5's Ancient Treasure

#144 Post by Rickster » Thu Dec 06, 2012 9:28 am

Sometimes, when a char stucks in a wall or something and does not get through AT in time, it is portet out. But the script does not recognise this and uses teleport to jump the char all over the map until it dies.
When dead, it sometimes keeps hanging in the air, other times it is brought back to the resurection point.

In all scenarios, when not getting through AT in time, the WP file does not continue. It does not load the return path in case of a death, nor loads the next wp file when portet out.

Is there a chance to include an exception for not get ready in time?

Thanks
Ric

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

Re: Rock5's Ancient Treasure

#145 Post by rock5 » Thu Dec 06, 2012 10:22 am

It's a bit difficult to handle problems like that all the time. If I put a check for zone after every function it could still go wrong if it gets stuck somewhere in the functions. Ideally you would have to have checks in all the functions to exit the function if it zoned and a check at each spot the function is called to see if it should continue or do something else. It's a lot of work for a script that works most of the time as far as I know. Even if we do all this work it could still get stuck in some unexpected place or in one of the bots own functions. In the end I think it's not worth it.
  • 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
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Rock5's Ancient Treasure

#146 Post by grande » Thu Dec 06, 2012 6:45 pm

I can get pretty annoyed by what Rickster is talking about but I also agree it's a bit of work to get it straightened out. IMO, it will eventually bug me to the point that I do something about it... I'd say that will be in the next month or so. That's just how I roll... slowly.

Reason it's so annoying is a lot of lost time which can really add up, especially when the error occurs early on in the 18 characters cycling through the events.

My thoughts to implement the check would be to do something like in the COO 20-40 script but instead of checking if dailies and then doing some action it would check the zone. And rather than a check at various waypoints it would be nice to do on a timed basis, like every 30 - 60 seconds which seems like something that could be implemented in the onload section but I'm not sure.

So ideally, I could do a check zone every 30 seconds and if the zone is wrong I could just either load the next WP... OR transport rune back to a neutral/starting point and then load the next character in line... OR.. do some other code.

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

Re: Rock5's Ancient Treasure

#147 Post by rock5 » Thu Dec 06, 2012 11:44 pm

The problem is, just because you load another waypoint, doesn't mean it will stop executing the code it is currently doing. It will only start using the loaded waypoint once it's finished it's current code, in this case the whole onload of AT. So you still need multiple checks throughout AT that exit the onload if necessary.
  • 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
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: Rock5's Ancient Treasure

#148 Post by Ego95 » Fri Dec 07, 2012 1:39 am

when entering the chest room, the chars turn left while they are in the doorway to reach a chest and get stuck in the left door.
I don't know how that can possibly happen. If it was "moving" there with moveTo, I could understand as moveTo is not very accurate. But it teleports there so it teleports to the EXACT correct location to turn to collecting the mats. I've run it through over a hundred times with no issue. Let me know if it is an ongoing problem or was a "one-off".
Happened to me a few times too. But it seems like it teleports into the chest room, then wants to open a chest but gets teleported back in front of the door.
Also I notice that nearly 30% the bot gets stuck because he can't get under the floor again after picking up a candle. Isn't it possible to let the bot port a few coordinates more under the chest or maybe let the bot walk on the ground while moving instead of flying?

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

Re: Rock5's Ancient Treasure

#149 Post by rock5 » Fri Dec 07, 2012 2:52 am

AlterEgo95 wrote:Happened to me a few times too. But it seems like it teleports into the chest room, then wants to open a chest but gets teleported back in front of the door.
I guess it's possible you are experiencing a pullback. I guess in some spots I can make it do a moveTo if the teleport fails. It might slow it down a bit.
AlterEgo95 wrote:Also I notice that nearly 30% the bot gets stuck because he can't get under the floor again after picking up a candle. Isn't it possible to let the bot port a few coordinates more under the chest or maybe let the bot walk on the ground while moving instead of flying?
I don't understand how that happens. It's not supposed to go through the floor. Are you using the SlowTeleports option? That was supposed to fix that issue.
  • 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

dr-nuker
Posts: 145
Joined: Sun Oct 09, 2011 7:33 am

Re: Rock5's Ancient Treasure

#150 Post by dr-nuker » Fri Dec 07, 2012 9:03 am

rock5 wrote:
AlterEgo95 wrote:Happened to me a few times too. But it seems like it teleports into the chest room, then wants to open a chest but gets teleported back in front of the door.
I guess it's possible you are experiencing a pullback. I guess in some spots I can make it do a moveTo if the teleport fails. It might slow it down a bit.
AlterEgo95 wrote:Also I notice that nearly 30% the bot gets stuck because he can't get under the floor again after picking up a candle. Isn't it possible to let the bot port a few coordinates more under the chest or maybe let the bot walk on the ground while moving instead of flying?
I don't understand how that happens. It's not supposed to go through the floor. Are you using the SlowTeleports option? That was supposed to fix that issue.
I use the slowteleport option but have the same probleme from time to time.

So the bot collects mostly 4 ancient tables and then wants to light a candle or grab number 5 but does not get back in the underground. I dont know what's wrong there but that way i died twice already and was lucky 3 times that i walked by and did the rest manually instead of dieing or trying to swim through a wall...

On an slower computer that problem did not occure since the bot was not getting over the ground but doing all actions from underground...

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

Re: Rock5's Ancient Treasure

#151 Post by rock5 » Fri Dec 07, 2012 9:35 am

Can someone explain how it get above the ground because I've never seen it happen. Does it teleport to the right spot but then move when it clicks the candle? Does it teleport to the wrong spot? Can someone explain exactly what it does and when exactly, in the process of clicking the candles, does it go wrong.
  • 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
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Rock5's Ancient Treasure

#152 Post by grande » Fri Dec 07, 2012 11:32 am

rock5 wrote:The problem is, just because you load another waypoint, doesn't mean it will stop executing the code it is currently doing. It will only start using the loaded waypoint once it's finished it's current code, in this case the whole onload of AT. So you still need multiple checks throughout AT that exit the onload if necessary.
So a repeating function couldn't be set in the onload? Such as:

Code: Select all

registerTimer("myTimer", 30000, zone_check);
-- zone_check() will now automatically be called every 30 seconds.

function zone_check()
  if RoMScript("GetZoneID()") == 128 then   
         loadPaths("wp1.xml"); 
    end 
 
And I'm still a beginnger here so I'm sure the syntax above is foul. Please let me know.

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Rock5's Ancient Treasure

#153 Post by grande » Fri Dec 07, 2012 11:44 am

rock5 wrote:Can someone explain how it get above the ground because I've never seen it happen. Does it teleport to the right spot but then move when it clicks the candle? Does it teleport to the wrong spot? Can someone explain exactly what it does and when exactly, in the process of clicking the candles, does it go wrong.
Not exactly sure but I think I recall seeing it get stuck while trying to transport or maybe transporting to the wrong spot. I think there are two different scenarios: 1) stuck and time runs out but the bot continues attempting to port and 2) What appears to be a glitch before the timer expires and then the character continues attempting to port to various locations and never making it.

Off-topic but along these lines is Malateenass Surviveal. What can happen there for non-AOE users is sometimes the mobs end up under the tiles and untargettable so time will expire and the character will continue to hover or port around Varanas.

Either place would be good to have a periodic/time-based zone check and then some action to follow.

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

Re: Rock5's Ancient Treasure

#154 Post by rock5 » Fri Dec 07, 2012 1:01 pm

grande wrote:So a repeating function couldn't be set in the onload?
Sometimes yes and sometimes no. It's hard to explain. With normal waypoints the answer is usually yes. When that event loads the new file what it does is load the file into __WPL. If the current waypoint is in the middle of executing some code at a waypoint or even the onload it will finish executing before continuing with the new waypoints. Complications arise when you have waypoints that never leave the onload such as AT. Before it can continue with waypoints in a new file it has to finish the onload of the previous file. Another complication is that when you load a new file it immediately runs the onload. So that means it's possible to run multiple characters through AT one after the other even if the code doesn't leave the onload but it means they become nested and each onload is left hanging waiting for the loadPaths to return which it never does.

Like I said, hard to explain. Another way of looking at it is to note that loadPaths doesn't return to the code that called it until the onload of the next file has finished executing.

Hm... Maybe this is something that should be fixed. Ideally loadPaths should just load the waypoint file and then return. When the current code is finished it should run the onload of that new file. I think I'll bring it up with the other devs.
  • 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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: Rock5's Ancient Treasure

#155 Post by Rickster » Fri Dec 07, 2012 1:57 pm

rock5 wrote:It's a bit difficult to handle problems like that all the time. If I put a check for zone after every function it could still go wrong if it gets stuck somewhere in the functions. [..] In the end I think it's not worth it.
yap, most of the time it works and it only would have been a benefit, but its not realy necessary.

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Rock5's Ancient Treasure

#156 Post by grande » Fri Dec 07, 2012 2:29 pm

Rickster wrote:
rock5 wrote:It's a bit difficult to handle problems like that all the time. If I put a check for zone after every function it could still go wrong if it gets stuck somewhere in the functions. [..] In the end I think it's not worth it.
yap, most of the time it works and it only would have been a benefit, but its not realy necessary.
Actually, you are correct for yourself but wrong for some. For me, it would be extremely useful to have this resolved because it occurs enough to cause significant delays in other things.

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Rock5's Ancient Treasure

#157 Post by grande » Fri Dec 07, 2012 2:36 pm

rock5 wrote:
grande wrote:So a repeating function couldn't be set in the onload?
Sometimes yes and sometimes no. It's hard to explain. With normal waypoints the answer is usually yes. When that event loads the new file what it does is load the file into __WPL. If the current waypoint is in the middle of executing some code at a waypoint or even the onload it will finish executing before continuing with the new waypoints. Complications arise when you have waypoints that never leave the onload such as AT. Before it can continue with waypoints in a new file it has to finish the onload of the previous file. Another complication is that when you load a new file it immediately runs the onload. So that means it's possible to run multiple characters through AT one after the other even if the code doesn't leave the onload but it means they become nested and each onload is left hanging waiting for the loadPaths to return which it never does.

Like I said, hard to explain. Another way of looking at it is to note that loadPaths doesn't return to the code that called it until the onload of the next file has finished executing.

Hm... Maybe this is something that should be fixed. Ideally loadPaths should just load the waypoint file and then return. When the current code is finished it should run the onload of that new file. I think I'll bring it up with the other devs.
I put this in my onload and it operated just as you described:

Code: Select all

function zone_check()
  if RoMScript("GetZoneID()") ~= 355 then   
         RoMScript("TB_Teleport(0,1)")
	 waitForLoadingScreen();
	 ChangeChar();
	 loadPaths("COOtoShellGames.xml");
	 end 
end
it doesn't actually loadPaths it just keeps cycling to the next character. So now I'm thinking there should be some "break" piece that might make it less stubborn?

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

Re: Rock5's Ancient Treasure

#158 Post by rock5 » Fri Dec 07, 2012 9:26 pm

grande wrote:it doesn't actually loadPaths it just keeps cycling to the next character. So now I'm thinking there should be some "break" piece that might make it less stubborn?
That's just the function. Where did you call it? Usually where you execute the code you can use a 'return' to exit and let the next file run. But you would need some way to check it it did the function. So if you change your function to return true if it loads the file then you could do

Code: Select all

if zone_check() == true then
    return
end
  • 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
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Rock5's Ancient Treasure

#159 Post by grande » Fri Dec 07, 2012 10:46 pm

rock5 wrote:
grande wrote:it doesn't actually loadPaths it just keeps cycling to the next character. So now I'm thinking there should be some "break" piece that might make it less stubborn?
That's just the function. Where did you call it? Usually where you execute the code you can use a 'return' to exit and let the next file run. But you would need some way to check it it did the function. So if you change your function to return true if it loads the file then you could do

Code: Select all

if zone_check() == true then
    return
end
I originally called it all from the onload section. Since then, I've moved on to placing it in various functions. So I leave the zone_check function at the top and then insert registertimers in the various functions. IDK,that's what seemed to work in malatina's.. lol

So I read a little before this about the "return" operation and it didn't really grab my attention. I'm still scratching my head looking at it now. Trying to digest this part of what you said above:
So if you change your function to return true if it loads the file then you could do
Since it seems it needs to be active in each function then I would leave the zone_check function at the top of the /onload and then for each function where i want the zone_check to operate I would do:

Code: Select all

local function sortpath(initialtable)
registerTimer("myTimer", 20000, zone_check); -- zone_check() will now automatically be called every 20 seconds.
if zone_check() == true then
    return
end
		player:update()
		local returnedtable = {
			{X=player.X,Z=player.Z}, -- Where yuo're starting from
			{X=3838,Z=3994}, -- Where you're ending. Where it waits for mobs to despawn.
		}

		for __, obj in pairs (initialtable) do
			local bestintertplace
			local addeddist

			-- Find best place to insert
			for place = 2,#returnedtable do
				local currdist = distance(returnedtable[place-1].X,returnedtable[place-1].Z,returnedtable[place].X,returnedtable[place].Z)
				local newdist = distance(returnedtable[place-1].X,returnedtable[place-1].Z,obj.X,obj.Z) +
								 distance(obj.X,obj.Z,returnedtable[place].X,returnedtable[place].Z)
				if addeddist then
					if addeddist > newdist - currdist then
						bestintertplace = place
						addeddist = newdist - currdist
					end
				else
					bestintertplace = place
					addeddist = newdist - currdist
				end
			end

			-- Intert into new location
			table.insert(returnedtable,bestintertplace,obj)
		end

		-- remove first and last to return only initial points
		table.remove(returnedtable,1)
		table.remove(returnedtable,#returnedtable)

		return returnedtable
	end


This is what I have at the top of the AT onload:

Code: Select all

function zone_check()
  local getzone = RoMScript("GetZoneID()")
  if getzone ~= 355 then
	 __WPL:load(getExecutionPath() .. "/waypoints/port1.xml"); -- loads your alive waypoints__WPL:load("port1");
	end
end
or would the 'return' operation go in the onload piece, that sounds better?

Code: Select all


function zone_check()
  local getzone = RoMScript("GetZoneID()")
  if getzone ~= 355 then
	 __WPL:load(getExecutionPath() .. "/waypoints/port1.xml"); -- loads your alive waypoints__WPL:load("port1");
	end
  if zone_check() == true then
       return
       end
end


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

Re: Rock5's Ancient Treasure

#160 Post by rock5 » Sat Dec 08, 2012 12:53 am

Remember that because AT in all in the onload, any file loaded will have to wait until the AT code has finished.

So the idea is that you want each of the main functions, especially those with loops you can get stuck in, to skip what it is doing end exit if you are not in the zone so something like

Code: Select all

function First2Fragments()
   if RoMScript("GetZoneID()") ~= 355 then
       return
   end
So when it executes the functions eg.

Code: Select all

		getunder()
		getcandles()
		getchests()
it will skip those functions and get to the part where it does the relog function and then ends the onload which allows the next file to run.

Using a timer wont work in this case because all it does is load the next file. It doesn't stop the current code execution.
  • 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: No registered users and 11 guests