Valhalla Legends Archive

Programming => General Programming => Topic started by: UserLoser on December 06, 2002, 02:35 PM

Title: I feel dumb.
Post by: UserLoser on December 06, 2002, 02:35 PM
Like the subject says, is how I feel.  I just cant get the 0x0F (BNLS_AUTHORIZEPROOF) to work.  I have the server code as the data recieved in the 0x0E.  Then I have a sub, where the 0x0F comes in.  This is where I get stuck, I've tried many different ways to do this.  I was told by someone to try this:

.InsertDWORD BNLSChecksum("mypass", PacketBuf.GetDWORD ServerCode))
.SendBNLSPacket sckBNLS, &HF

What is wrong here?  That is what I was told by someone else, and they said it works, but I just dont see why it doesnt work for me... I have tried atleast 10+ different ways to do this...Could anyone help here?
Title: Re: I feel dumb.
Post by: Yoni on December 13, 2002, 11:08 AM
Sure your password is correct?
Is the BNLSChecksum function in your project?
Title: Re: I feel dumb.
Post by: Noodlez on December 16, 2002, 03:15 PM
first, you are dumb. thx

and it should be
.InsertDWORD BNLSChecksum("mypass", PacketBuf.GetDWORD(ServerCode))
.SendBNLSPacket sckBNLS, &HF
ServerCode should be
Mid(PacketData,1,4) . assuming PacketData doesnt include ID and Length.. if it does then Mid(Data,3,4)
Title: Re: I feel dumb.
Post by: n00blar on December 19, 2002, 02:31 AM
Noodlez, while I may not be an admin here, I think you are acting a little childish and I advise you to grow up! Calling someone dumb because they forgot to insert a '(' is really lame-- its called a typo and I'm sure you have made them before.
Title: Re: I feel dumb.
Post by: Noodlez on December 19, 2002, 05:47 AM
QuoteNoodlez, while I may not be an admin here, I think you are acting a little childish and I advise you to grow up! Calling someone dumb because they forgot to insert a '(' is really lame-- its called a typo and I'm sure you have made them before.
im not calling him dumb because of that, it's an offboard type thing
Title: Re: I feel dumb.
Post by: Grok on December 19, 2002, 07:16 AM
besides, maybe

"first, you are dumb. thx"

was a typo!  maybe he really meant:

"first, you are really dumb. thx"

so next time don't jump to conclusions.

hope this helps,
grok        :P
Title: Re: I feel dumb.
Post by: UserLoser on December 19, 2002, 01:08 PM
doh i was doing all the packet data as the server code :-/ and this really sucks because of ip banned...and i have cable too so...
Title: Re: I feel dumb.
Post by: l)ragon on December 19, 2002, 07:51 PM
Quotedoh i was doing all the packet data as the server code :-/ and this really sucks because of ip banned...and i have cable too so...


Cable IP's do roll now and then aswell.

~l)ragon
Title: Re: I feel dumb.
Post by: Grok on December 20, 2002, 01:20 AM
UserLoser:  if you have static IP, first change that to DHCP before testing.  otherwise, check to see if your ISP will give you a new IP by simply releasing and renewing your DHCP lease.

ipconfig /release
ipconfig /renew

Some ISPs DHCP servers don't automatically recycle the IP just because you released it, so you could end up with same one for entire lease time.  That can be up to 3 days if admin left default lease time in place.
Title: Re: I feel dumb.
Post by: iago. on December 20, 2002, 11:17 AM
hrmm.. try power-cycling your cable modem.  On some ISPs it'll reset your ip address and somebody else will end up screwed.
Title: Re: I feel dumb.
Post by: UserLoser on December 20, 2002, 11:55 AM
nope, it still stays the same. well thanks anyways..
Title: Re: I feel dumb.
Post by: UserLoser on December 20, 2002, 12:10 PM
well back to BNLS 0x0F...i tried what noodlez said, and didnt work...
the packet i recieve is:
07000E9767170B
now is this the packet data?
9767170B
which i have that stored as the servercode, which is what i have as a string, should it be a string or something else?
then i have a authorize sub
Checksum = BNLSChecksum("password", ServerCode)
.insertDWORD Checksum
.SendBNLSPacket sckBNLS, &HF

the checksum should be a string or long or what?, and that checksum comes out to be usually a negative 9 digit long number...
Title: Re: I feel dumb.
Post by: Spht on December 20, 2002, 01:02 PM
Declare the ServerCode as a Long - it's a DWORD.

Quotethe checksum should be a string or long or what?, and that checksum comes out to be usually a negative 9 digit long number...

I think that question answers itself since the BNLSChecksum() function returns a Long.