taultunleashed logoHarvest Bot : EverQuest 2 Premium Discussions - Page 7
newtopic  postreply
 [ 244 posts ]  Previous  1 ... 4, 5, 6, 7, 8, 9, 10 ... 17  Next
blue large dot

Harvest Bot : EverQuest 2 Premium Discussions - Page 7

Posted: February 21st, 2005, 8:58 pm
 
wyvernx

Total Posts: 6718
Joined: May 1st, 2004, 4:00 am
wyvernx's Reps: 21
User avatar
administrator
premium
Here is your error:

02/21/05 07:27:27 PM SCRIPT ERROR: Type mismatch: 'distDiff'
Src: Microsoft VBScript runtime error

Looks like you either 1 dont have the latest EQ2Service installed, or you do not have the navigator.vbs file in your EQ2Harvest folder.

_________________
Use Search first, ask questions later!


Reply with quote
Posted: February 21st, 2005, 9:00 pm
 
wyvernx

Total Posts: 6718
Joined: May 1st, 2004, 4:00 am
wyvernx's Reps: 21
User avatar
administrator
premium
PS also check your eq2test.log file that gets created in your scripts folder.

_________________
Use Search first, ask questions later!


Reply with quote
Posted: February 21st, 2005, 9:08 pm
 
stefan17
stefan17's Reps:
User avatar
wyvernx";p="56043 (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))):
Looks like you either 1 dont have the latest EQ2Service installed, or you do not have the navigator.vbs file in your EQ2Harvest folder.


my EQ2Service is v 1.2.0.0, and i Forced Plugins and Services to Update. How did/do i get the navigator.vbs file? not only is it not in the EQ2Harvest folder, its not anywhere else either.

edit: when i downloaded the EQ2Harvest Bot 1.2, the only file i recieved was EQ2Harvest.vbs inside the folder EQ2Harvest1[1].2. When I downloaded the EQ2Service, and installed it, it installed it to Plugins/everquest2 and created a folder called EQ2Service with the files EQ2Service.vbs, EQ2Service.dll, EQ2ServiceNews, EQ2Service.installfile, and a folder named MAPS with global.map inside it.

what am i missing here? when should i have gotten the navigator.vbs file and where was i told to put it inside that specific folder? sorry if i missed something obvious

