• Welcome to Valhalla Legends Archive.
 

0x71 C => S

Started by vuther.de, March 16, 2005, 05:07 PM

Previous topic - Next topic

QwertyMonster

You think its bad commenting? That is extremely good. And since i wasnt 100% sure on it first round, and now with comments i understand it.

Good job Hdx! :-*

Hdx

You are CORRECT. Please dont make this into a bag ass argument, its been descussed to dammen much. The reason I call it a string is that it is the standard charectors fo the americal alphabet. MOST users recongnize that it is readable text. Anyway, YOU ARE CORRECT, it is a 32-bit integer.

Sop off that topic please. As for my commenting, I hate comments :P
~-~(HDX)~-~

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

QwertyMonster

Hdx, you think your a bad commenter, but at start i didnt understand some code,  but after reading the comments i understand it more.

Hdx, Nice commenting! And dont say you cant, cos u can! :P

Networks

hm I told him it was odd for the string to be reversed! bnetdocs is always RIGHT!

Eric

#19
Quote from: HdxBmx27 on March 17, 2005, 01:45 PM
Added comments, I am really bad at that as you can see.
Also waists A LOT of space.

QuoteThe clan tag isn't reversed...
When using it as a dword, the string apears reversed. like RATS insted of STAR.
~-~(HDX)~-~

The .GetDWORD() function converts a string into a DWord.  You should not reverse the string before calling this function.  .InsertNonNTString() has infected you.

vuther.de

Quote from: QwertyMonster on March 17, 2005, 01:13 PM
Hdx, very nice way! But be sure to put some comments in, as he will just prob copy / paste it. :-\
No, I would learn from it first.

vuther.de

Quote from: inner. on March 17, 2005, 05:05 PM
Quote from: QwertyMonster on March 17, 2005, 01:13 PM
Hdx, very nice way! But be sure to put some comments in, as he will just prob copy / paste it. :-\
No, I would learn from it first.

Edit: I tested it and it adds 1 to each blank spot there is in the tag.

Here's my code:

Private Sub cmdInvite_Click()
Dim ClanTag As String * 4, ClanName As String, strCandidates As String, strNew() As String
Dim I As Integer, intCount As Integer

ClanTag = txtTag.Text
ClanName = txtClanName.Text
   
    For I = 1 To lstMembers.ListItems.Count
    If lstMembers.ListItems.Item(I).Checked Then strCandidates = strCandidates & lstMembers.ListItems.Item(I).Text & vbNullChar
    Next I
    strNew = Split(strCandidates, vbNullChar)
    strCandidates = vbNullString
    For I = 0 To 8
    strCandidates = strCandidates & strNew(I) & vbNullChar
    intCount = intCount + 1
    Next I
    Erase strNew()
    With PBuffer
        .InsertDWORD &H1
        .InsertNTString ClanName
        .InsertNonNTString StrReverse(Replace(ClanTag, Space(1), vbNull))
        .InsertBYTE intCount
        .InsertNonNTString strCandidates
        .sendPacket &H71
    End With
End Sub

Hdx

Quote from: LoRd[nK] on March 17, 2005, 02:38 PM
The .GetDWORD() function converts a string into a DWord.  You should not reverse the string before calling this function.  .InsertNonNTString() has infected you.
Yes yes it has, I am trying to work on my coding habbits. But I am failing in a few areas, I am sorry.
~-~(HDX)~-~

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

vuther.de

Hrm, I cannot get it from adding the 1's when there's a null character in the tag. :(

Hdx

Quote from: inner. on March 17, 2005, 06:05 PM
Hrm, I cannot get it from adding the 1's when there's a null character in the tag. :(
What? Post some packetlogs of what you are doing, or the contects of vareables after stepping through sertian parts of the code.
~-~(HDX)~-~

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

vuther.de

#25
Ok.
Quote
[8:20:53 PM] BNET: Packet sent: 0x71
[8:20:53 PM] Output dump: 0000:  00 00 00 00 6F 68 68 69 00 31 31 76 65 09 4D 61   ....ohhi.11ve.Ma
0010:  6C 69 63 65 31 31 32 00 64 73 66 73 66 64 33 64   lice112.dsfsfd3d
0020:  00 73 64 66 73 64 64 73 33 00 64 73 66 64 73 64   .sdfsdds3.dsfdsd
0030:  33 00 33 64 73 66 64 33 64 00 64 72 73 66 67 66   3.3dsfd3d.drsfgf
0040:  34 00 43 50 72 6F 67 72 61 6D 69 6E 67 00 43 70   4.CPrograming.Cp
0050:  72 6F 67 72 61 6D 65 72 00 51 75 65 6C 6F 73 77   rogramer.Quelosw
0060:  79 65 00                                          ye..............
Didn't LoRd[nK] say to send as DWord?

UserLoser.

Quote from: inner. on March 17, 2005, 06:05 PM
Hrm, I cannot get it from adding the 1's when there's a null character in the tag. :(

You are telling it to replace spaces with ones... so why are you asking here...?

vuther.de

#27
If I try to do Chr(0) or anything else, it gives me back some gay response.

Quote
[8:33:45 PM] BNET: Packet received: 0x71
[8:33:45 PM] Output dump: 0000:  FF 71 0A 00 00 00 00 00 02 00                     ÿq.............
It gives me that directly after I go to create the clan.

When i use:

.InsertDWORD .GetDWORD(Replace(ClanTag, Space(1), Chr(0)))


It works, but on the invitation it just says Clan, no tag.

Here's the packetlog of it:
Quote
[9:09:29 PM] BNET: Packet sent: 0x71
[9:09:29 PM] Output dump: 0000:  00 00 00 00 6F 68 68 69 00 63 65 00 00 09 4D 61   ....ohhi.ec...Ma
0010:  6C 69 63 65 31 31 32 00 64 73 66 73 66 64 33 64   lice112.dsfsfd3d
0020:  00 73 64 66 73 64 64 73 33 00 64 73 66 64 73 64   .sdfsdds3.dsfdsd
0030:  33 00 33 64 73 66 64 33 64 00 43 50 72 6F 67 72   3.3dsfd3d.CProgr
0040:  61 6D 69 6E 67 00 43 70 72 6F 67 72 61 6D 65 72   aming.Cprogramer
0050:  00 51 75 65 6C 6F 73 77 79 65 00 64 72 73 66 67   .Queloswye.drsfg
0060:  66 34 00                                          f4..............
Any suggestions?

Blaze

Why are you replacing spaces with nulls? I thought you were supposed to add spaces at the end so it equaled 4 characters.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

vuther.de

I also tried that, and it didn't work.

|