Post Reply Home » Forums » Vanguard » VGExtreme General Discussion

Vanguard Bot - VGExtreme Scritping Service : VGExtreme General Discussion

Posted: February 20th, 2007
User avatar
Total Posts:272 Joined:2004
I really do wonder if this is cause I am using an amd64 cpu. Back in the eq2 days for me I did have to use this fix to get the whole radar thing to work (which was a replacement dll for amd's) http://www.taultunleashed.com/phpbb2/ab ... file_.html

Unfortunately I am not building a new pc till after my wedding in july, which is when I am likely going back to intel.
Posted: February 20th, 2007
User avatar
Total Posts:199 Joined:2005
OH... What about your DNS?
DOes the patch engine work off DNS or IP's Perhaps it s handing on a DNS translation?

Try using another name server?

IM" just really reaching now for ya mate.
Posted: February 20th, 2007
tault_stigma
I need a little help here...

I'm trying to get exhume to run a basic TCP server so it can forward functions to my other autoit script until exhuem is made autoit compatible (which I hear will take 1-2 weeks at minimum), so im trying this as a temporary fix.

The problem is that I get winsock errors. It seems as if its not registered to the system. Ive tried manually regging (regsvr32) it,and ive tried regging it via vbscript, but it still continues to not recognize winsock! Perhaps the winsock fiels I've donwloaded just aren't the correct one to use somehow? ...

Here is the code, please give it a once-over

Code: Select all

'
' SERVER WINSOCK VBSCRIPT
'
' NOTES: (FEBRUARY 20, 2007)
'
' Delays are required where they are located,
' or it sends data too quick, and errors.
' 
' Listens on Port 80 by default.
' Port is user setting.
'
' Creates a Log file.
' c:\WSServer.log
'
' if winsock not registered it will try to register
' if winsock ocx is in path it will register
' if cannot register it will error and quit
'
' server listens for connection from client
' server Receives connection from client
' server checks data received from client
' server sends reply to client if data valid
' server closes whether valid or invalid
' server listens for more connections
'
' this only receives basic text, no long essays or files.
' for that, it would require some minor but required changes.
'

Option Explicit
Dim winsock

'****** CHANGE THESE SETTINGS *********

Const LocalPort            = 80
Const DataToReceive        = "Test"

'***************************************

Const sckClosed            = 0 '// Default. Closed 
Const sckOpen              = 1 '// Open 
Const sckListening         = 2 '// Listening 
Const sckConnectionPending = 3 '// Connection pending 
Const sckResolvingHost     = 4 '// Resolving host 
Const sckHostResolved      = 5 '// Host resolved 
Const sckConnecting        = 6 '// Connecting 
Const sckConnected         = 7 '// Connected 
Const sckClosing           = 8 '// Peer is closing the connection 
Const sckError             = 9 '// Error 

MsgBox "Start Server"
WriteData Now & " - Server Started"

'********* CREATE & CONNECT **********

'// CREATE WINSOCK
On Error Resume Next
Set winsock = Wscript.CreateObject("MSWINSOCK.Winsock", "winsock_")
If Err.Number <> 0 Then
    '// REGISTER WINSOCK IF ERROR
    WriteData Now & " - Registering Winsock"  '// log action
    Set winsock = Nothing
    If RegWinsock = False Then
        '// REGISTER ERROR SO EXIT
        MsgBox "Winsock Object Error!" & vbCrLf & "Script will exit now."
        WriteData Now & " - Winsock Object Error."
        WScript.Quit
    Else
        Set winsock = Wscript.CreateObject("MSWINSOCK.Winsock", "winsock_")
    End If
End If
On Error Goto 0

'// LISTEN NOW
winsock.LocalPort = LocalPort
ServerListen

'********* WAIT FOR EVENTS ***********

'// MAIN DELAY - INFINITE LOOP

'// SOCKET ERROR RAISES WINSOCK ERROR SUB
while winsock.State <> sckError
    WScript.Sleep 200
Wend

'// JUST INCASE
ServerClose()

'********** WINSOCK EVENTS ***********

'// WINSOCK CONNECT REQUEST // CONNECTED
Sub winsock_ConnectionRequest(requestID)
    If winsock.State <> sckClosed Then
        winsock.Close
    End If
    winsock.Accept requestID
    WriteData Now & " - Server Requested ID: " & requestID
    WScript.Sleep 1000  '// REQUIRED OR ERRORS
End Sub

'// WINSOCK DATA ARRIVE // GET DATA AND SEND REPLY
Sub winsock_dataArrival(bytesTotal)
    Dim strData: strData = ""
    WriteData Now & " - Server Data Arrives"
    winsock.GetData strData, vbString
    WriteData Now & " - Server Received: " & strData
    Select Case CStr(strData)
        Case DataToReceive
            winsock.SendData DataToReceive
            WriteData Now & " - Server Sent Reply: " & DataToReceive
        Case Else
            WriteData Now & " - Invalid Data Received"
    End Select
    WScript.Sleep 2000  '// REQUIRED OR ERRORS
    ServerListen()
End Sub

'// WINSOCK ERROR // ERROR SO EXIT
Sub winsock_Error(Number, Description, SCode, Source, HelpFile, HelpContext, CancelDisplay)
    MsgBox "Server Error " & Number & vbCrLf & Description
    WriteData Now & " - Server Error: " & Number & ". " & Description
    ServerClose()
End Sub

'******** COMMON PROCEDURES **********

'// LISTEN FOR REQUEST
Sub ServerListen()
    If winsock.State <> sckClosed Then
        WriteData Now & " - Server Closed (Listen)"
        winsock.Close
    End If
    WriteData Now & " - Server Listen"
    winsock.Listen
End SUb

'// EXIT SCRIPT
Sub ServerClose()
    If winsock.state <> sckClosed Then winsock.Close
    Set winsock = Nothing
    WriteData Now & " - Server Closed."
    Wscript.Quit
End SUb

'// CREATE LOG ENTRY
Function WriteData(Data)
    Dim fso, file
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set file = fso.OpenTextFile("C:\WSServer.log", 8, True)
    file.write Data & vbCrLf
    file.Close
    Set file = Nothing
    Set fso = Nothing
End Function

'******** REGISTER WINSOCK **********

Function RegWinsock()
    Dim RegCmd, RegOcx, TmpOcx
    If CheckObject("MSWINSOCK.Winsock", "winsock_") Then
        RegWinsock = True
        Exit Function
    End If
    RegOcx = SystemDirectory & "\MSWINSCK.OCX"
    TmpOcx = ScriptPath & "\MSWINSCK.OCX"
    RegCmd = "regsvr32.exe /s " & RegOcx
    If Not FileExists(TmpOcx) Then Exit Function
    If FileCopy(TmpOcx, RegOcx) = False Then Exit Function
    If FileExists(RegOcx) = False Then Exit Function
    If ShellCmd(RegCmd) = False Then Exit Function
    If CheckObject("MSWINSOCK.Winsock", "winsock_") Then
        RegWinsock = True
    End If
End Function

'// SHELL COMMAND PROMPT
Function ShellCmd(ByVal pCmd)
    Dim ShellWsck, Rtrn
    On Error Goto 0: On Error Resume Next
    Set ShellWsck = CreateObject("WScript.Shell")
    Rtrn = ShellWsck.Run(pCmd, 0, True)
    If Rtrn = 0 Then
        If Err = 0 Then ShellCmd = True
    End If
    Set ShellWsck = Nothing
    On Error Goto 0
End Function

'// GET THIS SCRIPT PATH
Function ScriptPath()
    On Error Goto 0: On Error Resume Next
    ScriptPath = CreateObject("Scripting.FileSystemObject")._
        GetParentFolderName(Wscript.ScriptFullName)
    On Error Goto 0
End Function

'// GET WINDOWS SYSTEM DIRECTORY
Function SystemDirectory()
    Dim objFso
    On Error Goto 0: On Error Resume Next
    Set objFso = CreateObject("Scripting.FileSystemObject")
        SystemDirectory = objFso.GetSpecialFolder(1)
    Set objFso = nothing
    On Error Goto 0
End Function

'// COPY A FILE
Function FileCopy(ByVal pFile1, ByVal pFile2)
    Dim objFso
    On Error Goto 0: On Error Resume Next
    Set objFso = CreateObject("Scripting.FileSystemObject")
        If objFSO.FileExists(pFile2) Then
            If Err = 0 Then FileCopy = True    
            Exit Function
        End If
        If objFSO.FileExists(pFile1) Then
            objFso.CopyFile pFile1, pFile2
            If Err = 0 Then FileCopy = True
        End If
    Set objFso = nothing
    On Error Goto 0
End Function

'// FILE EXISTS
Function FileExists(ByVal pFile)
    Dim objFSO
    On Error Goto 0: On Error Resume Next
    Set objFSO = CreateObject("Scripting.FileSystemObject")
        If objFSO.FileExists(pFile) = True Then
            If Err = 0 Then FileExists = True
        End If
    Set objFSO = Nothing
    On Error Goto 0
End Function

'// CHECK IF OBJECT IS REGISTERED
Function CheckObject(ByVal pObj, ByVal pAram)
    Dim objTemp
    On Error Goto 0: On Error Resume Next
    If Len(pAram) <> 0 Then
        Set objTemp = WScript.CreateObject(pObj, pAram)
    Else
        Set objTemp = CreateObject(pObj)
    End If
    If Err = 0 Then CheckObject = True
    Set objTemp = Nothing
    On Error Goto 0
End Function
Can anyone help me? Do I need to install some kind of software development package to get winsock registered to my system properly?
Posted: February 20th, 2007
User avatar
Total Posts:272 Joined:2004
sinshar wrote:OH... What about your DNS?
DOes the patch engine work off DNS or IP's Perhaps it s handing on a DNS translation?

Try using another name server?

IM" just really reaching now for ya mate.
Yea I realize that bro and I appreciate it. But honestly if exhume loads and works, so should vgextreme. It's something in vgextreme that doesn't work with my setup or the dll.
Posted: February 20th, 2007
User avatar
Total Posts:199 Joined:2005
Hmmm Got me...
Posted: February 20th, 2007
User avatar
Premium
Total Posts:6718 Joined:2004
djvj, all that window is is a IE (or your default browser) that is looking at:

http://www.xunleashed.com/XUnleashed/login.htm

So load up your default browser, (the same one that VGE tries to load) and surf to that address.

_________________
Use Search first, ask questions later!
Posted: February 20th, 2007
User avatar
Total Posts:272 Joined:2004
That link doesn't work wyvern:

Not Found

The requested URL /XUnleashed/login.htm was not found on this server.
Posted: February 20th, 2007
tault_stigma
djvj wrote:That link doesn't work wyvern:

Not Found

The requested URL /XUnleashed/login.htm was not found on this server.
NO that dosnt seem to work for me either, but in my case it shows the login just fine for when I log into Exhume/VGE

-Stigma
Posted: February 20th, 2007
User avatar
Premium
Total Posts:6718 Joined:2004
whoops.. I guess I should have C+P'd it...

http://www.taultunleashed.com/XUnleashed/login.htm

_________________
Use Search first, ask questions later!
Posted: February 20th, 2007
tault_stigma
wyvernx wrote:whoops.. I guess I should have C+P'd it...

http://www.taultunleashed.com/XUnleashed/login.htm
That one works fine for me... So if that one dosn't load for you, you know you have an internet-related problem at some level.

-Stigma
Posted: February 20th, 2007
User avatar
Total Posts:272 Joined:2004
It loads in IE. Still not in vgextreme though. And nothing happens when I click login in IE either. I guess cause you are not suppose to login using IE....
Posted: February 20th, 2007
chooch
forgive my ignorance, can this be used as a leveling bot?
Posted: February 20th, 2007
User avatar
Total Posts:272 Joined:2004
chooch wrote:forgive my ignorance, can this be used as a leveling bot?
Yes if you make one or wait until a good one is released.
Posted: February 20th, 2007
tault_stigma
chooch wrote:forgive my ignorance, can this be used as a leveling bot?
Not by itself no, but it is a very solid foundation to BUILD a bot upon. If you canæt do that yourself, then eventually there will be some released form we guys who do :)

-Stigma
Posted: February 21st, 2007
User avatar
Premium
Total Posts:6718 Joined:2004
Ok I've got a new version ready I'm going to push here in a few.. Added a patcher to grab the latest version, added some navigation API's, fixed a bunch of bugs.

Anyway, I'll have it all out here in a while...

Still to come is a drawing API's to draw onto a transparent window to make a true radar.

I'm going also see about double buffering TextOut api so you can draw to a transparent window without flickering too.. ;)

_________________
Use Search first, ask questions later!
Ready to join the community? Click here and see all of the benefits!
blue large dotWho is online
Users browsing this forum: No registered users and 13 guests
Post Reply