heres my eq2test.log file:
[Sunday, February 20, 2005 8:21:48 PM] Loading in Library: Navigator
[Sunday, February 20, 2005 8:21:48 PM] Loading in Library: EQ2Service
[Sunday, February 20, 2005 8:21:49 PM] Creating EQ2Service Object
[Sunday, February 20, 2005 8:22:02 PM] Loading in Library: Navigator
[Sunday, February 20, 2005 8:22:02 PM] Loading in Library: EQ2Service
[Sunday, February 20, 2005 8:22:02 PM] Creating EQ2Service Object
[Sunday, February 20, 2005 8:22:07 PM] Loading in Library: Navigator
[Sunday, February 20, 2005 8:22:08 PM] Loading in Library: EQ2Service
[Sunday, February 20, 2005 8:22:08 PM] Creating EQ2Service Object
[Sunday, February 20, 2005 8:22:14 PM] Loading in Library: Navigator
[Sunday, February 20, 2005 8:22:14 PM] Loading in Library: EQ2Service
[Sunday, February 20, 2005 8:22:14 PM] Creating EQ2Service Object
[Sunday, February 20, 2005 8:32:28 PM] Loading in Library: Navigator
[Sunday, February 20, 2005 8:32:28 PM] Loading in Library: EQ2Service
[Sunday, February 20, 2005 8:32:29 PM] Creating EQ2Service Object
[Sunday, February 20, 2005 8:32:29 PM] Doing 1 time init.
[Sunday, February 20, 2005 8:46:03 PM] Loading in Library: Navigator
[Sunday, February 20, 2005 8:57:04 PM] Loading in Library: Navigator
[Sunday, February 20, 2005 8:57:04 PM] Loading in Library: EQ2Service
[Sunday, February 20, 2005 8:57:04 PM] Creating EQ2Service Object
[Sunday, February 20, 2005 8:57:05 PM] Doing 1 time init.
[Sunday, February 20, 2005 9:02:31 PM] Loading in Library: Navigator
[Sunday, February 20, 2005 9:02:31 PM] Loading in Library: EQ2Service
[Sunday, February 20, 2005 9:02:32 PM] Creating EQ2Service Object
[Sunday, February 20, 2005 9:02:32 PM] Doing 1 time init.
[Sunday, February 20, 2005 9:04:05 PM] Loading in Library: Navigator
[Sunday, February 20, 2005 9:04:05 PM] Loading in Library: EQ2Service
[Sunday, February 20, 2005 9:04:05 PM] Creating EQ2Service Object
[Sunday, February 20, 2005 9:04:06 PM] Doing 1 time init.
[Sunday, February 20, 2005 9:10:01 PM] Loading in Library: Navigator
[Sunday, February 20, 2005 9:10:01 PM] Loading in Library: EQ2Service
[Sunday, February 20, 2005 9:10:01 PM] Creating EQ2Service Object
[Sunday, February 20, 2005 9:10:01 PM] Doing 1 time init.
[Sunday, February 20, 2005 9:16:21 PM] Loading in Library: Navigator
[Sunday, February 20, 2005 9:16:21 PM] Loading in Library: EQ2Service
[Sunday, February 20, 2005 9:16:21 PM] Creating EQ2Service Object
[Sunday, February 20, 2005 9:16:21 PM] Doing 1 time init.
[Sunday, February 20, 2005 9:18:07 PM] Loading in Library: Navigator
[Sunday, February 20, 2005 9:18:07 PM] Loading in Library: EQ2Service
[Sunday, February 20, 2005 9:18:07 PM] Creating EQ2Service Object
[Sunday, February 20, 2005 9:18:08 PM] Doing 1 time init.
[Monday, February 21, 2005 12:54:10 PM] Loading in Library: Navigator
[Monday, February 21, 2005 12:54:10 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 12:54:11 PM] Creating EQ2Service Object
[Monday, February 21, 2005 12:54:11 PM] Doing 1 time init.
[Monday, February 21, 2005 12:56:26 PM] Loading in Library: Navigator
[Monday, February 21, 2005 12:56:26 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 12:56:26 PM] Creating EQ2Service Object
[Monday, February 21, 2005 12:56:26 PM] Doing 1 time init.
[Monday, February 21, 2005 2:14:54 PM] Loading in Library: Navigator
[Monday, February 21, 2005 2:14:55 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 2:14:55 PM] Creating EQ2Service Object
[Monday, February 21, 2005 2:14:55 PM] Doing 1 time init.
[Monday, February 21, 2005 2:19:37 PM] Loading in Library: Navigator
[Monday, February 21, 2005 2:19:37 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 2:19:38 PM] Creating EQ2Service Object
[Monday, February 21, 2005 2:19:38 PM] Doing 1 time init.
[Monday, February 21, 2005 2:25:43 PM] Loading in Library: Navigator
[Monday, February 21, 2005 2:25:43 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 2:25:43 PM] Creating EQ2Service Object
[Monday, February 21, 2005 2:25:43 PM] Doing 1 time init.
[Monday, February 21, 2005 2:35:15 PM] Loading in Library: Navigator
[Monday, February 21, 2005 2:35:15 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 2:35:15 PM] Creating EQ2Service Object
[Monday, February 21, 2005 2:35:16 PM] Doing 1 time init.
[Monday, February 21, 2005 2:36:36 PM] Loading in Library: Navigator
[Monday, February 21, 2005 2:36:36 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 2:36:36 PM] Creating EQ2Service Object
[Monday, February 21, 2005 2:36:37 PM] Doing 1 time init.
[Monday, February 21, 2005 3:20:00 PM] Loading in Library: Navigator
[Monday, February 21, 2005 3:20:01 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 3:20:01 PM] Creating EQ2Service Object
[Monday, February 21, 2005 3:20:01 PM] Doing 1 time init.
[Monday, February 21, 2005 3:28:45 PM] Loading in Library: Navigator
[Monday, February 21, 2005 3:28:45 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 3:28:45 PM] Creating EQ2Service Object
[Monday, February 21, 2005 3:28:46 PM] Doing 1 time init.
[Monday, February 21, 2005 7:11:33 PM] Loading in Library: Navigator
[Monday, February 21, 2005 7:11:34 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 7:11:34 PM] Creating EQ2Service Object
[Monday, February 21, 2005 7:11:34 PM] Doing 1 time init.
[Monday, February 21, 2005 7:11:43 PM] Loading in Library: Navigator
[Monday, February 21, 2005 7:11:43 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 7:11:43 PM] Creating EQ2Service Object
[Monday, February 21, 2005 7:11:43 PM] Doing 1 time init.
[Monday, February 21, 2005 7:27:24 PM] Loading in Library: Navigator
[Monday, February 21, 2005 7:27:24 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 7:27:26 PM] Creating EQ2Service Object
[Monday, February 21, 2005 7:27:26 PM] Doing 1 time init.
[Monday, February 21, 2005 7:27:26 PM] Lets do this.
[Monday, February 21, 2005 7:27:26 PM] Finding Resource...
[Monday, February 21, 2005 7:27:27 PM] Found Something...
[Monday, February 21, 2005 7:32:11 PM] Loading in Library: Navigator
[Monday, February 21, 2005 7:32:11 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 7:32:12 PM] Creating EQ2Service Object
[Monday, February 21, 2005 7:32:12 PM] Doing 1 time init.
[Monday, February 21, 2005 7:32:12 PM] Lets do this.
[Monday, February 21, 2005 7:32:12 PM] Finding Resource...
[Monday, February 21, 2005 7:32:13 PM] Found Something...
[Monday, February 21, 2005 7:32:19 PM] Loading in Library: Navigator
[Monday, February 21, 2005 7:32:19 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 7:32:21 PM] Creating EQ2Service Object
[Monday, February 21, 2005 7:32:21 PM] Doing 1 time init.
[Monday, February 21, 2005 7:32:21 PM] Lets do this.
[Monday, February 21, 2005 7:32:21 PM] Finding Resource...
[Monday, February 21, 2005 7:32:21 PM] Found Something...
[Monday, February 21, 2005 7:35:41 PM] Loading in Library: Navigator
[Monday, February 21, 2005 7:35:42 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 7:35:43 PM] Creating EQ2Service Object
[Monday, February 21, 2005 7:35:43 PM] Doing 1 time init.
[Monday, February 21, 2005 7:35:44 PM] Lets do this.
[Monday, February 21, 2005 7:35:44 PM] Finding Resource...
[Monday, February 21, 2005 7:35:44 PM] Found Something...
[Monday, February 21, 2005 7:43:22 PM] Loading in Library: Navigator
[Monday, February 21, 2005 7:43:22 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 7:43:24 PM] Creating EQ2Service Object
[Monday, February 21, 2005 7:43:24 PM] Doing 1 time init.
[Monday, February 21, 2005 7:43:24 PM] Lets do this.
[Monday, February 21, 2005 7:43:24 PM] Finding Resource...
[Monday, February 21, 2005 7:43:25 PM] Found Something...
[Monday, February 21, 2005 7:52:05 PM] Loading in Library: Navigator
[Monday, February 21, 2005 7:52:06 PM] Loading in Library: EQ2Service
[Monday, February 21, 2005 7:52:06 PM] Creating EQ2Service Object
[Monday, February 21, 2005 7:52:06 PM] Doing 1 time init.
[Monday, February 21, 2005 7:52:07 PM] Lets do this.
[Monday, February 21, 2005 7:52:07 PM] Finding Resource...
[Monday, February 21, 2005 7:52:07 PM] Found Something...


