Ancient Treasures waypoint

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.
Post Reply
Message
Author
kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Ancient Treasures waypoint

#1 Post by kanta » Fri Dec 23, 2011 6:41 pm

Updated 01/09/2012 @ 1:56AM (-5 GMT)

Changes in version 0.6
- Adjusted problem waypoint that was reported
- Added invisibility to candle collection code (thanks Lisa)

Changes in version 0.5
- Changed chest collection code so none will be missed now
- Changed candle collection code
- Added 2 suggested waypoints (thanks kkulesza)
- Added Stone totem quest pickup and turn in

Changes in version 0.4
- Changed waypoint file name to make it more compatible with path: commandline
- Added option to gather the mount chests or not
- Added option to collect the totems or not
- Added option to stop bot after chest collection or to exit mini game
- Added Rock5's relog options
- Changed totem/candle gather code to make it more reliable
- Doubled wait time on chest collection to account for system lag

This is what it does:
1) Collects all Ancient Stone Totems
2) Completes within time limit for bonus chests
3) Collects all chests in center room

What it doesn't do:
1) Does not work with low level characters

It is not suggested to use this on low level characters, they will get caught by the mobs. It relies on a small aggro radius as it just flies near the ceiling.

The options I mentioned in the version notes are near the top of the waypoint file:
getcmount = 0 -- "0" do not collect mount chests "1" collect mount chests
gettotems = 1 -- "0" do not collect totems "1" collect totems
-- (don't know why people would want this but adding the option anyway)
exitat = 1 -- Until a check for all chests are opened use this option to set if
-- you want the bot to exit the mini game "0" do not exit "1" exit
Other files needed:
Rock5's teleport: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2721
Swim hack: http://www.solarstrike.net/phpBB3/viewt ... 410#p24410

If using relog function:
http://www.solarstrike.net/phpBB3/viewtopic.php?p=10350

Make sure to download the model file. Unpack it into your "<DRIVE>:\Program Files\Runes of Magic\" folder.
Attachments
mini_treasure.xml
Main waypoint file version 0.6
(15.6 KiB) Downloaded 476 times
mini_treasure.xml
Main waypoint file version 0.5
(15.33 KiB) Downloaded 217 times
mini_treasure.xml
Main waypoint file version 0.4
(16.5 KiB) Downloaded 288 times
at_main 1.xml
Main waypoint file version 0.3
(13.76 KiB) Downloaded 262 times
at_model.zip
Model file to remove blue portals in Ancient Treasures
(818 Bytes) Downloaded 414 times
Last edited by kanta on Mon Jan 09, 2012 1:56 am, edited 16 times in total.
Scout/Knight/Rogue 70/66/66

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

Re: Ancient Treasures waypoint

#2 Post by rock5 » Sat Dec 24, 2011 12:50 am

Don't know why but ChoiceOption works for me on Ange Rasa.
kanta wrote:if settings.profile.options.DISMOUNT == false and zoneid == 355 then return false end --- NEW LINE
Doesn't this effectively disable all skills? You could just disable them all in the waypoint onload. That way a user doesn't need to set anything up.

Code: Select all

for k,v in pairs(settings.profile.skills) do
      v.AutoUse = false
end
You don't need to set

Code: Select all

__WPL:setForcedWaypointType("TRAVEL")
if you are never going to change it. Just set type="TRAVEL".

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
Ok now to try it. I'm starting with my level 57 p/m.

Epic fail.
1. It tried to swim over a doorway that was not possible to swim over. Are we supposed to replace some model files to get rid of the doors?
2. It seemed to continually try to teleport through walls. Is that intensional? Do the doorways move?
3. When it aggroed the mobs it did nothing to deal with it. Maybe you need to check what skills you have and use them.
4. It swims down to the totems, can't you have it teleport straight down?
  • 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

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Ancient Treasures waypoint

#3 Post by kanta » Sat Dec 24, 2011 1:58 am

rock5 wrote:Don't know why but ChoiceOption works for me on Ange Rasa.
No clue why it works for you and not for me. I tried at least a dozen times and it didn't work.
rock5 wrote:
kanta wrote:if settings.profile.options.DISMOUNT == false and zoneid == 355 then return false end --- NEW LINE
Doesn't this effectively disable all skills? You could just disable them all in the waypoint onload. That way a user doesn't need to set anything up.

Code: Select all

for k,v in pairs(settings.profile.skills) do
      v.AutoUse = false
end
I didn't fully know how to use that code. I just tried to use what I could find. I'll change it to your suggestion.
rock5 wrote:You don't need to set

Code: Select all

__WPL:setForcedWaypointType("TRAVEL")
if you are never going to change it. Just set type="TRAVEL".

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
Didn't even think of that. My mind was more on the teleporting issues and basic pathing. Guess I missed some of the more simple things.
rock5 wrote: Epic fail.
1. It tried to swim over a doorway that was not possible to swim over. Are we supposed to replace some model files to get rid of the doors?
2. It seemed to continually try to teleport through walls. Is that intensional? Do the doorways move?
3. When it aggroed the mobs it did nothing to deal with it. Maybe you need to check what skills you have and use them.
4. It swims down to the totems, can't you have it teleport straight down?
Grr... I should know better than to try and post something like this when I'm tired. Ya, I forgot to post the model file that removes the portals. The teleporting through walls thing is part of what I was mentioning in the other thread. I can't figure out why it's trying to do that. As for the totems, I suppose I could change it to teleporting to them. I was trying to limit how much I used teleport as I noticed on my computer that when it is used excessively I begin to get "phantom" positioning. Meaning that I see my character in one location, but the game sees it in another. Like in course of terror where 95% of the moving is teleporting, the mobs will occasionally see me as being somewhere I am not and I have difficulty targeting them. As far as getting aggro from the mobs, I didn't have it happen, I thought I had successfully prevented it. Oh, and just thought of a way I can do much more testing of the teleporting. I'll use the chests in Treasure Trove for testing. Pretty much just a difference of object names.

I won't be able to test any additions or changes till tomorrow.

In case anyone is wondering, I'll explain why I made the initial pathing the way I did. Yes, some of them will probly go right by a candle you need to light. But with an area like this where you have 6 potential starting points, I could think of no other way than to make it so all starting points initially go to a common starting point. From there it goes on to the main path where it gets the totems and candles. I thought it was the simplest solution with the least error margin. I've seen threads where people have gotten close but have not been able to complete AT. I welcome ideas from others. I try to figure these things out on my own, but I'm one person with one way of thinking. Getting different perspectives and different levels of experience with coding is what forums like this are for.
Scout/Knight/Rogue 70/66/66

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Ancient Treasures waypoint

#4 Post by kanta » Sat Dec 24, 2011 5:01 am

Ok, did some testing of the teleport/collect function in Treasure Trove with the chests inside. It seems that the function will find and try to collect any object entered in the code up to approximately a distance of 470 away despite setting harvest and target distance limitations low. Because of this, the bot is trying to move through walls to reach them.

Due to my limited coding knowledge, the only thing I can think to do is add a math calculation to the code somewhere stating that unless the difference between (obj.x, obj.z) minus (player.x, player.z) is less than a certain distance to ignore collection and just proceed to the next waypoint. I just don't know how to input this into the function.
Scout/Knight/Rogue 70/66/66

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

Re: Ancient Treasures waypoint

#5 Post by lisa » Sat Dec 24, 2011 5:58 am

Code: Select all

local dist = distance(obj.X,obj.Z,player.X,player.Z)
if dist > 100 then
-- some fancy ignore code
end
prob better to do a check the other way

Code: Select all

if 100 > dist then
player:target_Object(obj.Id)
end
you get the idea 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

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Ancient Treasures waypoint

#6 Post by kanta » Sat Dec 24, 2011 2:48 pm

Thanks Lisa, I'll add this in and do some more testing.

**EDIT**
Ok, looks like I've got your code working in the function. I ended up with:

Code: Select all

			local cecandle = player:findNearestNameOrId("Elemental Candlestick")
			local dist = distance(cecandle.X,cecandle.Z,player.X,player.Z)
			if cecandle and (100 > dist) then
Scout/Knight/Rogue 70/66/66

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Ancient Treasures waypoint

#7 Post by kanta » Sat Dec 24, 2011 4:45 pm

Updated first post with new waypoint file and information.
Scout/Knight/Rogue 70/66/66

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

Re: Ancient Treasures waypoint

#8 Post by rock5 » Sun Dec 25, 2011 8:54 am

Woot! It worked.

Maybe you should add a version number.

I'd avoid using spaces in the file name. Makes it hard to use the 'path:' commandline option when starting bot.

Missed a chest. It was one of the first types. We really dont want to miss chest. It may have something to do with the time it took to cross the room as it was the first on the other side that was missed.

WARNING! If you have your loot filter set to drop runes of level I, II and III (like I do) then it will drop the nice runes you get. So adjust your loot filter or disable it while running this script.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Ancient Treasures waypoint

#9 Post by rock5 » Sun Dec 25, 2011 10:33 am

Second one kept getting aggro, even when swimming along the roof. Just made it to the treasure room but ran out of time. Character level 57

Third got aggro nearer to the end but I managed to dash for the treasure room then feine death. When the room was clear I collected the chests manually. Character level 52.

2 questions. Are you sure it's going right against the roof? Is it possible to maybe collect some of those other skills? Maybe we could use them to help complete the game.
  • 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

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Ancient Treasures waypoint

#10 Post by kanta » Mon Dec 26, 2011 12:45 am

Could try I guess, I'm just not sure how to call them from the bot. It's definitely as high as it will allow the character to fly. I understand about the chests though, my wife's character missed a couple. There must be some way to double check that all chests have been harvested, like was done in survival. But if I understand correctly that has something to do with checking memory offsets and I don't have the skill to be able to do that. I've gone through the memory tutorials that Lisa has done and it all just baffles me.
Scout/Knight/Rogue 70/66/66

kkulesza
Posts: 150
Joined: Fri May 27, 2011 9:00 pm
Location: Poland

Re: Ancient Treasures waypoint

#11 Post by kkulesza » Mon Dec 26, 2011 9:51 am

I've succeeded with 65lvl p/m.
I had no aggro issues.
collected all chests
collected 4 out of 5 stone tablets (bot was trying to loot a tablet but no castbar appeared)

great job Kanta :)

