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.
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Ancient Treasures waypoint

#61 Post by rock5 » Sat Dec 31, 2011 7:14 am

If they share the same name you can also get the name using one of the ids. eg.

Code: Select all

_Elemental = GetIdName(113614)
and then

Code: Select all

local cecandle = player:findNearestNameOrId(_Elemental)
We did something similar in survival I think.
  • 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
Sithlord512589
Posts: 36
Joined: Thu Mar 04, 2010 9:21 am

Re: Ancient Treasures waypoint

#62 Post by Sithlord512589 » Sun Jan 01, 2012 5:05 pm

I tested the script using english in client settings and it worked very well as expected.

Just for your information
MAGE 75/ PRIEST 72 (soon 75) / ROUGE 6x
german client, Server Europe
Thankful User of the other peoples mindwork :-)

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: Ancient Treasures waypoint

#63 Post by kuripot » Mon Jan 02, 2012 6:54 am

this few days i got a problem in mini treasure... when fly is activate and try to enter in the entrance door.. my character was stuck in door because he fly to high the the entrance door... i dont know if there id wrong in my wp userfunction. etc.. can you gave me the list of the link of updated userfunction or compatible... or other file needed in this waypoint

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

Re: Ancient Treasures waypoint

#64 Post by kanta » Mon Jan 02, 2012 8:01 am

Do you mean entering after getting to the first totem? Sorry I haven't been around, real life has taken the drivers' seat for a bit.
Scout/Knight/Rogue 70/66/66

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: Ancient Treasures waypoint

#65 Post by kuripot » Mon Jan 02, 2012 3:04 pm

after talking to npc and pay token

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

Re: Ancient Treasures waypoint

#66 Post by rock5 » Mon Jan 02, 2012 11:46 pm

I think he means the first door you go through. It always got a bit stuck for me but always made it through. I haven't run this script that many times, though.
  • 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

#67 Post by kanta » Tue Jan 03, 2012 2:15 am

rock5 wrote:If they share the same name you can also get the name using one of the ids. eg.

Code: Select all

_Elemental = GetIdName(113614)
and then

Code: Select all

local cecandle = player:findNearestNameOrId(_Elemental)
We did something similar in survival I think.
I think I didn't understand this when I first read it. This thought occurred to me tonight. The GetIdName command doesn't need to have the object targetable does it? It's pulling the information from the internal RoM database?
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

#68 Post by lisa » Tue Jan 03, 2012 3:04 am

kanta wrote:The GetIdName command doesn't need to have the object targetable does it?
Correct, it gets the info direct from memory and it doesn't matter if you have ever seend the item/npc in your entire playing of the game.
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

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

Re: Ancient Treasures waypoint

#69 Post by kkulesza » Tue Jan 03, 2012 7:48 pm

Another corrections
1. inside getecandle()
instead of:

Code: Select all

-- click ecandle
					player:target(cecandle)
					yrest(100)
					player:target_Object("Elemental Candlestick", 6000);
					yrest(5000)
					player:update()
it is better to do it inside a loop:

Code: Select all

-- click ecandle
					player:target(cecandle)
					rest(100)
					repeat
						player:target_Object("Elemental Candlestick", 6000);
						player:update()
					until not player.Casting
2. Lighting last candle

Code: Select all

<!-- #105 --><waypoint x="4021" z="3944" y="34">
		player:target_Object("Elemental Candlestick", 6000);
		flyoff()
		player:rest(10)
	</waypoint>	
Bot doesn't check if the third candle was already alight. So when there is no candle at wp105 then bot starts to fly through a wall to light nearest candle. This is unnecessary.
it is better to check if the treasure chests has spawned, because they spawn immediately after you light third candle

Code: Select all

<!-- #105 --><waypoint x="4021" z="3944" y="34">
		roomOpenA=player:findNearestNameOrId(113617);
		roomOpenB=player:findNearestNameOrId(113619);
		if roomOpenA==nil and roomOpenB==nil then
			player:target_Object("Elemental Candlestick", 6000);
			rest(9*1000);
		end
		flyoff();
	</waypoint>	
3. Coordinates
I had many unstick problems while moving to waypoints 72 and 85 so I've added two additional wps:

Code: Select all

<!-- # 72b --><waypoint x="3624" z="3666" y="92">	</waypoint> 

Code: Select all

<!-- # 84 b--><waypoint x="4087" z="3589" y="92">	</waypoint>
also changed a little bit coords for wp 110, because i've stuck many times while trying to collect last stone totem:

Code: Select all

	<!-- #110 --><waypoint x="3780" z="3800" y="34">
		if gettotems == 1 then
			player:target_Object(114080, 6000);
		end
	</waypoint>

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

Re: Ancient Treasures waypoint

#70 Post by rock5 » Tue Jan 03, 2012 9:43 pm

kkulesza wrote:it is better to do it inside a loop:

Code: Select all

-- click ecandle
               player:target(cecandle)
               rest(100)
               repeat
                  player:target_Object("Elemental Candlestick", 6000);
                  player:update()
               until not player.Casting
Not really. That doesn't do anything. player:target_Object wont finish until it finishes collecting, so if it succeeds or fails, player.Casting will always be false. To be sure it suceeded you would have to check the candle to see if it has been clicked. Not sure how. Maybe Lisas "open chest" offset will work here.

Code: Select all

      roomOpenA=player:findNearestNameOrId(113617);
      roomOpenB=player:findNearestNameOrId(113619);
      if roomOpenA==nil and roomOpenB==nil then
You can also do this like this

Code: Select all

      roomOpen=player:findNearestNameOrId({113617,113619});
      if roomOpen==nil then
  • 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

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: Ancient Treasures waypoint

#71 Post by kuripot » Wed Jan 04, 2012 12:08 am

