|
|
|
Page 1 of 1 |
[ 15 posts ] |
|
 EQ2Harvest v1.1.3 (WAYPOINTS!) [UPDATED] : EverQuest 2 Premium Discussions
|
|
Posted: April 11th, 2005, 5:53 pm
|
|
|
|
sirusdv
Total Posts: 19
Location: Seattle, WA
Joined: May 1st, 2004, 4:00 am
sirusdv's Reps: 0
|
Update: Fixed a bug in the harvesting loop
Things I have changed / added:
Waypoint system! There is an array similar to the Resources array where you can input the X and Y coordinates of points (use /loc to get the coordinates the first and thrid values are the X and Y). You can also set a bool (true/false) weather or not the waypoint is purely navigational or if you want to harvest resources at that point too (use this incase you need to get around a corner or something or just change direction)
Improved harvesting! Since the new patch there was an update where resources do not disapear after only 3 harvests. The script now takes that into account
http://www.xunleashed.com/dload.php?act ... ile_id=145
_________________
All spelling mistakes, grammatical errors and stupid comments are intentional.
Last edited by sirusdv on April 12th, 2005, 11:21 am, edited 1 time in total.
|
|
|
|
|
Posted: April 12th, 2005, 9:36 am
|
|
|
|
simucal
simucal's Reps:
|
Awesome job mate! Keep up the good work.
|
|
|
|
|
Posted: April 12th, 2005, 9:59 am
|
|
|
|
alcor75
Total Posts: 13
Joined: November 20th, 2004, 3:51 pm
alcor75's Reps: 0
|
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))): TargetID = getTargetID(oServiceObject) do while (TargetID = SpawnID) HarvestResource loop
Pls corract me but shoulen't it be: (!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))): TargetID = getTargetID(oServiceObject) do while (TargetID = SpawnID) HarvestResource getTargetID(oServiceObject) loop
oterwise it will harvest forever the first resource it finde, since the target is not updated and it id is alwais the same even if the res. if not there anymore.
Btw this is a wanderfull script, tnx you wery much for sharing it with us.
|
|
|
|
|
Posted: April 12th, 2005, 11:17 am
|
|
|
|
sirusdv
Total Posts: 19
Location: Seattle, WA
Joined: May 1st, 2004, 4:00 am
sirusdv's Reps: 0
|
Good call on the bug, I am uploading a new version as we speak
_________________
All spelling mistakes, grammatical errors and stupid comments are intentional.
|
|
|
|
|
Posted: April 12th, 2005, 12:26 pm
|
|
|
|
envison
Total Posts: 34
Joined: April 7th, 2005, 7:35 pm
envison's Reps: 0
|
Installed new version. Resetup waypoints/Resources.
Once started it will find 1 resource and properly harvest off it. However past that 1 it wont find anouther. Ive updated service ect .
The more than 3 times is working correctly on the one node it harvests. So that problem seems to be fixed 
|
|
|
|
|
Posted: April 14th, 2005, 12:40 am
|
|
|
|
thadious
thadious's Reps:
|
Only problem I see is that if you get to an unharvestable node, it will get stuck. It will attmept to harvest, you get the "Too Far Away" message, it retargets and tries again. I modified the older version by putting a simple check in to see if you still have the node targeted after X attempts. Perhaps we could add something like this? Let me know if you have an easy fix.
|
|
|
|
|
Posted: April 14th, 2005, 4:07 pm
|
|
|
|
sirusdv
Total Posts: 19
Location: Seattle, WA
Joined: May 1st, 2004, 4:00 am
sirusdv's Reps: 0
|
I will add a simple fix by calling the move function again and checking distance to see if your position has changed much if it fails it will then do a small random move and retry if that fails then it will add node to bad node list.
I will add this as soon as this damn novicaine wears off....
|
|
|
|
|
Posted: April 15th, 2005, 11:23 pm
|
|
|
|
drakinn
drakinn's Reps:
|
yaim having the same problem get stuck trying to harvest a bad node. any chance we can get this fixed asap, other then that its killer script.
|
|
|
|
|
Posted: April 17th, 2005, 7:09 pm
|
|
|
|
llew22
Total Posts: 47
Joined: February 5th, 2005, 7:52 pm
llew22's Reps: 3
|
Disclaimer: I've never done programming or scripting before, but it seems like common sense...
Here is what I did to deal with the "too far away" bad node problem:
added a SpawnHarvestCounter variable
Dim HarvestCounter, SpawnHarvestCounter, MaxHarvests, MaxWanderDistance
changed harvest subroutine to limit it to 12 attempts. This is probably overkill, but I wanted to be on the safe side.
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))): sub HarvestResource() if (SpawnID > 0) then 'Make sure we still got a target writeLogLine("Harvesting...") XUScriptPlugin.staStatus.Text = "Harvesting. . .Only " & MaxHarvests - HarvestCounter & " more!!!" SendKeys(Resources(ResourceIndex)(0)) HarvestCounter = HarvestCounter + 1 'One down! SpawnHarvestCounter = SpawnHarvestCounter + 1 if (SpawnHarvestCounter = 12) then HandleBadResource FindResource end if sleep 5000 + Random(500,1500) 'Wait 5 seconds to harvest + a random delay of .5 to 1.5 seconds end if end sub
I've tested that it correctly shuns resources it tries 12 times to harvest, but it may have some logic errors that I'm not seeing right away (zeroing the counter, maybe?)
|
|
|
|
|
Posted: April 17th, 2005, 10:01 pm
|
|
|
|
llew22
Total Posts: 47
Joined: February 5th, 2005, 7:52 pm
llew22's Reps: 3
|
By the way, it seems like it would be fairly easy to automate the choosing of which resources to harvest. Just get the Zone name and use it to select which array of resource name data to use. It would take a little while to enter all the data, but it seems worthwhile to avoid having to change it all the time.
The next thing I would do after that, if I were a smarteyman, would be to "score" each resource based on distance and type. For example, the user would edit the VBS to assign a "desirability" rating to each resource. The script would then calculate priority for all resources in the area once it started up and after each node. The calculation would need to be refined with testing (and people would want to customize it). Something like:
priority = desirability /distance^2
|
|
|
|
|
Posted: April 18th, 2005, 1:10 am
|
|
|
|
llew22
Total Posts: 47
Joined: February 5th, 2005, 7:52 pm
llew22's Reps: 3
|
Well, my change doesn't seem to work for more than 1 bad node. I am still trying to figure out where I should reset the counter to 0 (I think it keeps counting up past 12, so it never hits the check).
Edit: Ok, that was a bad attempt. I decided it was bad to mess with the harvest function itself. Plus, I needed to initialize SpawnHarvestCounter.
I'm going to do the check for 12 attempts in the main area of the program, in the "do while..." loop at the end. I'll post the change if it works. In the meantime, don't use that other thing 
|
|
|
|
|
Posted: April 18th, 2005, 2:07 am
|
|
|
|
llew22
Total Posts: 47
Joined: February 5th, 2005, 7:52 pm
llew22's Reps: 3
|
Ok, I have one that has worked for me thus far...
I added the following variables:
Dim SpawnHarvestCounter, MaxSpawnHarvests
initialized them as follows:
SpawnHarvestCounter = 0
MaxSpawnHarvests = 12 (should be able to lower it to 8 or so with no ill effects)
Changed the Harvesting subroutine to look like this:
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))): sub HarvestResource() if (SpawnID > 0) then 'Make sure we still got a target writeLogLine("Harvesting...") XUScriptPlugin.staStatus.Text = "Harvesting. . .Attempt " & SpawnHarvestCounter + 1 & " of " & MaxSpawnHarvests SendKeys(Resources(ResourceIndex)(0)) HarvestCounter = HarvestCounter + 1 'One down! SpawnHarvestCounter = SpawnHarvestCounter + 1 sleep 5000 + Random(500,1500) 'Wait 5 seconds to harvest + a random delay of .5 to 1.5 seconds end if end sub and changed the end of the big "if" statement in the main script to look like this: (!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))): do while (TargetID = SpawnID) HarvestResource TargetID = getTargetID(oServiceObject) if (SpawnHarvestCounter = MaxSpawnHarvests) then HandleBadResource SpawnHarvestCounter = 0 TargetID = 0 end if loop SpawnHarvestCounter = 0
I'm not sure if that's the right way to clear out the targetId, but it seems to work.
|
|
|
|
|
Posted: April 19th, 2005, 3:15 pm
|
|
|
|
simucal
simucal's Reps:
|
Any chance you can add this to your script Sirusdv?
|
|
|
|
|
Posted: April 20th, 2005, 5:45 pm
|
|
|
|
thadious
thadious's Reps:
|
Not sure if anyone has followed my updates along the way so far but I added Sirus' kickazz mod to the find closest spawn mod. The only problem I have with it so far is that it will occasionally skip a node that you can see is good and go to the next waypoint. I mostly just chopped the codes together and will play with it tonight to find the problem. Feel free to dive in a see if you can find the problem, other than that, works like a champ.
You do not have the required permissions to view the files attached to this post.
|
|
|
|
|
Posted: April 22nd, 2005, 6:16 am
|
|
|
|
simucal
simucal's Reps:
|
anyone else had any problems with this script after a little while of harvesting just running back and forth between waypoints saying there are no resources when there really are?
|
|
|
|
|
Who is online |
|
Users browsing this forum: No registered users and 83 guests |
|
|
|