suggestions:
ther could be some options regarding what you want to collect.
I don't want to collect mount-chests. They are useless to me.


small correction:
this works only for channel 1 :

Code: Select all

if zoneid == 10 then
should be like this:

Code: Select all

if zoneid == 10 or zoneid==1010 then
x --zone id on channel 1
1000+x -- zone id on channel 2
2000+x -- zone id on channel 3

there are 2 channels in sascilia steps

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

Re: Ancient Treasures waypoint

#12 Post by rock5 » Mon Dec 26, 2011 10:27 am

Different servers have different number of channels. Example my server only has 1 channel in all locations.

Anyway I've confirmed this by logging in to my old EU account. I have to say it annoys me that one zone has more than one zone id. That means to get the zone without the channel info we would have to take only the last 3 characters.

Maybe the bot "getZoneId" function should parse the number like that? Maybe change

Code: Select all

return zone
to

Code: Select all

return math.mod(zone,1000)
Edit: In regards to this file, maybe you could use

Code: Select all

if math.mod(zoneid,1000) == 10 then
so it can handle any number of channels.
  • 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

kkulesza
Posts: 150
Joined: Fri May 27, 2011 9:00 pm
Location: Poland

Re: Ancient Treasures waypoint

#13 Post by kkulesza » Mon Dec 26, 2011 12:45 pm