how can i enable the opening of the mount chest?

i need to edit something??

Code: Select all

			--=== Create table for rune and mount chests ===--
			chests = {runes = {}, mount = {}}

			local objectList = CObjectList();
			objectList:update();
			local objSize = objectList:size()

			for i = 0,objSize do
				local obj = objectList:getObject(i);
				if obj.Id == 113618 or obj.Id == 113619 then
					if obj.Z > 3825 then -- mount
						table.insert(chests.mount, table.copy(obj))
					else -- runes
						table.insert(chests.runes, table.copy(obj))
					end
				end
			end

			-- Sort chests
			table.sort(chests.mount, function(a,b) return b.X > a.X end)
			table.sort(chests.runes, function(a,b) return a.X > b.X end)

			-- Get mount
			if getcmount == 1 then
				for k,v in pairs(chests.mount) do
					player:target(v.Address);
					Attack()
					yrest(2000)
					Attack()
					yrest(2000)
					repeat
						yrest(2000)
						player:update()
					until not player.Casting
				end
			end

			-- Get runes
			for k,v in pairs(chests.runes) do
				player:target(v.Address);
				Attack()
				yrest(2000)
				Attack()
				yrest(2000)
				repeat
					yrest(2000)
					player:update()
				until not player.Casting
			end
because my character not open the mount chest


need to delete this???

Code: Select all

       if getcmount == 1 then
like the rune chest..

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

Re: Ancient Treasures waypoint

#72 Post by rock5 » Wed Jan 04, 2012 1:57 am

Did you set

Code: Select all

	getcmount = 1 -- "0" do not collect mount chests "1" collect mount chests
on line 12?
  • 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

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: Ancient Treasures waypoint

#73 Post by kuripot » Wed Jan 04, 2012 5:19 am

rock5 wrote:Did you set

Code: Select all

	getcmount = 1 -- "0" do not collect mount chests "1" collect mount chests
on line 12?




edited.... i try again later but. i think its work now

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

Re: Ancient Treasures waypoint

#74 Post by kanta » Wed Jan 04, 2012 5:21 am

I guess I should have been very specific about the options in my first post. Near the top of the mini_treasure.xml you will find:
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 = 0 -- 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
If you want to collect, do as the description says and change "getcmount = 0" to "getcmount = 1"

I'll update the 1st post with this info.
Scout/Knight/Rogue 70/66/66

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

Re: Ancient Treasures waypoint

#75 Post by kanta » Wed Jan 04, 2012 5:49 am

rock5 wrote:

Code: Select all

      roomOpenA=player:findNearestNameOrId(113617);
      roomOpenB=player:findNearestNameOrId(113619);
      if roomOpenA==nil and roomOpenB==nil then
You can also do this like this

Code: Select all

      roomOpen=player:findNearestNameOrId({113617,113619});
      if roomOpen==nil then
I'm assuming I could also have it use the value I am setting?

Code: Select all

roomOpen=player:findNearestNameOrId({_Elemental});
I'll be trying it anyway in a few minutes. If all goes well I'll be updating the first post with the new file.
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

#76 Post by rock5 » Wed Jan 04, 2012 5:51 am

Hey Kanta, when are we going to see an updated version? Didn't you say you were going to tweak some coords or something?
  • 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

#77 Post by kanta » Wed Jan 04, 2012 6:01 am

Ya, real life kind of took over so I haven't had time to do anything with the waypoint. I'm doing some work on it right now.
Scout/Knight/Rogue 70/66/66

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

Re: Ancient Treasures waypoint

#78 Post by kanta » Wed Jan 04, 2012 6:21 am

Just a thought. The code that kkulesza posted... Why not just add that into the candle function itself? Something like this?

Code: Select all

	_Elemental = GetIdName(113614)

	function getecandle()
      roomOpen = player:findNearestNameOrId({_Elemental});
      if roomOpen == nil then
			local lastpllocx = 0
			local lastpllocz = 0
			local lastpllocy = 0
			player:update()
			local cecandle = player:findNearestNameOrId(_Elemental)
			local dist = distance(cecandle.X,cecandle.Z,player.X,player.Z)
			local lastpllocx = player.X
			local lastpllocz = player.Z
			local lastpllocy = player.Y
			if cecandle and (30 > dist) then
				-- goto ecandle
				teleport_SetStepSize(40)
				teleport(cecandle.X, cecandle.Z)	-- teleport to above ecandle
				yrest(1000)
				teleport(nil, nil, cecandle.Y +25)	-- teleport in range to click ecandle
				yrest(1000)

				-- click ecandle
					player:target(cecandle)
					yrest(1000)
					player:target_Object(_Elemental, 5000);
					yrest(1000)
					player:update()

				teleport(nil, nil, lastpllocy)
				yrest(1000)
				teleport(lastpllocx,lastpllocz)
				yrest(1000)
			end
	end
	end
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

#79 Post by rock5 » Wed Jan 04, 2012 6:32 am

Yep but isn't roomopen supposed to be checking for chests?

Also, Is there any way to have it teleport behind the candle with that hard one with the dog and guard?

And is there any reason to have stepsize as 40?
  • 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

#80 Post by kanta » Wed Jan 04, 2012 6:46 am

I had changed the stepsize in an attempt to stop the client error message. I guess I can take that out since I still get the message.

As for the tough candle, that's one of the things I'm working on. Going to remove the door models and do some dry runs with the waypoint coordinates to try and optimize them a little.

I was checking with the roomopen idea because I'm still a coding noob :oops:
I'll put it on the last candle check like was suggested. Mainly I was curious if using the

Code: Select all

player:findNearestNameOrId({_Elemental});
would work properly.
Scout/Knight/Rogue 70/66/66

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests