• Welcome to Valhalla Legends Archive.
 

help me plz!

Started by Michael, February 21, 2005, 02:37 PM

Previous topic - Next topic

Hdx

Cookie = GetDWORD(Mid(data, 5, 4))
Gets the Cookie. DWORD = 4 Bytes

ClanTag = Replace(StrReverse(Mid(Data, 9, 4)), Chr(&H0), vbNullstring)
Clan tag = DWORD,  In lamence terms a reversed string, that is padded on the right with Chr(&H0) to make it 4 chrs in length.

ClanName = Mid(Data, 13, instr(Mid(Data, 13), Chr(&H0))
A Null terminated string.

Invitor = mid(Data, 14 + Len(ClanName))
Invitor = Left(Invitor, Len(Invitor) - 1)

The vary last string in the packet, and its null terminated so the Left() takes off the last Null chr.

Umm I wrote this in about 15 seconds and it isnt tested.
~-~(HDX)~-~


Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

Michael

#16
       
        Case &H79
        Dim clantag As String
        Dim cookie As String
        Dim Invitor As String
        Dim clanname As String
cookie = GetDWORD(Mid(data, 5, 4))
rtbAdd cookie & vbNewLine, vbYellow
clantag = Replace(Mid(data, 9, 4), Chr(&H0), vbNullString)
clantag = StrReverse(clantag)
rtbAdd clantag & vbNewLine, vbYellow
clanname = Mid(data, 13)
rtbAdd clanname & vbNewLine, vbYellow
Invitor = Mid(data, 15)
rtbAdd Invitor & vbNewLine, vbYellow

        Dim buttonaccept As String
        buttonaccept = MsgBox("accept clan invite", vbYesNo)
        If buttonaccept = vbYes Then
        InsertDWORD GetDWORD(Mid(data, 5, 4))
        InsertDWORD GetDWORD(Replace(Mid(data, 9, 4), Chr(&H0), vbNullString))
        InsertNTString ""
        InsertNTString Invitor
        InsertBYTE &H6
        SendPacket &H79
        rtbAdd "clan invite accepted" & vbNewLine, vbYellow
        End If

This is what i have come up with but it dosent work.i have tried many different
also this is what it shows me in the rtbchat as response

[19:37:54] <MiKe[Vc]@USWest> `invite mike1[vc]
[19:38:03] <MiKe@USWest> `invite mike1[vc]
[19:38:04] 139940
[19:38:04] vc
[19:38:04] vc[19:38:04] [19:38:04] clan invite accepted
[19:38:04] <1[Vc]Ops> Successfully sent invite to mike1[vc]

Michael


Case &H79
          Dim cTag As Long, Cookie As Long, Invitor As String, cName As String
          Cookie = GetDWORD(Mid(data, 5, 4))
           
          cTag = GetDWORD(Mid(data, 9, 4))
          data = Mid(data, 13)
          cName = Split(data & Chr(&H0), Chr(&H0))(0)
          Invitor = Split(data & Chr(&H0) & Chr(&H0), Chr(&H0))(1)
        rtbAdd Cookie & vbNewLine, vbYellow
        rtbAdd Invitor & vbNewLine, vbYellow
        rtbAdd cTag & vbNewLine, vbYellow
              InsertDWORD Cookie
              InsertDWORD cTag
              InsertNTString Invitor
              InsertBYTE IIf(MsgBox("accept clan invite", vbYesNo) = vbYes, &H6, &H4)
              SendPacket &H79
              rtbAdd "clan invite accepted" & vbNewLine, vbYellow

Thx to hdx for alot of help! and part of the code :D