Reply with quote
Posted: February 21st, 2005, 10:10 pm
 
wyvernx

Total Posts: 6718
Joined: May 1st, 2004, 4:00 am
wyvernx's Reps: 21
User avatar
administrator
premium
Check again.

When you download the EQ2Harvester1.2.rar.

Double click it.

Let winrar open it up.

Then you can explore the contents.

Double click on the EQ2harvest folder and you will see the 2 files in that folder.

_________________
Use Search first, ask questions later!


Reply with quote
Posted: February 21st, 2005, 11:32 pm
 
stefan17
stefan17's Reps:
User avatar
woot! works now, thanks so much for your help :)


Reply with quote
Posted: February 22nd, 2005, 7:26 am
 
tazman076

Total Posts: 169
Joined: January 17th, 2005, 11:44 pm
tazman076's Reps: 1
User avatar
Active User > 50 Posts
My harvester wasn't working yesterday and i didn't have time to mess with it before work. But got home last night and patched the new XU and everything seems to be working like a champ now.

Wether intentional or not the bot logic seems to be picking closer nodes, and seems to be randoming what it goes after. I didn't see anything in your notes about you actually working on that script Wyv but the release is working very nice.

On side note i did finally manage to crash eq2 to the desktop :) oh well i'm not immune

-Taz


