Page 1 of 1
Harvesting dailies- Doesn't wait for harvest to complete
Posted: Mon Jul 19, 2010 7:41 pm
by randomuser01
I'm trying to harvest dailies.
The bot runs to the node, and clicks on it to begin harvesting, but immediately begins rotating to run to the next node and then runs there, ruining the harvest cast-bar, and thus, not harvesting anything.
I'm using default profile with these added in:
Code: Select all
<!-- Harvest options -->
<option name="HARVEST_DISTANCE" value="39" />
<option name="HARVEST_SCAN_WIDTH" value="5" /> -- steps horizontal
<option name="HARVEST_SCAN_HEIGHT" value="5" /> -- steps vertical
<option name="HARVEST_SCAN_STEPSIZE" value="60" /> -- wide of every step
<option name="HARVEST_SCAN_TOPDOWN" value="false" /> -- true = top->down false = botton->up
<option name="HARVEST_SCAN_YREST" value="10" /> -- scanspeed: higher values = slower scan
<option name="HARVEST_SCAN_YMOVE" value="1.1" /> -- move scan area top/down ( 1 middle of screen )
<option name="HARVEST_TIME" value="45" /> -- how long we maximum harvest a node
And here is my waypoint file:
Code: Select all
<!-- # 1 --><waypoint x="-11352" z="22620">player:harvest(113484);</waypoint>
<!-- # 2 --><waypoint x="-11418" z="22585">player:harvest(113484);</waypoint>
<!-- # 3 --><waypoint x="-11473" z="22542">player:harvest(113484);</waypoint>
...
The rombot is outputting:
Code: Select all
Moving to waypoint #8, (-11434, 22227)
We found Flaming Volcanic Mud and will harvest it.
player.TargetPtr: 0x3
target type: 4
Clearing target.
Moving to waypoint #9....
Any help with why it is doing this?
Re: Harvesting dailies- Doesn't wait for harvest to complete
Posted: Mon Jul 19, 2010 8:11 pm
by randomuser01
I've temporarily band-aid'd it to get it to work by adding in a rest at the end of each harvest line, but there still must be something I'm missing to cause it to mess up in the first place.
Re: Harvesting dailies- Doesn't wait for harvest to complete
Posted: Mon Jul 19, 2010 9:27 pm
by rock5
randomuser01 wrote:I've temporarily band-aid'd it to get it to work by adding in a rest at the end of each harvest line, but there still must be something I'm missing to cause it to mess up in the first place.
The harvest command is for harvesting wood. herbs or ore. If you are harvesting 1 of these, you are not supposed to include the item id. For backward comparability it will accept an id and assume it is some other object and open it but will not treat it as wood, herbs or ore so it won't wait.
If you still want to use the id because you only want to harvest that type of resource then try this fix. Change line 94 of player.lua to
Code: Select all
if _id and not database.nodes[obj.Id] then -- The rest is not needed if not resource node
That way if the id is a wood, herb or ore it will still be treated as one.
Please let me know if this works so I can commit it to the bot.
Re: Harvesting dailies- Doesn't wait for harvest to complete
Posted: Mon Jul 19, 2010 11:07 pm
by randomuser01
rock5 wrote:randomuser01 wrote:I've temporarily band-aid'd it to get it to work by adding in a rest at the end of each harvest line, but there still must be something I'm missing to cause it to mess up in the first place.
The harvest command is for harvesting wood. herbs or ore. If you are harvesting 1 of these, you are not supposed to include the item id. For backward comparability it will accept an id and assume it is some other object and open it but will not treat it as wood, herbs or ore so it won't wait.
If you still want to use the id because you only want to harvest that type of resource then try this fix. Change line 94 of player.lua to
Code: Select all
if _id and not database.nodes[obj.Id] then -- The rest is not needed if not resource node
That way if the id is a wood, herb or ore it will still be treated as one.
Please let me know if this works so I can commit it to the bot.
As I said in my OP, I'm not harvesting wood/ore/herbs. I'm harvesting dailies items (volcanic mud to be exact).
The wiki guide on harvesting said to use the player:harvest command to pick up dailies and put in the item_id into the passed command.
So if I'm doing it wrong and there's a separate command to pick up non resource nodes, well it isn't documented in the wiki, and I'd love to know what the command is.
Re: Harvesting dailies- Doesn't wait for harvest to complete
Posted: Tue Jul 20, 2010 12:12 am
by rock5
randomuser01 wrote:rock5 wrote:randomuser01 wrote:I've temporarily band-aid'd it to get it to work by adding in a rest at the end of each harvest line, but there still must be something I'm missing to cause it to mess up in the first place.
The harvest command is for harvesting wood. herbs or ore. If you are harvesting 1 of these, you are not supposed to include the item id. For backward comparability it will accept an id and assume it is some other object and open it but will not treat it as wood, herbs or ore so it won't wait.
If you still want to use the id because you only want to harvest that type of resource then try this fix. Change line 94 of player.lua to
Code: Select all
if _id and not database.nodes[obj.Id] then -- The rest is not needed if not resource node
That way if the id is a wood, herb or ore it will still be treated as one.
Please let me know if this works so I can commit it to the bot.
As I said in my OP, I'm not harvesting wood/ore/herbs. I'm harvesting dailies items (volcanic mud to be exact).
The wiki guide on harvesting said to use the player:harvest command to pick up dailies and put in the item_id into the passed command.
So if I'm doing it wrong and there's a separate command to pick up non resource nodes, well it isn't documented in the wiki, and I'd love to know what the command is.
Sorry confused myself.
In that case the harvest function worked as intended. It opened the item but doesn't wait because it doesn't know how long to wait for. When using the harvest command to open objects you need to add a wait time as needed.
But you should be using the new function player:target_Object(). It can also be found in the wiki. It has various options to cater for the different ways that objects behave when you click on them.
By the way, I'll check the harvest entry and fix it.
Re: Harvesting dailies- Doesn't wait for harvest to complete
Posted: Tue Jul 20, 2010 9:06 am
by qcalex
im using
Code: Select all
while queststate == "incomplete"
do player:harvest(***);
yrest(2700);
and it does as intended it collect it without a bug
ok as to be in DQ, how can i tell the bot to stop after 10 DQ? sorry noob question but it's the only thing missing for my script after it should be correct
thx again

Re: Harvesting dailies- Doesn't wait for harvest to complete
Posted: Tue Jul 20, 2010 9:42 am
by rock5
qcalex wrote:im using
Code: Select all
while queststate == "incomplete"
do player:harvest(***);
yrest(2700);
and it does as intended it collect it without a bug
ok as to be in DQ, how can i tell the bot to stop after 10 DQ? sorry noob question but it's the only thing missing for my script after it should be correct
thx again

Try
Daily_count()
Re: Harvesting dailies- Doesn't wait for harvest to complete
Posted: Tue Jul 20, 2010 10:56 am
by qcalex
Thx!