wyvernx";p="56033 (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))):
Be sure you have a EQ2Service.vbs file in your eq2harvest folder.
Must've missed that part in the instructions somewhere.
Well I did that, and it got a little further, it actually loaded the eq2service, but that's pretty much where it stopped. Heres the log:
02/21/05 07:25:06 PM
***** XUnleashed Trace Log Started: Monday, February 21, 2005 19:25:06
02/21/05 07:25:07 PM Registered XUnleashed Controls...
02/21/05 07:25:07 PM Registered XUnleashed IPPacketSniffer......
02/21/05 07:25:07 PM Registered XUScriptHelper...
02/21/05 07:25:07 PM XUnleashed Client: Click Play to begin...
02/21/05 07:25:15 PM XUnleashed Client: Authenticating User...
02/21/05 07:25:15 PM XUnleashed Client: 23-Jan-2006
02/21/05 07:25:17 PM XUnleashed Client: Updating 3rd Party Plugins and Services...
02/21/05 07:25:17 PM XUnleashed Client: Patching EQ2Crafter Plugin
02/21/05 07:25:17 PM XUnleashed Client: Retrieving the file: update
02/21/05 07:25:25 PM XUnleashed Client: Patching Wyvern's EQ2 Servicer
02/21/05 07:25:25 PM XUnleashed Client: Retrieving the file: update
02/21/05 07:25:25 PM XUnleashed Client: Redirecting to alternate patch server. . .
02/21/05 07:25:30 PM XUnleashed Client: Patching complete. . .
02/21/05 07:25:30 PM XUnleashed Client: Connecting to XUnleashed...
02/21/05 07:25:31 PM XUnleashed Client: Authenticating User...
02/21/05 07:25:33 PM XUnleashed Client: Connected. . .
02/21/05 07:25:33 PM Using Alternate Hooking. . .
02/21/05 07:25:40 PM XUnleashed Client: Launching. . .
02/21/05 07:26:02 PM Found Target Process: EverQuest2.exe
02/21/05 07:26:02 PM Initializing COM Objects. . .
02/21/05 07:26:02 PM Setting up DirectX Hooks. . .
02/21/05 07:26:06 PM FOUND: Direct3DCreate9
02/21/05 07:26:06 PM Starting Services. . .
02/21/05 07:26:06 PM ------->FOUND A StandardSERVICE: XUnleashed Windows Input Service
02/21/05 07:26:06 PM CXUWinInput::Initialize()
02/21/05 07:26:06 PM ------->FOUND A StandardSERVICE: XUnleashed TCP/IP Packet Sniffer
02/21/05 07:26:06 PM CPacketSniffer::Initialize()
02/21/05 07:26:06 PM Starting the 3rd Party Services...
02/21/05 07:26:06 PM ------->FOUND A 3rd Party Service: Wyvern's EQ2 Servicer
02/21/05 07:26:06 PM Starting Plugins. . .
02/21/05 07:26:06 PM ------->FOUND A 3rd Party Plugin: EQ2Crafter Plugin
02/21/05 07:26:06 PM Loading Window Schema. . .
02/21/05 07:26:06 PM ------->FOUND A STANDARD Plugin: XUnleashed V2 Triggers
02/21/05 07:26:06 PM Loading Window Schema. . .
02/21/05 07:26:06 PM ------->FOUND A STANDARD Plugin: XUnleashed V2 Macros
02/21/05 07:26:06 PM Loading Window Schema. . .
02/21/05 07:26:06 PM ------->FOUND A STANDARD Plugin: XUnleashed V2 Scripts
02/21/05 07:26:06 PM Loading Window Schema. . .
02/21/05 07:26:06 PM Attempting to lock onto Client. . .
02/21/05 07:26:06 PM WARNING: Requested DirectX9 Screen Format may not be compatable with XUnleashed.
02/21/05 07:26:06 PM FOUND: Direct3D9::CreateDevice()
02/21/05 07:26:06 PM DETECTED: Direct3DDevice9 Reset
02/21/05 07:26:06 PM WARNING: Requested DirectX9 Screen Format may be incompatable with XUnleashed.
02/21/05 07:26:07 PM FOUND: Direct3DDevice9::Present
02/21/05 07:26:07 PM Releasing XUnleashed DX9 BackBuffers.
02/21/05 07:26:07 PM Released XUnleashed DX9 BackBuffers.
02/21/05 07:26:07 PM Initializing DX9 BackBuffers...
02/21/05 07:27:23 PM XUScriptHelper->Creating Script Engine (VBScript). . .
02/21/05 07:27:23 PM XUScriptHelper->AddScriptItem: XUScriptHost
02/21/05 07:27:23 PM XUScriptHelper->AddScriptItem: Win32API
02/21/05 07:27:23 PM XUScriptHelper->AddScriptItem: VirtualKey
02/21/05 07:27:23 PM XUScriptHelper->AddScriptItem: Memory
02/21/05 07:27:23 PM XUScriptHelper->AddScriptItem: SystemInfo
02/21/05 07:27:23 PM XUScriptHelper->AddScriptItem: MemoryBasicInformation
02/21/05 07:27:23 PM XUScriptHelper->AddScriptItem: XUScriptPlugin
02/21/05 07:27:23 PM XUScriptHelper->Executing Script: '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
Dim HarvestCounter, MaxHarvests, MaxWanderDistance
Dim bQuitOnMaxHarvests, WanderDistance, bIgnoreWanderDistanceIfResourceFound
Dim BadSpawnArray, NumberOfBadSpawns
Dim RX, RY, PX, PY, RH, PH, IX, IY 'Resource, Player, Initial X and Y values
'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 = true '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 = 60 '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", "ferric ore"), _
array("1", "mud stone"), _
array("2", "lioness den"), _
array("3", "vestigial roots"), _
array("3", "flattened bed of thistle"), _
array("3", "flattened natural herb garden"), _
array("4", "marred arbor") _
)
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
'////////////////////////////////////////////////////////////////////////////
' 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()
writeLogLine("Finding Resource...")
XUScriptPlugin.staStatus.Text = "Looking. . ."
for i = LBound(Resources) to UBound(Resources)
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
ResourceIndex = i
writeLogLine("Found Something...")
RX = getMobX(oServiceObject,SpawnID)
RY = getMobY(oServiceObject,SpawnID)
PX = getPlayerX(oServiceObject)
PY = getPlayerY(oServiceObject)
if (WithinRoamArea) then
writeLogLine("Woot! Found a " & Resources(i)(1))
XUScriptPlugin.staStatus.Text = "Found " & Resources(i)(1)
exit sub
else
writeLogLine("Nope, too far away!")
SpawnID = -1
end if
end if
next
if (SpawnID < 0) then
HandleNoResourcesNearby
end if
end sub
sub GotoResource()
writeLogLine("Moving to it...")
If (Index > -1) then
if (RX = 0 and RY = 0) then
writeLogLine("Bad location?")
XUScriptPlugin.staStatus.Text = "Skipping, bad location?"
Sleep 2000
else
NavigateXY oServiceObject, RX, RY
end if
end if
end sub
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!
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 = Resources(ResourceIndex)(1)
if (TargetID <> SpawnID) then
'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 = Resources(ResourceIndex)(1)
if (TargetID <> SpawnID) then
HandleBadResource
writeLogLine("ARG!!! Could not target the resource!!!")
end if
end if
TargetID = getTargetID(oServiceObject)
if (TargetID = SpawnID) then HarvestResource
TargetID = getTargetID(oServiceObject)
if (TargetID = SpawnID) then HarvestResource
TargetID = getTargetID(oServiceObject)
if (TargetID = SpawnID) then HarvestResource
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
02/21/05 07:27:25 PM XUScriptHelper->Executing Script: 'EQ2 Service by WyvernX
'Version 1.2.0.0
'You can either IMPORT this script into your own, or you can edit this file directly and use the sample code below.
'If you IMPORT this script use this syntax:
'Example on how to Import this script to just have access to the functions.
'================================================
'0. Save the EQ2Service.vbs file to your scripts folder.
'1. Create a file with note pad and save it as YourScriptName.vbs
'2. Add the following lines:
'XUScriptPlugin.staStatus.Text = "Loading library... (EQ2Service)"
'XUScriptHost.ImportScript("EQ2Service.vbs")
'3. Now you can add the rest below:
'Example on how to Declare and Use the EQ2 Service Object
'================================================
'Dim oEQ2Service
'on error resume next
'set oEQ2Service= XUScriptPlugin.GetService("EQ2Service.Service")
'if Err.number <> 0 then
' ' EQ2Service didn't load
' XUScriptPlugin.staStatus.Text = "EQ2Service failed to load"
'else
' on error goto 0
' Dim playerName
' playerName = getPlayerName(oEQ2Service)
' XUScriptPlugin.staStatus.Text = "Player's Name is: " & playerName
'end if
'Sleep 5000
'set oEQ2Service = Nothing
'Currently Implemented Functions:
'================================================
'function getPlayerName(ByRef obj) //Returns the Player's Name
'function getPlayerHeading(ByRef obj) //Returns the Player's Heading
'function getPlayerZ(ByRef obj) //Returns the Player's Z Coordinage
'function getPlayerY(ByRef obj) //Returns the Player's Y Coordinage
'function getPlayerX(ByRef obj) //Returns the Player's X Coordinage
'function getPlayerHealth(ByRef obj) //Returns the Player's Health
'function getPlayerMaxHealth(ByRef obj) //Returns the Player's Max Health
'function getPlayerPower(ByRef obj) //Returns the Player's Power
'function getPlayerMaxPower(ByRef obj) //Returns the Player's Max Power
'function getAdventurerLevel(ByRef obj) //Returns the Player's Adventurer Level
'function getArtisanLevel(ByRef obj) //Returns the Player's Artisan Level
'function getTargetID(ByRef obj) //Returns the Target SpawnID
'function getMobIndex(ByRef obj, SpawnID) '//Returns the Mob Index for a given ID
'function getMobID(ByRef obj, Index) //Returns the Mob ID for a given Index
'function getMobName(ByRef obj, SpawnID) //Returns the Mob Name for a given SpawnID
'function getMobX(ByRef obj, SpawnID) //Returns the Mob X for a given SpawnID
'function getMobY(ByRef obj, SpawnID) //Returns the Mob Y for a given SpawnID
'function getMobZ(ByRef obj, SpawnID) //Returns the Mob Z for a given SpawnID
'function getMobLevel(ByRef obj, SpawnID) '//Returns the Mob Level for a given SpawnID
'function mobIsAttacking(ByRef obj, Index) '//Returns the true/false if mob is attacking something for a given SpawnID
'function getMobHealth(ByRef obj, SpawnID) '//Returns the Mob Index for a given ID
'function getMobPower(ByRef obj, SpawnID) '//Returns the Mob Index for a given ID
'function findMob(ByRef obj, MobName) //Returns the first Mob Index for a given name or -1 if not found
'function findNextMob(ByRef obj) //Returns the Next Mob Index for a given name or -1 if not found
'function findNearestMob(ByRef obj, MobName) '//Returns the Nearest Mob ID for a given name or -1 if not found
'function findNextNearestMob(ByRef obj) '//Returns the Next Nearest Mob ID for a given name or -1 if not found
'function getMaxIndex(ByRef obj) //Returns the CURRENT maximum index value of the spawn Indexes
'function getZoneName(ByRef obj) //Returns the Zone Name
'[helpstring("method UpdateData")] HRESULT UpdateData(void);
'This does not need to be directly called, because it is called in the functions below.
'[propget, id(16), helpstring("property PlayerName")] HRESULT PlayerName([out, retval] BSTR* pVal);
function getPlayerName(ByRef obj)
on error resume next
obj.UpdateData
if Err.Number = 0 then
getPlayerName = obj.PlayerName
else
getPlayerName = "<INVALID>"
end if
on error goto 0
end function
'[propget, id(1), helpstring("property PlayerHeading")] HRESULT PlayerHeading([out, retval] FLOAT* pVal);
function getPlayerHeading(ByRef obj)
on error resume next
obj.UpdateData
if Err.Number = 0 then
getPlayerHeading = obj.PlayerHeading
else
getPlayerHeading = -1
end if
on error goto 0
end function
'[propget, helpstring("property PlayerZ")] HRESULT PlayerZ([out, retval] FLOAT* pVal);
function getPlayerZ(ByRef obj)
on error resume next
obj.UpdateData
if Err.Number = 0 then
getPlayerZ = obj.PlayerZ
else
getPlayerZ = -99999
end if
on error goto 0
end function
'[propget, helpstring("property PlayerY")] HRESULT PlayerY([out, retval] FLOAT* pVal);
function getPlayerY(ByRef obj)
on error resume next
obj.UpdateData
if Err.Number = 0 then
getPlayerY = obj.PlayerY
else
getPlayerY = -99999
end if
on error goto 0
end function
'[propget, helpstring("property PlayerX")] HRESULT PlayerX([out, retval] FLOAT* pVal);
function getPlayerX(ByRef obj)
on error resume next
obj.UpdateData
if Err.Number = 0 then
getPlayerX = obj.PlayerX
else
getPlayerX = -99999
end if
on error goto 0
end function
'[propget, id(13), helpstring("property PlayerHealth")] HRESULT PlayerHealth([out, retval] LONG* pVal);
function getPlayerHealth(ByRef obj)
on error resume next
obj.UpdateData
getPlayerHealth = obj.PlayerHealth
if Err.Number <> 0 then
getPlayerHealth = -1
end if
on error goto 0
end function
'[propget, id(15), helpstring("property PlayerMaxHealth")] HRESULT PlayerMaxHealth([out, retval] LONG* pVal);
function getPlayerMaxHealth(ByRef obj)
on error resume next
obj.UpdateData
getPlayerMaxHealth = obj.PlayerMaxHealth
if Err.Number <> 0 then
getPlayerMaxHealth = -1
end if
on error goto 0
end function
'[propget, id(14), helpstring("property PlayerPower")] HRESULT PlayerPower([out, retval] LONG* pVal);
function getPlayerPower(ByRef obj)
on error resume next
obj.UpdateData
getPlayerPower = obj.PlayerPower
if Err.Number <> 0 then
getPlayerPower = -1
end if
on error goto 0
end function
'[propget, id(16), helpstring("property PlayerMaxPower")] HRESULT PlayerMaxPower([out, retval] LONG* pVal);
function getPlayerMaxPower(ByRef obj)
on error resume next
obj.UpdateData
getPlayerMaxPower = obj.PlayerMaxPower
if Err.Number <> 0 then
getPlayerMaxPower = -1
end if
on error goto 0
end function
'[propget, id(20), helpstring("property AdventurerLevel")] HRESULT AdventurerLevel([out, retval] LONG* pVal);
function getAdventurerLevel(ByRef obj) '//Returns the Player's Adventurer Level
on error resume next
obj.UpdateData
getAdventurerLevel = obj.AdventurerLevel
if Err.Number <> 0 then
getAdventurerLevel = -1
end if
on error goto 0
end function
'[propget, id(21), helpstring("property ArtisanLevel")] HRESULT ArtisanLevel([out, retval] LONG* pVal);
function getArtisanLevel(ByRef obj) '//Returns the Player's Artisan Level
on error resume next
obj.UpdateData
getArtisanLevel = obj.ArtisanLevel
if Err.Number <> 0 then
getArtisanLevel = -1
end if
on error goto 0
end function
'[propget, id(19), helpstring("property TargetID")] HRESULT TargetID([out, retval] LONG* pVal);
function getTargetID(ByRef obj) '//Returns the Target SpawnID
on error resume next
obj.UpdateData
getTargetID = obj.TargetID
if Err.Number <> 0 then
getTargetID = -1
end if
on error goto 0
end function
'[propget, id(3), helpstring("property MobID")] HRESULT MobID([in] LONG Index, [out, retval] LONG* pVal);
function getMobID(ByRef obj, Index) '//Returns the Mob ID for a given Index
on error resume next
obj.UpdateData
getMobID = obj.MobID (Index)
if Err.Number <> 0 then
getMobID = -1
end if
on error goto 0
end function
'[propget, id(8), helpstring("property MobName")] HRESULT MobName([in] LONG SpawnID, [out, retval] BSTR* pVal);
function getMobName(ByRef obj, SpawnID) '//Returns the Mob Name for a given SpawnID
on error resume next
obj.UpdateData
getMobName = obj.MobName (SpawnID)
if Err.Number <> 0 then
getMobName = "<INVALID>"
end if
on error goto 0
end function
'[propget, id(4), helpstring("property MobX")] HRESULT MobX([in] LONG SpawnID, [out, retval] FLOAT* pVal);
function getMobX(ByRef obj, SpawnID) '//Returns the Mob X for a given SpawnID
on error resume next
obj.UpdateData
getMobX = obj.MobX (SpawnID)
if Err.Number <> 0 then
getMobX = -99999
end if
on error goto 0
end function
'[propget, id(5), helpstring("property MobY")] HRESULT MobY([in] LONG SpawnID, [out, retval] FLOAT* pVal);
function getMobY(ByRef obj, SpawnID) '//Returns the Mob Y for a given SpawnID
on error resume next
obj.UpdateData
getMobY = obj.MobY (SpawnID)
if Err.Number <> 0 then
getMobY = -99999
end if
on error goto 0
end function
'[propget, id(6), helpstring("property MobZ")] HRESULT MobZ([in] LONG SpawnID, [out, retval] FLOAT* pVal);
function getMobZ(ByRef obj, SpawnID) '//Returns the Mob Z for a given SpawnID
on error resume next
obj.UpdateData
getMobZ = obj.MobZ (SpawnID)
if Err.Number <> 0 then
getMobZ = -99999
end if
on error goto 0
end function
'[id(12), helpstring("method FindMob")] HRESULT FindMob([in] BSTR Name, [out,retval] LONG* Index);
function findMob(ByRef obj, MobName) '//Returns the first Mob SpawnID for a given name or -1 if not found
on error resume next
obj.UpdateData
findMob = obj.FindMob (MobName)
if Err.Number <> 0 then
findMob = -1
end if
on error goto 0
end function
'[id(23), helpstring("method FindNextMob")] HRESULT FindNextMob([out,retval] LONG* Index);
function findNextMob(ByRef obj) '//Returns the Next Mob SpawnID for a given name or -1 if not found
on error resume next
obj.UpdateData
findNextMob = obj.FindNextMob
if Err.Number <> 0 then
findNextMob = -1
end if
on error goto 0
end function
'[propget, id(22), helpstring("property MaxIndex")] HRESULT MaxIndex([out, retval] LONG* pVal);
function getMaxIndex(ByRef obj) '//Returns the CURRENT maximum index value of the spawn Indexes
on error resume next
obj.UpdateData
getMaxIndex = obj.MaxIndex
if Err.Number <> 0 then
getMaxIndex = -1
end if
on error goto 0
end function
'[propget, id(24), helpstring("property ZoneName")] HRESULT ZoneName([out, retval] BSTR* pVal);
function getZoneName(ByRef obj)
on error resume next
obj.UpdateData
if Err.Number = 0 then
getZoneName = obj.ZoneName
else
getZoneName = "<INVALID>"
end if
on error goto 0
end function
'[propget, id(25), helpstring("property MobLevel")] HRESULT MobLevel([in] LONG Index, [out, retval] LONG* pVal);
function getMobLevel(ByRef obj, SpawnID) '//Returns the Mob Level for a given Index
on error resume next
obj.UpdateData
getMobLevel = obj.MobLevel (SpawnID)
if Err.Number <> 0 then
getMobLevel = -1
end if
on error goto 0
end function
'[propget, id(26), helpstring("property IsAttacking")] HRESULT IsAttacking([in] LONG Index, [out, retval] VARIANT_BOOL* pVal);
function mobIsAttacking(ByRef obj, SpawnID) '//Returns the true/false if mob is attacking something for a given Index
on error resume next
obj.UpdateData
mobIsAttacking = obj.IsAttacking (SpawnID)
if Err.Number <> 0 then
mobIsAttacking = false
end if
on error goto 0
end function
'[propget, id(29), helpstring("property MobIndex")] HRESULT MobIndex([in] LONG SpawnID, [out, retval] LONG* pVal);
function getMobIndex(ByRef obj, SpawnID) '//Returns the Mob Index for a given ID
on error resume next
obj.UpdateData
getMobIndex = obj.MobIndex (SpawnID)
if Err.Number <> 0 then
getMobIndex = -1
end if
on error goto 0
end function
'[id(30), helpstring("method FindNearestMob")] HRESULT FindNearestMob([in] BSTR Name, [out,retval] LONG* SpawnID);
function findNearestMob(ByRef obj, MobName) '//Returns the Nearest Mob ID for a given name or -1 if not found
on error resume next
obj.UpdateData
findNearestMob = obj.FindNearestMob (MobName)
if Err.Number <> 0 then
findNearestMob = -1
end if
on error goto 0
end function
'[id(31), helpstring("method FindNextNearestMob")] HRESULT FindNextNearestMob([out,retval] LONG* SpawnID);
function findNextNearestMob(ByRef obj) '//Returns the Next Nearest Mob ID for a given name or -1 if not found
on error resume next
obj.UpdateData
findNextNearestMob = obj.FindNextNearestMob
if Err.Number <> 0 then
findNextNearestMob = -1
end if
on error goto 0
end function
'[propget, id(27), helpstring("property MobHealth")] HRESULT MobHealth([in] LONG SpawnID, [out, retval] LONG* pVal);
function getMobHealth(ByRef obj, SpawnID) '//Returns the Mob Index for a given ID
on error resume next
obj.UpdateData
getMobHealth = obj.MobHealth (SpawnID)
if Err.Number <> 0 then
getMobHealth = -1
end if
on error goto 0
end function
'[propget, id(28), helpstring("property MobPower")] HRESULT MobPower([in] LONG SpawnID, [out, retval] LONG* pVal);
function getMobPower(ByRef obj, SpawnID) '//Returns the Mob Index for a given ID
on error resume next
obj.UpdateData
getMobPower = obj.MobPower (SpawnID)
if Err.Number <> 0 then
getMobPower = -1
end if
on error goto 0
end function
02/21/05 07:27:26 PM Looking for 3rd Party Service for services\EQ2Service.Service
02/21/05 07:27:27 PM SCRIPT ERROR: Type mismatch: 'distDiff'
Src: Microsoft VBScript runtime error
Line:68 Error:0 Scode:800a000d
02/21/05 07:27:27 PM Failed to Parse the Script. Check it for errors.