Reply with quote
Posted: February 22nd, 2005, 9:14 am
 
tazman076

Total Posts: 169
Joined: January 17th, 2005, 11:44 pm
tazman076's Reps: 1
User avatar
Active User > 50 Posts
Wyv,

Is there something i can use to seperate out lines i don't want the script to run? i.e. instead of deleating the array lines with the names of the nodes i want to look for... is there something i can just go in and add to each line to have the script ignore them if i want to turn off looking for certain nodes?

-Taz


Reply with quote
Posted: February 22nd, 2005, 9:40 am
 
drakkiss
drakkiss's Reps:
User avatar
tazman076";p="56120 (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))):
Wyv,

Is there something i can use to seperate out lines i don't want the script to run? i.e. instead of deleating the array lines with the names of the nodes i want to look for... is there something i can just go in and add to each line to have the script ignore them if i want to turn off looking for certain nodes?

-Taz


This should work fine:

(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
Resources = array( _
   array("1", "cloven ore"), _
   'array("1", "wind swept rock"), _
   array("2", "armadillo den"), _
   'array("3", "desert roots"), _
   array("3", "oasis shrubbery") _
)


Just remember the last item in the array should not have a comma.


Reply with quote
Posted: February 22nd, 2005, 12:37 pm
 
drakkiss
drakkiss's Reps:
User avatar
tazman076";p="55116 (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))):
also noticed when done with a node it seems to run through the resources in the order you have them listed. i.e. if you have the ore on top it will look for an ore node in the area and proceed to it. if not then it will go to choice #2. which ends up leaving the closest nodes to you untouched and chances of ever hitting your 4th or 5th choice are slim.


I am working on this right now. Since I am at work with no access to EQ2 it's going slow, but here is the method I am trying:

Let FindResource() locate the first available resource in the array.
Allow WithinRoamArea() to verify it's within range.

Here is the fork, I am adding that SpawnID to a new ResourceIndex array which will hold the closest instance of each type of resource (assuming all were found). It will then calculate which of those in the ResourceIndex are closest and proceed to GotoResource() as normal.

I am hoping to be able to calculate distance values using distDiff(). I haven't been able to test it in-game so I am not sure what the actual value of this function will be. Maybe Wyrven can tell me if I am way off-base.


Reply with quote
Posted: February 22nd, 2005, 1:26 pm
 
tazman076

Total Posts: 169
Joined: January 17th, 2005, 11:44 pm
tazman076's Reps: 1
User avatar
Active User > 50 Posts
drak so are you just adding an apostrophe at beginging of each line you want the cript to ignore? did you test this?