rock5 wrote: In regards to this file, maybe you could use

Code: Select all

if math.mod(zoneid,1000) == 10 then
so it can handle any number of channels.
Yes this is better and universal solution.
Wanted to do this but i didn't know how to call "mod" procedure in Lua :)

kkulesza
Posts: 150
Joined: Fri May 27, 2011 9:00 pm
Location: Poland

WP from Varanas Central to Agne Rasa

#14 Post by kkulesza » Mon Dec 26, 2011 12:49 pm

Did this wp to run directly from malatina minigame 2 Agne Rasa.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="4993" z="-1889" y="103">	</waypoint>
	<!-- #  2 --><waypoint x="5091" z="-2046" y="103">	</waypoint>
	<!-- #  3 --><waypoint x="5194" z="-2198" y="103">	</waypoint>
	<!-- #  4 --><waypoint x="5246" z="-2222" y="103">
		player:target_NPC("Kat Rojo"); yrest(1111);
		sendMacro("OnClick_QuestListButton(1, 1)"); yrest(1111);
		sendMacro("AcceptQuest()"); yrest(1111);
		
		player:target_NPC("Kat Rojo"); yrest(1111);
		sendMacro("ChoiceOption(2);");
		waitForLoadingScreen();
		
		player:target_NPC("Ange Rasa"); yrest(1111);
		sendMacro("OnClick_QuestListButton(3, 1)"); yrest(1111);
		sendMacro("CompleteQuest()"); yrest(1111);
		loadPaths("at_main 1");
	</waypoint>
