• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Jaquio

#76
Quote from: MyndFyre[vL] on March 03, 2006, 10:34 PM
Quote from: Jaquio on March 03, 2006, 08:04 PM
Could you recommend a good packet logger? And is there a certain fliter I should use to fliter out the packets you need to see?

Ethereal.  Filter: port 6112

Using the filter "port 6112" isn't doing anything at all. Keeps saying invalid, I don't know how to work the filters on here and the online docs don't help much either.
#77
Could you recommend a good packet logger? And is there a certain fliter I should use to fliter out the packets you need to see?
#78
Still isn't working even after I made sure I was sending everything correctly.. What is the difference between 0x34 and 0x40? They both seem to return what you need.. Is there anything at all I can do to help my Realm connection? I cannot seem to get it no matter how many times I try.
#79
Quote from: LordNevar on March 03, 2006, 12:14 AM

     Case &H3E
        String1 = Mid$(Data, 5, 16)
        Server = MakeServer(Mid$(Mid$(Data, 17, 8), 5, 4))
        String2 = Mid$(Data, 29, 48)
        Username = Mid$(Data, 77, Len(Data) - 79)


This code seems like it should work with your MakeServer function, and should coincide with the rest of your buffer class.

Erm, "Mid$(Data, 77, len(data) - 79)" I am not receiving enough data to even start that far.. maybe I am sending a packet wrong before that and am not receiving enough data back to pharse all the information.. Because even using everyones help I understand what everyone is saying and it's still not working at all.. What is the exact Logon Sequence for realm connection anyone know? Because it's not on BNetDocs.
#80
Why does it return numbers like this? "892481592" or "942683958"? :(

All the other clients connect just fine to BNet it's D2DV and D2XP I am having trouble with..

Nevermind, I cannot get this to work at all.. I guess having D2 enabled in my bot isn't a must.. I could just say forget it and try again some other time when I can figure out how to exact all I need from the recv'd data in 0x3E thanks for your help guys.
#81
So, for the realms IP Address I would use the 4th DWord as the ip? Or is there something I am not understanding about ox3E?
#82
Ohh, so everytime I remove a dword or anything, it'll automaticly go onto the next dword or whatever I am removing?
#83
Alright Joe, I have the Debuffer class working now thanks. The problem is now, is that to remove multiple dwords, what would I need to do exactly? Or could you explain how to actually use this class? I understand how to use MakeDword and such.. Just removing them..
#84
Ok.. Again I have another problem that I cannot seem to fix and have no idea where to start so I will just state my problem and you guys can ask to see whatever portion of the code you need.

Problem: When I connect on War3 or TfT sometimes when I join the channel, my username is on the channel twice. It only happens sometimes, I can connect and it'll be there only once. I reconnect and it'll be on there twice I have went through and re-checked my code but something seems to be messing up.. As I said whatever you need to see I will post.
#85
Quote from: Joe on March 02, 2006, 07:16 AM

EDIT -
Have you considered using a Packet Debuffer Class?


How exactly do I use this class? I got errors on the 'GetWord' and 'GetDWord' functions. Anyidea why?

Also, now that MakeServ function you gave me. Gives me an 'Invalid procedure call or argument(Run-time error '5')" at


strIP(1) = Asc(Mid(data, 1, 1))


And at all the other strings.
#86
Nope, never considered using one. When I get home I will try what you have posted and add that Packet Debuffer class to my bot, thanks.
#87
Alright, I decided to add realm connection into my bot and am having alot of trouble with it. How exactly do connect to the realm? I have looked around the forums and seen people talking about extracting the IP from recv'd packet 0x3E then connecting to the realm with it.. I have no idea what I am doing wrong.. Here is my recv'd 0x3E case code.


        Case &H3E
        'Debug.Print "Recv'd:0x3E"

        Server = Mid(data, 17, 8)
        ServIP = Mid(Server, 5, 4)
        AddChat D2Green, "Current realm server: " & MakeServ(ServIP)
       
        Debug.Print "Server:" & Server
        Debug.Print "Server IP:" & ServIP
       
        frmMain.wsRealm.Close
        frmMain.wsRealm.Connect MakeServ(ServIP), 6112


Here is my MakeServ function.


Public Function MakeServ(data As String) As String
    Dim intIP1 As String, intIP2 As String, intIP3 As String, intIP4 As String
   
    intIP1 = CLng("&H" & ToHex(Mid(data, 1, 1)))
        Debug.Print "1:" & intIP1
    intIP2 = CLng("&H" & ToHex(Mid(data, 2, 1)))
        Debug.Print "2:" & intIP2
    intIP3 = CLng("&H" & ToHex(Mid(data, 3, 1)))
        Debug.Print "3:" & intIP3
    intIP4 = CLng("&H" & ToHex(Mid(data, 4, 1)))
        Debug.Print "4:" & intIP4
       
    MakeServer = intIP1 & "." & intIP2 & "." & intIP3 & "." & intIP4
End Function


With that function I get "Run-time error '13': Type mismatch" at "intIP1 = CLng("&H" & ToHex(Mid(data, 1, 1)))" and every other ip. Any ideas as to what I am doing wrong?
#88
Alright thanks for the help, I haven't seen a user still be in channel after they have left. Stealth you have been credited in my source code whenever I realease it. Just so you know, lol.
#89
Quote from: warz on February 27, 2006, 12:53 AM
QuoteOh yea, this only happens when logged in on D2DV or D2XP.

That's a good clue. Remember, when you're logged on diablo 2 (and the expansion) that usernames are prepended with an '*'.

Yes I know, I have the remove all the '*' from the usernames when they enter the channel. When they leave, I have the bot replace the '*' before the usersname.
#90
Grr, I recently noticed that my bot when people leave the channel. Their Username sometimes stays on the list even though their not there.. Anyidea why exactly? Here is the Leave code..


Private Sub JaqBot_OnLeave(ByVal Username As String, ByVal Flags As Long)
'Debug.Print vbCrLf
'Debug.Print "------JaqBot_OnLeave------"
'Debug.Print "Username:" & Username
'Debug.Print "Flags:" & Flags
'Debug.Print "---------------------------"
On Error Resume Next

    With frmMain
        .lstChannel.ListItems.Remove .lstChannel.FindItem(Username).Index
        .lblChannelInfo.Caption = BNET.CurrentChan & " (" & .lstChannel.ListItems.Count & ")"
        .Caption = BotName & " v" & VerNum & " - Connected as " & BNET.Username & " in channel " & BNET.CurrentChan
    End With
   
    AddChat vbLtGreen, Username & " has left the channel."
End Sub


Now their username should go away.. But it's not..


Oh yea, this only happens when logged in on D2DV or D2XP.