Taz


Reply with quote
Posted: February 22nd, 2005, 3:00 pm
 
drakkiss
drakkiss's Reps:
User avatar
****UPDATED 2/22/05 10:00PM****

This version will always grab the resource in your array that is closest. Using Pythagorean theorem to calculate it. Distdiff() should probably be implemented in the same way.

(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
'EQ2Harvest Bot. version 1.1
'By WyvernX
 
'  Install Instructions
'1.  You MUST install the EQ2Service plugin.  Get it from the downloads on the web page.
'2.  Configure your data below
'Various Varying Variables
Dim oServiceObject, File, temp, FTarget, TargetID
Dim ResourceIndex, SpawnID, Resources, MobName, ResourceName, NothingClose
Dim ClosestResourceDist, ClosestSpawnID, CurrentResourceDist
Dim HarvestCounter, MaxHarvests, MaxWanderDistance
Dim bQuitOnMaxHarvests, WanderDistance, bIgnoreWanderDistanceIfResourceFound
Dim BadSpawnArray, NumberOfBadSpawns
Dim RX, RY, PX, PY, RH, PH, IX, IY, ClosestSpawnRX, ClosestSpawnRY 'Resource, Player, Initial X and Y values
Dim Xsq, YSq
XUScriptHost.ImportScript "MessageBoxLibrary.vbl"
Dim MessageBoxSample
Set MessageBoxSample = New MessageBoxClass

'Notes:   If using patrol route, use a tight/small WanderDistance.  If using wander method, use a larger one.  Just remember you will wander any where in a square - distance away from the origin!!!
bIgnoreWanderDistanceIfResourceFound = false 'If a resource is outside of our wander area, harvest it anyway.  (This could cause to you to move FAR away from home point!)
WanderDistance = 100 'How far the char is allowed to wander around
MaxWanderDistance = 300 'How far to stray away from starting point (if bIgnoreWanderDistanceIfResourceFound is true)
MaxHarvests = 200 'Will attempt to harvest MaxHarvests times.
bQuitOnMaxHarvets = false 'Log out after MaxHarvests is reached.

'Resources to look for.  Syntax:  HOTKEY, ResourceName
'Notice, last array has no trailing comma!
Resources = array( _
   array("1", "alluvium ore"), _
   array("4", "arbor"), _
   array("2", "badger den"), _
   array("1", "callous ore"), _
   array("2", "critter den"), _
   array("4", "decrepit arbor"), _
   array("2", "deer den"), _
   array("2", "dire wolf den"), _
   array("1", "dusky ore"), _
   array("3", "fairy ring"), _
   array("4", "felled high plains arbor"), _
   array("4", "fetid arbor"), _
   array("1", "hermetic stone"), _
   array("3", "high plains fungi"), _
   array("3", "high plains shrubbery"), _
   array("3", "mesquite catch weed"), _
   array("5", "mob of fish"), _
   array("2", "molerat den"), _
   array("3", "musty roots"), _
   array("3", "mystic natural garden"), _
   array("3", "natural garden"), _
   array("3", "natural herb garden"), _
   array("1", "ore"), _
   array("3", "ovegrown fairy ring"), _
   array("3", "overgrown bed of greenslade"), _
   array("3", "piperaceae"), _
   array("3", "plains fungi"), _
   array("3", "plains roots"), _
   array("3", "plains shrubbery"), _
   array("1", "residual ore"), _
   array("1", "rhythmic stone"), _
   array("1", "rigid stone"), _
   array("3", "roots"), _
   array("1", "sandwashed rock"), _
   array("5", "school of fish"), _
   array("5", "shoal of fish"), _
   array("3", "stody roots"), _
   array("1", "stonecrest ore"), _
   array("5", "throng of fish"), _
   array("3", "velvety roots"), _
   array("4", "wind felled tree"), _
   array("1", "wind swept stones"), _
   array("4", "wretched arbor") _
)
ClosestResources = array( _
   array("0", "NULL") _
)


'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'    DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING!!!
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////

'Set the Log file for our output if necessary
logFilename = GetXUnleashedDirectory() + "\Scripts\EQ2Test.txt" 'debug log file

'Simple Log writing function
function writeLogLine (msg)
   Const ForReading = 1, ForWriting = 2, ForAppending = 8       
   Dim FTarget, File, MyDate, MyTime, temp
   MyDate = CStr (FormatDateTime (Date, 1))
   MyTime = CStr (FormatDateTime (Time, 3))
   Set FTarget = CreateObject("Scripting.FileSystemObject")
   Set File = FTarget.OpenTextFile(logFilename, ForAppending, True)       
   temp = "[" & MyDate & " " & MyTime & "] " & msg & vbCrLf       
   File.Write temp
   File.Close
end function

function WithinRoamArea()
   'Check Distance
   if (bIgnoreWanderDistanceIfResourceFound = true) then
      if (distDiff(IX,RX) < MaxWanderDistance AND distDiff(IY,RY) < MaxWanderDistance) then
         WithinRoamArea = true
      else
         WithinRoamArea = false
      end if
   else
      if (distDiff(IX,RX) < WanderDistance AND distDiff(IY,RY) < WanderDistance) then
         WithinRoamArea = true
      else
         WithinRoamArea = false
      end if
   end if
end function

sub HandleNoResourcesNearby
      writeLogLine("No Resources in this area.  Taking a nap!")
      for s = 1 to 30
         XUScriptPlugin.staStatus.Text = "No Resources nearby.  Sleeping " & 30 - s
         sleep 1000 'Sleep for 30 seconds.         
      next
      XUScriptPlugin.staStatus.Text = "Going to random spot near origin"
      NavigateXY oServiceObject, IX - WanderDistance + Random(0,WanderDistance * 2), IY - WanderDistance + Random(0,WanderDistance * 2)
end sub

sub HandleBadResource()
   'This will take us back to "near" our starting point.
   writeLogLine("HandleBadResource Called.  Avoid that resource node.")
   XUScriptPlugin.staStatus.Text = "Bad Resource/Target!  Avoiding it for now. . ."
   'NavigateXY oServiceObject, IX - WanderDistance + Random(0,WanderDistance * 2), IY - WanderDistance + Random(0,WanderDistance * 2)
   BadSpawnArray(NumberOfBadSpawns) = SpawnID
   NumberOfBadSpawns = NumberOfBadSpawns + 1
end sub

'How to find Resources. 
'Note, it looks for preference items (lower index in the array) first.
'Might customize this later to look for nearest resources first.
sub FindResource()
  NothingClose = "TRUE"
  ClosestResourceDist = 9999
  writeLogLine("Finding Resource...")
  XUScriptPlugin.staStatus.Text = "Looking. . ."
  for i = LBound(Resources) to UBound(Resources)
     'XUScriptPlugin.staStatus.Text = "Looking for: " & Resources(i)(1) & ", Best: " & ClosestResourceDist
     'Sleep 1000
     SpawnID = findNearestMob(oServiceObject,Resources(i)(1))
     for b = LBound(BadSpawnArray) to UBound(BadSpawnArray)
       if (BadSpawnArray(b) = SpawnID) then
         writeLogLine("Avoiding this resource, we couldnt get it last time!")
         SpawnID = findNextNearestMob(oServiceObject)
         if (SpawnID < 0) then 'No more of that type of resource!
            exit for
         end if
      end if         
     next
     if (SpawnID > -1) then    '****************************MODIFIED***************************
       ResourceIndex = i
       writeLogLine("Found Something...")
      RX = getMobX(oServiceObject,SpawnID)
      RY = getMobY(oServiceObject,SpawnID)
      PX = getPlayerX(oServiceObject)
      PY = getPlayerY(oServiceObject)
      if (WithinRoamArea) then
         writeLogLine("Found a " & Resources(i)(1))
         XSq = ((distDiff(IX,RX))*(distDiff(IX,RX)))
         YSq = ((distDiff(IY,RY))*(distDiff(IY,RY)))
         CurrentResourceDist=Sqr(XSq+YSq)
         'The goto & harvesting functions will now reference the 'ClosestOLDSTRINGNAME' version of the
         'variables as they should always point to the closest resource in the array.
         if ClosestResourceDist > CurrentResourceDist then
            ClosestResourceDist = CurrentResourceDist
            ClosestSpawnRX = RX
            ClosestSpawnRY = RY
            ClosestResources(0)(0) = Resources(i)(0)
            ClosestResources(0)(1) = Resources(i)(1)
            ClosestSpawnID = SpawnID
            XUScriptPlugin.staStatus.Text = "Found " & Resources(i)(1) & ", " & CurrentResourceDist
            'Sleep 2000
         end if
      NothingClose = "FALSE"
      else
         XUScriptPlugin.staStatus.Text = "Found " & Resources(i)(1) & " but it's too far away!"
         'Sleep 2000
         writeLogLine("Nope, too far away!")
         SpawnID = -1
        end if
     end if
 
  next

   if NothingClose = "TRUE" then    '****************************END MODIFIED***************************
      HandleNoResourcesNearby
   else
      SpawnID = ClosestSpawnID
      XUScriptPlugin.staStatus.Text = "Found " & ClosestResources(0)(1) & ", " & ClosestResourceDist
   end if 
end sub

sub GotoResource()
   writeLogLine("Moving to it...")
  If (Index > -1) then
   if (ClosestSpawnRX = 0 and ClosestSpawnRY = 0) then    '*************  MODIFIED
      writeLogLine("Bad location?")
      XUScriptPlugin.staStatus.Text = "Skipping, bad location?"
      Sleep 2000
   else
      NavigateXY oServiceObject, ClosestSpawnRX, ClosestSpawnRY    '*************  MODIFIED
   end if
  end if
end sub

sub HarvestResource()
    if (ClosestSpawnID > 0) then 'Make sure we still got a target    '*************  MODIFIED
      writeLogLine("Harvesting...")
      XUScriptPlugin.staStatus.Text = "Harvesting. . .Only " & MaxHarvests - HarvestCounter & " more!!!"
       SendKeys(ClosestResources(0)(0))    '*************  MODIFIED
      HarvestCounter = HarvestCounter + 1 'One down!
       sleep 5000 + Random(500,1500) 'Wait 5 seconds to harvest + a random delay of .5 to 1.5 seconds
   end if
end sub



'Load in the helper functions
writeLogLine("Loading in Library:  Navigator")
XUScriptPlugin.staStatus.Text = "Loading libraries... (EQ2Harvest-Navigator)"
XUScriptHost.ImportScript("EQ2Harvest\navigator.vbs")

writeLogLine("Loading in Library:  EQ2Service")
XUScriptPlugin.staStatus.Text = "Loading libraries... (EQ2Harvest-EQ2Service)"
XUScriptHost.ImportScript("EQ2Harvest\EQ2Service.vbs")

writeLogLine("Creating EQ2Service Object")
XUScriptPlugin.staStatus.Text = "Loading EQ2Service..."
set oServiceObject = XUScriptPlugin.GetService("EQ2Service.Service")
if Err.Number <> 0 then
  XUScriptPlugin.staStatus.Text = "EQ2Service Failed to load!"
  Sleep 5000
else


writeLogLine("Doing 1 time init.")
'Any and All initialization
HarvestCounter = 0
IX = getPlayerX(oServiceObject)
IY = getPlayerY(oServiceObject)
NumberOfBadSpawns = 0
redim BadSpawnArray(MaxHarvests)


writeLogLine("Lets do this.")
'Heart of the Script.
Do while HarvestCounter < MaxHarvests
  FindResource
  if (SpawnID > 0) then
      Sleep 2000
      GotoResource 
      writeLogLine("Targeting Resource")      
      SendKeys("{TAB}") 'To Target the Resource
      TargetID = getTargetID(oServiceObject)      
      if (TargetID > 0) then
         MobName = getMobName(oServiceObject, TargetID)
         writeLogLine("Targeted Resource:  " & MobName)
      end if
      ResourceName = ClosestResources(0)(1)   '*************  MODIFIED
      if (TargetID <> ClosestSpawnID) then    '*************  MODIFIED
         'Try backing up a little and try again:
         writeLogLine("Wrong Target!  Trying to back up a little...")         
         RunBackward
         StopRunningBackward
         SendKeys("{ESCAPE}")
         SendKeys("{TAB}") 'To Target the Resource
         TargetID = getTargetId(oServiceObject)      
         if (TargetID > 0) then
            MobName = getMobName(oServiceObject, TargetIndex)
            writeLogLine("Targeted Resource:  " & MobName)
         end if
         ResourceName = ClosestResources(0)(1)   '*************  MODIFIED
         if (TargetID <> ClosestSpawnID) then   '*************  MODIFIED
             HandleBadResource
             writeLogLine("ARG!!! Could not target the resource!!!")
         end if
      end if
      TargetID = getTargetID(oServiceObject)   
      if (TargetID = ClosestSpawnID) then HarvestResource   '*************  MODIFIED
      TargetID = getTargetID(oServiceObject)   
      if (TargetID = ClosestSpawnID) then HarvestResource   '*************  MODIFIED
      TargetID = getTargetID(oServiceObject)   
      if (TargetID = ClosestSpawnID) then HarvestResource   '*************  MODIFIED
  end if
  sleep 200
loop

if (bQuitOnMaxHarvets = true) then
   SendKeys("/quit{ENTER}")
end if


  set File = Nothing
  set FTarget = Nothing
  set oServiceObject = Nothing
end if



Reply with quote
Posted: February 23rd, 2005, 12:00 pm
 
djvj

Total Posts: 272
Joined: May 1st, 2004, 4:00 am
djvj's Reps: 0
User avatar
Active User > 50 Posts
tnx drak, i ran the script first time last night and noticed how much what u added is needed. Script is too random at what it wants to harvest next and lots of times it skips past points that i want it to get. Will test it tonight.


Reply with quote
Posted: February 23rd, 2005, 12:54 pm
 
wyvernx

Total Posts: 6718
Joined: May 1st, 2004, 4:00 am
wyvernx's Reps: 21
User avatar
administrator
premium
You should have just modified the distDiff function to change from a general distance function to a true distance functino. Would have saved ya some coding.

I was just lazy when I copied the code from some of the ffxi scripts.

I'll merge your additions with my own so you dont have to update/fix the code everytime I release a new version.

_________________
Use Search first, ask questions later!


Reply with quote
Posted: February 23rd, 2005, 1:16 pm
 
scrollpt

Total Posts: 6
Joined: January 7th, 2005, 5:21 pm
scrollpt's Reps: 0
User avatar
premium
Hi Is any possibility to destroy some items we donĀ“t need? while harvestbot runs?
And able to collect "?" ?

Tnks in adavance!! :)


Reply with quote
Posted: February 23rd, 2005, 1:36 pm
 
drakkiss
drakkiss's Reps:
User avatar
wyvernx";p="56252 (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))):
You should have just modified the distDiff function to change from a general distance function to a true distance functino. Would have saved ya some coding.

I was just lazy when I copied the code from some of the ffxi scripts.

I'll merge your additions with my own so you dont have to update/fix the code everytime I release a new version.


True, but I wasn't sure how many diff ways distdiff was being used so I didn't wanna mess with it. I was 2boxing when I finished this up. I just wanted to get it working.


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 63 guests

Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of EverQuest 2 Premium Discussions RSS Feed 
Sitemap of EverQuest 2 Premium Discussions Sitemap 
SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?