|
|
|
Page 1 of 2 |
[ 26 posts ] |
1, 2 Next
|
 Old EQ2Service Thread for version 1.1 : EverQuest 2 Premium Discussions
|
|
Posted: February 10th, 2005, 2:06 pm
|
|
|
|
sirusdv
Total Posts: 19
Location: Seattle, WA
Joined: May 1st, 2004, 4:00 am
sirusdv's Reps: 0
|
Hey wyvernx, great job with this besides the function definition typo
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))): 'function getPlayerHealth(ByRef obj) //Returns the Player's Health 'function getPlayerMaxHealth(ByRef obj) //Returns the Player's Max Health 'function getPlayerHealth(ByRef obj) //Returns the Player's Power 'function getPlayerMaxHealth(ByRef obj) //Returns the Player's Max Power
|
|
|
|
|
Posted: February 11th, 2005, 7:49 am
|
|
|
|
joreallean
Total Posts: 98
Location: Minneapolis, MN
Joined: May 1st, 2004, 4:00 am
joreallean's Reps: 0
|
Should be
'function getPlayerPower(ByRef obj) //Returns the Player's Power
'function getPlayerMaxPower(ByRef obj) //Returns the Player's Max Power
|
|
|
|
|
Posted: February 12th, 2005, 11:42 pm
|
|
|
|
wyvernx
Total Posts: 6718
Joined: May 1st, 2004, 4:00 am
wyvernx's Reps: 21
|
Added TONS of new API calls.
This really opens the door.
'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 getPlayerAdventurerLevel(ByRef obj) //Returns the Player's Adventurer Level
'function getPlayerArtisanLevel(ByRef obj) //Returns the Player's Artisan Level
'function getTargetIndex(ByRef obj) //Returns the Target Index
'function getMobID(ByRef obj, Index) //Returns the Mob ID for a given Index
'function getMobName(ByRef obj, Index) //Returns the Mob Name for a given Index
'function getMobX(ByRef obj, Index) //Returns the Mob X for a given Index
'function getMobY(ByRef obj, Index) //Returns the Mob Y for a given Index
'function getMobZ(ByRef obj, Index) //Returns the Mob Z for a given Index
'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 getMaxIndex(ByRef obj) //Returns the CURRENT maximum index value of the spawn Indexes
'function getZoneName(ByRef obj) //Returns the Zone Name
As always, get it in the downloads.
|
|
|
|
|
Posted: February 13th, 2005, 4:15 am
|
|
|
|
richyrich
richyrich's Reps:
|
Do harvestable things show up as MOBS? If so, I was thinking of building a harvest bot into MegaBot since all the main logic is in there. I"ll have to see what you did in your harvest bot.
|
|
|
|
|
Posted: February 13th, 2005, 8:25 am
|
|
|
|
richyrich
richyrich's Reps:
|
Wyv,
These 2 don't seem to be working:
function getPlayerAdventurerLevel(ByRef obj) //Returns the Player's Adventurer Level
function getPlayerArtisanLevel(ByRef obj) //Returns the Player's Artisan Level
Rich
|
|
|
|
|
Posted: February 13th, 2005, 8:35 am
|
|
|
|
richyrich
richyrich's Reps:
|
On your X, Y, Z, Heading functions, can you update them to be -1 instead of 0 on error.
0 deg could be a valid heading, but all negatives are easy to tell invalid.
Rich
|
|
|
|
|
Posted: February 13th, 2005, 8:48 am
|
|
|
|
richyrich
richyrich's Reps:
|
Wyv - any luck on finding the TARGET Health & MaxHealth and Pet?
I am currently read the screen for all healths, which works just fine, but all the darn Window X,Y decoding is a pain, so if I had the Target & Pet health I wouldn't have to screen scrape them anymore.
Rich
|
|
|
|
|
Posted: February 13th, 2005, 1:22 pm
|
|
|
|
wyvernx
Total Posts: 6718
Joined: May 1st, 2004, 4:00 am
wyvernx's Reps: 21
|
Gah. There is a syntax in the vbs file. Please put a " (quote) after the "<INVALID in the getPlayerName.
Rich, yep, I thought about that. Next Release i'll put those changes in.
Yes resources show up as mobs. I'm adding in an Service.Attackable function that will return true/false if can be attacked.
Also Service.MobLevel and Service.IsAttacking to avoid targets that are already being attacked/Locked.
_________________
Use Search first, ask questions later!
|
|
|
|
|
Posted: February 15th, 2005, 11:14 am
|
|
|
|
eqguru
eqguru's Reps:
|
Will this work with perl scripting? Seems you have it requiring a vbs
One of these days I'm gonna have to learn vb, but I'm holding out on principle 
|
|
|
|
|
Posted: February 15th, 2005, 12:52 pm
|
|
|
|
wyvernx
Total Posts: 6718
Joined: May 1st, 2004, 4:00 am
wyvernx's Reps: 21
|
Yes just the sample script is in vbs. It will run on perl.
_________________
Use Search first, ask questions later!
|
|
|
|
|
Posted: February 15th, 2005, 8:09 pm
|
|
|
|
chaple
chaple's Reps:
|
Why does my service not seem to update when I zone and also the getMaxIndex() call return -1 all the time?
Is their anyway to enumerate the list?
I.E. force a reload from memory and dump?
The reason I ask this is cause I've managed to get a showeq type of system up where I have the listing being echo'd to another machine. The problem I have is that I started in qey harbor and even though I zoned it's not updating the data in the listing.
Any Ideas?
|
|
|
|
|
Posted: February 15th, 2005, 8:16 pm
|
|
|
|
wyvernx
Total Posts: 6718
Joined: May 1st, 2004, 4:00 am
wyvernx's Reps: 21
|
Sounds like another bug to add to the list.
_________________
Use Search first, ask questions later!
|
|
|
|
|
Posted: February 15th, 2005, 8:28 pm
|
|
|
|
wyvernx
Total Posts: 6718
Joined: May 1st, 2004, 4:00 am
wyvernx's Reps: 21
|
Very nice, are ya gonna share it?
_________________
Use Search first, ask questions later!
|
|
|
|
|
Posted: February 15th, 2005, 8:37 pm
|
|
|
|
chaple
chaple's Reps:
|
Well, sure...
logFilename = "C:\seq.txt" 'debug log file
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 SendMessage(Lobjudp,sMsg)
call Lobjudp.Create ("172.16.254.255",8000,sMsg)
Lobjudp.SendMessage
sleep(60)
end function
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")
Sleep 5000
while 1=1
writeLogLine("Creating UDP Object")
dim objudp
set objudp = createobject ("UDP.UDP.Server")
dim sPlayerInfo
sPlayerInfo = "P," & cstr(getZoneName(oEQ2Service))
sPlayerInfo = sPlayerInfo & "," & getPlayerName(oServiceObject)
sPlayerInfo = sPlayerInfo & "," & getPlayerHeading(oServiceObject)
sPlayerInfo = sPlayerInfo & "," & getPlayerX(oServiceObject)
sPlayerInfo = sPlayerInfo & "," & getPlayerY(oServiceObject)
sPlayerInfo = sPlayerInfo & "," & getPlayerZ(oServiceObject)
sPlayerInfo = sPlayerInfo & "," & getPlayerHealth(oServiceObject)
sPlayerInfo = sPlayerInfo & "," & getPlayerMaxHealth(oServiceObject)
sPlayerInfo = sPlayerInfo & "," & getPlayerPower(oServiceObject)
sPlayerInfo = sPlayerInfo & "," & getPlayerMaxPower(oServiceObject)
call SendMessage(objudp,sPlayerInfo)
dim NumOfFoundEmpty
NumOfFoundEmpty = 0
for counter = 1 to 1000 'getMaxIndex(oEQ2Service)
oServiceObject.UpdateData
MobInfo = getMobID(oEQ2Service,counter)
if getMobName(oServiceObject,counter) <> "" then
NumOfFoundEmpty = 0
MobInfo = MobInfo & "," & getMobName(oServiceObject,counter)
MobInfo = MobInfo & "," & getMobX(oServiceObject,counter)
MobInfo = MobInfo & "," & getMobY(oServiceObject,counter)
MobInfo = MobInfo & "," & getMobZ(oServiceObject,counter)
call SendMessage(objudp,MobInfo)
else
NumOfFoundEmpty = NumOfFoundEmpty +1
end if
if NumOfFoundEmpty >5 then
counter = 1001
end if
next
wend
set oServiceObject= nothing
set objudp = nothing
|
|
|
|
|
Posted: February 15th, 2005, 8:43 pm
|
|
|
|
chaple
chaple's Reps:
|
Thats the code I'm using right now to send the data to the other machine. Basically I wrote a udp object that I'm able to call over and over and it sends a broadcast to another machine which then adds it to a listing, haven't gotten to drawing it all out yet. But I'm getting there.
But like I said my service isn't updating, if you could do one of two things it would be appreciated.
One, Allow me to enumerate the collection or...... if you really feel like having fun....
Include the following code in your harness so that I don't have to use a dll I wrote to send it and X-Unleashed handles it all.
That way I could possible say...
Send(Objects.enumerate) or something like that. This code works great btw.
Chaple
BTW, to read the udp is a much bigger pain that sending it. LOL
Imports System.Net
Imports System.Net.Sockets
Namespace UDP
Public Class Server
Private _NetIPAddress As String
Private _Port As Int16
Public BroadcastMessage As String
Private myClient As New System.Net.Sockets.UdpClient
Private _Info As Byte()
'If this constructor is used, all you need to do is call SendMessage
Public Sub Create(ByVal IP_Address As String, ByVal PortNumber As Int16, ByVal Msg As String)
_NetIPAddress = IP_Address
_Port = PortNumber
BroadcastMessage = Msg
End Sub
'If this constructor is used, make sure you set the BroadcastMessage
Public Sub Create(ByVal IP_Address As String, ByVal PortNumber As Int16)
_NetIPAddress = IP_Address
_Port = PortNumber
End Sub
Public Sub SendMessage()
_Info = System.Text.Encoding.UTF8.GetBytes(BroadcastMessage)
Dim EndPoint As New IPEndPoint(IPAddress.Parse(_NetIPAddress), _Port)
Try
myClient.Send(Me._Info, Me._Info.Length, EndPoint)
Catch ex As System.Net.Sockets.SocketException
End Try
End Sub
End Class
End Namespace
|
|
|
|
|
Who is online |
|
Users browsing this forum: No registered users and 150 guests |
|
|
|