Basic Harvesting *solved*

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Wundervice
Posts: 30
Joined: Fri Mar 12, 2010 6:40 pm

Basic Harvesting *solved*

#1 Post by Wundervice » Mon Aug 02, 2010 2:41 pm

Solved.
Last edited by Wundervice on Mon Aug 09, 2010 10:10 am, edited 3 times in total.

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

Re: Trading with the Bot

#2 Post by rock5 » Mon Aug 02, 2010 10:13 pm

I can't really help you because I've never done trading before but I have 2 observations.

1. You don't need to do inventory:update() because it is included in itemTotalCount.
2. I suspect you can let the count get to 15. The quest will become complete ad you wont be able to collect the item anymore. But once they are traded away the quest is no longer complete so you should be able to collect them again. I'm not sure, but it's something you can test.
  • 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

Wundervice
Posts: 30
Joined: Fri Mar 12, 2010 6:40 pm

Re: Basic Harvesting (revised)

#3 Post by Wundervice » Tue Aug 03, 2010 3:15 pm

Just a bump. Im not sure how I would make the bot check for additional nodes at the same waypoint tho.

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

Re: Basic Harvesting (revised)

#4 Post by rock5 » Tue Aug 03, 2010 11:06 pm

Wundervice wrote:Okay so I decided to start with something more basic. Learning how to create a script to ID an item node (not resource) and harvest all at a single waypoint as a start to the learning process. Im thinking this is how it should be written:

<!-- #1 --><waypoint x="xxxx" z="xxxx">
player:target_Object(xxxxx,xxxx,true) <-- Not sure what the numbers are that go here tho. Item IDs, coordinates?
while player:target_Object(xxxxx,xxxx) do
sendMacro("UseSkill(1,1)") yrest(5500)
end

That would make the bot target the items nearby and harvest then with about a 5-second wait between attempts yes?
The reason you had to bump it is because editing a post doesn't bring it to the top of the list again, so no one knows you are expecting an answer.

The above is wrong. When you do "while player:target_Object(xxxxx,xxxx) do" it actually executes the function and uses the returned result. So target_Object gets executed at least twice.

Most of the time all you really need is

Code: Select all

player:target_Object()
with the appropriate options for the item you are harvesting.

This is how I decide what options to use for a new object.

Click it manually. Then;
1. If it's collected instantaneously then use

Code: Select all

target_Object(NameorId)
2. If it takes time to collect then add 2nd value.

Code: Select all

target_Object(NameorId,time)
3. If I want to collect multiple times then use the 3rd value.

Code: Select all

target_Object(NameorId,time,true)
4. If each item needs to be clicked more than once then use the 4th value.

Code: Select all

target_Object(NameorId,time,true,true)
5. Finally, if it is an unusual item that needs an action between clicks, eg. the eggs, then don't use the last 2 options but instead use the while loop.

Code: Select all

		while player:target_Object(NameorId,time) do
			...Do something between clicks
		end
I hope that makes it clear enough.

You can read about the target_Object function in the wiki.
http://www.solarstrike.net/wiki/index.p ... _Functions
  • 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

Wundervice
Posts: 30
Joined: Fri Mar 12, 2010 6:40 pm

*SOLVED*

#5 Post by Wundervice » Sat Aug 07, 2010 6:26 pm

beep
Last edited by Wundervice on Sun Aug 08, 2010 12:22 am, edited 1 time in total.

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

Re: Basic Harvesting (revised)

#6 Post by rock5 » Sat Aug 07, 2010 7:53 pm

Wundervice wrote:Tests failed. Having trouble getting it to recognize harvestables.. tried the name of the item, the name of the node itself, and the item id.

<waypoints>
<!-- # 1 --><waypoint x="-1838" z="4846">
player:target_Object(206756,6000,true)
sendMacro("UseSkill(1,1)") yrest(6000)
</waypoint>

</waypoints>
That's the id of the item in your inventory, it's different to the id of the node you have to click. As I've said multiple times in numerous threads, use rom/getid.lua to get the id of the node.

As to why the node name failed, I can't really say unless I saw the command you used. Maybe you spelt it wrong?

Also, why do you click it twice? You're not accidently interupting the first click with the second, are you?
  • 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 8 guests