Valhalla Legends Forums Archive | Battle.net Bot Development | help me plz!

AuthorMessageTime
-MichaeL-
[code]        rtbAdd "clan invite recived" & vbNewLine, vbYellow
        rtbAdd StrToHex(data) & vbNewLine, vbYellow
        profileend = Mid(data, 8, Len(data))
        rtbAdd profileread & vbNewLine, vbYellow
        Dim buttonaccept As String
        buttonaccept = MsgBox("accept clan invite", vbYesNo)
        If buttonaccept = vbYes Then
        SendPacket &H6
        rtbAdd "clan invite accepted" & vbNewLine, vbYellow
        End If
[/code]

When i press yes to accept the clan invite i get ipbanned, why dosent this work.
February 21, 2005, 8:37 PM
UserLoser.
Just a random guess, but sending packet 0x06 (SID_STARTVERSIONING) is totally out of place, and has nothing to do with accepting clan invitations.  Also it seems you're sending it with no data
February 21, 2005, 8:52 PM
-MichaeL-
i am so confused....
i am guessing that i dont send &H6 i sent something else and that [code][14:54:56] clan invite recived
[14:54:56]  FF 79 1A 00 B7 2A 03 00 00 00 57 44 43 6C 61 6E 20 44 57 00 44 57 5B 31 5D 00
[/code] is how i get the info for the clantag and all that?
February 21, 2005, 8:56 PM
-MichaeL-
[code]        rtbAdd "clan invite recived" & vbNewLine, vbYellow
        rtbAdd StrToHex(data) & vbNewLine, vbYellow
        profileend = Mid(data, 8, Len(data))
        rtbAdd profileread & vbNewLine, vbYellow
        Dim buttonaccept As String
        buttonaccept = MsgBox("accept clan invite", vbYesNo)
        If buttonaccept = vbYes Then
        InsertBYTE &H6
        SendPacket &H76
        rtbAdd "clan invite accepted" & vbNewLine, vbYellow
        End If[/code]
thats my code now and i still get ipbanned
February 21, 2005, 9:02 PM
-MichaeL-
opps :(
ok [code]
        rtbAdd "clan invite recived" & vbNewLine, vbYellow
        rtbAdd StrToHex(data) & vbNewLine, vbYellow
        profileend = Mid(data, 8, Len(data))
        rtbAdd profileread & vbNewLine, vbYellow
        Dim buttonaccept As String
        buttonaccept = MsgBox("accept clan invite", vbYesNo)
        If buttonaccept = vbYes Then
        InsertBYTE &H6
        SendPacket &H79
        rtbAdd "clan invite accepted" & vbNewLine, vbYellow
        End If
[/code]
dosent accept but does disconnect me but i don't get ip banned :D i still need more help :(
February 21, 2005, 9:07 PM
QwertyMonster
[quote author=QwertyMonster link=topic=10659.msg100874#msg100874 date=1109020010]
Get rid of ur &H6, and just put &H79 then try
[/quote]


I can still see a &H6 in there ^_^
February 21, 2005, 9:11 PM
-MichaeL-
Still don't work but from what i have gathered you need to send insertbyte &H6 as the accept but i think you need other data.
February 21, 2005, 9:14 PM
QwertyMonster
Oh ok, i havent done much work on clan invites ect...

Try searching the forum, or www.google.com  :P

Well atleast i stopped you from getting ipbanned  ;D
February 21, 2005, 9:16 PM
-MichaeL-
can someone show me how to phrase the data and reply correctly please?
February 21, 2005, 9:31 PM
UserLoser.
[quote author=-MichaeL- link=topic=10659.msg100871#msg100871 date=1109019763]
[code]        rtbAdd "clan invite recived" & vbNewLine, vbYellow
        rtbAdd StrToHex(data) & vbNewLine, vbYellow
        profileend = Mid(data, 8, Len(data))
        rtbAdd profileread & vbNewLine, vbYellow
        Dim buttonaccept As String
        buttonaccept = MsgBox("accept clan invite", vbYesNo)
        If buttonaccept = vbYes Then
        InsertBYTE &H6
        SendPacket &H76
        rtbAdd "clan invite accepted" & vbNewLine, vbYellow
        End If[/code]
thats my code now and i still get ipbanned
[/quote]

0x76 id is used to quit a clan... and there's no client->server message for it.  This is on BnetDocs like you even told me & pasted the format used on AIM...

http://bnetdocs.valhallalegends.com/content.php?Section=m&Code=378
February 21, 2005, 10:30 PM
-MichaeL-
[code]        rtbAdd "clan invite recived" & vbNewLine, vbYellow
        rtbAdd ToHex(data) & vbNewLine, vbYellow
        rtbAdd GetWORD(Mid(data, 5, 2)) & vbNewLine, vbYellow
        rtbAdd HexToStr(data) & vbNewLine, vbYellow
        Dim buttonaccept As String
        buttonaccept = MsgBox("accept clan invite", vbYesNo)
        If buttonaccept = vbYes Then
        InsertBYTE &H6
        SendPacket &H79
        rtbAdd "clan invite accepted" & vbNewLine, vbYellow
        End If[/code]

Fixed that little bug but i still need to no how to turn the data into the info i need.

i am guessing that i need something like
[code]
insertDWord cookie (i dont no how to find out what the cookie is from the data)
insertDWord clantag (dont understand how to get it out of the data tho.)
insertNTString person_inviting (dont no how to get this either)
insertBYTE &H6
sendpacket &H79
[/code]
would be how to do it. can someone help me phrase the data into that?

So how can i get the info needed from [code]FF 79 1A 00 B7 2A 03 00 00 00 57 44 43 6C 61 6E 20 44 57 00 44 57 5B 31 5D 00[/code]?
February 21, 2005, 10:49 PM
UserLoser.
All that is in the packet you received...
February 21, 2005, 10:55 PM
-MichaeL-
[quote author=UserLoser link=topic=10659.msg100898#msg100898 date=1109026517]
All that is in the packet you received...
[/quote]
How can i turn that into the info tho... :(
February 21, 2005, 11:13 PM
KkBlazekK
Read bnetdocs on receiving that packet..
February 21, 2005, 11:19 PM
-MichaeL-
(DWORD) Cookie
(DWORD) Clan Tag
(STRING) Clan Name
(STRING) Inviting Leader
Ya but how do i make the data come out into works and stuff?
February 21, 2005, 11:21 PM
HdxBmx27
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)~-~

February 21, 2005, 11:44 PM
-MichaeL-
[code]       
        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
[/code]
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
[code]
[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]
[/code]
February 22, 2005, 1:33 AM
-MichaeL-
[code]
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
[/code]
Thx to hdx for alot of help! and part of the code :D
February 22, 2005, 3:20 AM

Search