</waypoints>

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Ancient Treasures waypoint

#15 Post by kanta » Mon Dec 26, 2011 3:21 pm

I'll add in the zone code and try to figure out how to add in the options. Maybe even have it take/turn in the totem quest also.

As for the problem of some chests not getting looted, there's only 2 options I can think of. First is to have it repeat the code. Wastes a little time but it would most likely prevent chests from being missed. The second option is to add the memory check to see if a chest has been looted. This option I will need help with because the whole memory situation is beyond me. What I mean with this is like what was done for the Survival waypoint file:

Code: Select all

--=== look for indicator that the chest has loot ===--
function clickchest(address)
	local chest = memoryReadRepeat("byte", getProc(), address + 0x2F0) or 0
	if chest ~= 0 then
		return true
	else
		return false
	end
end	
If someone could get this offset for me, I'll add it in. Might even be 3 different offsets since there are 3 chest types. I don't know how that all works.
Scout/Knight/Rogue 70/66/66

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Ancient Treasures waypoint

#16 Post by kanta » Mon Dec 26, 2011 6:08 pm

Updated waypoint.
Scout/Knight/Rogue 70/66/66

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

Re: Ancient Treasures waypoint

#17 Post by lisa » Mon Dec 26, 2011 6:19 pm

kanta wrote:If someone could get this offset for me, I'll add it in. Might even be 3 different offsets since there are 3 chest types.
Offset should be the same, just make sure you add in the rest of the code that goes with it. You will need to change the obj.Name though from the code in the survival WP.
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

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Ancient Treasures waypoint

#18 Post by kanta » Mon Dec 26, 2011 7:13 pm

Ok, I'll give it a try tomorrow when I'm able to do the game again.
Scout/Knight/Rogue 70/66/66

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

Re: Ancient Treasures waypoint

#19 Post by lisa » Mon Dec 26, 2011 7:38 pm

This is the code I used for dealing with chests.

Code: Select all

	for i = 0,objSize do
		local obj = objectList:getObject(i);
		if obj.Id == 111956 then
			table.insert(chests, table.copy(obj))
		end
	end	

	for k,v in pairs(chests) do
		if clickchest(v.Address) == true then
			teleport(v.X+10,v.Z+10,15)
			repeat
				player:target_Object(v.Id, nil, nil, true);
			until clickchest(v.Address) ~= true
		end
	end
you would need to change the Id to suit the chests you want to open
if obj.Id == 111956 then
You may or may not want the teleport there as I am pretty sure all those chests are very close together, so no real need to teleport to each chest.
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: Ancient Treasures waypoint

#20 Post by rock5 » Mon Dec 26, 2011 8:39 pm

I think to use the skills you could use

Code: Select all

UseExtraAction(num)
like I use in my invaders script. But I don't know how to get info about the buttons. In my invaders script I didn't need to get the info because it was always the same.

There is a "GetExtraActionInfo" command but it just returns the icon name. I guess each button has a unique icon so you could identify the buttons by the icon.
  • 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: Bing [Bot] and 10 guests