• 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 - Ante

#1
Brew's real problem is that no matter how he tries to make it, its gonna generate some repeats. He wants it to have no repeats.
Quote from: [RealityRipple] on March 22, 2007, 06:01 PM
like i said, i didn't check it at all. and Int(Rnd * 62) wouldn't allow 62.

Dim randval As Integer
    Randomize
    Do Until randval = 62
        randval = Int(Rnd * 62)
        Debug.Print randval
    Loop
    MsgBox "Done"
run that. it will never end.
oh sorry i forgot that the rounding up is only with CInt

also, just make sure that its int (or Fix)(rnd*11)+4 for the strlen
#2
Quote from: [RealityRipple] on March 17, 2007, 08:39 PM
Here's how I'd do it
Private Function CreateString()
Dim iStrLen   As Integer
Dim iChar     As Integer
Dim I         As Integer
Dim strString As String
    iStrLen = Int(Rnd * 10) + 4
    For I = 1 To iStrLen
        iChar = Int(Rnd * 62)
        If iChar >= 0 And iChar <= 9 Then
            strString = strString & Chr$(iChar + 48)
        ElseIf iChar >= 10 And iChar <= 35 Then
            strString = strString & Chr$(iChar + 55)
        ElseIf iChar >= 36 And iChar <= 61 Then
            strString = strString & Chr$(iChar + 61)
        End If
    Next I
    CreateString = strString
End Function


Note that this isn't fully tested, and I may have made some mistakes some places.
that's extremely inefficient.
it would be better if you replaced all Int's with CInt, since they work faster.

Something better is   iStrLen = Fix(Rnd * 11) + 4, so that 4 and 14 have equal as many chances as the rest of the numbers. (cint rounds UP for 0.5 and higher, but Fix rounds down) Your way makes 4 and 14 half as likely as the other numbers
you could change
iChar = Int(Rnd * 62)
        If iChar >= 0 And iChar <= 9 Then
            strString = strString & Chr$(iChar + 48)
        ElseIf iChar >= 10 And iChar <= 35 Then
            strString = strString & Chr$(iChar + 55)
        ElseIf iChar >= 36 And iChar <= 61 Then
            strString = strString & Chr$(iChar + 61)
        End If
into
     iChar = Fix(Rnd * 62) 'Int would allow 62, which wouldnt generate any character
        If iChar <= 9 Then
            iChar=iChar+48
        ElseIf iChar <= 35 Then
            iChar=iChar+55
        Else
            iChar=iChar+61
        End If
     strString=strString & chr$(iChar+61)

This code isn't much faster, but it does take up less room when compiled and it won't allow the possibility of iChar being 62. It also reduces many times that checking is wasted.
Lastly, after modifying it a bit more, this is a better function:
(This is based on RealityRipple's calculations for which char numbers work)

Private Function CreateString()
Dim iStrLen   As Integer
Dim iChar     As Integer
Dim I         As Integer
Dim strString As String
    iStrLen = Fix(Rnd * 10) + 4
    For I = 1 To iStrLen
        iChar = Fix(Rnd * 62) + 48
        If iChar > 9 And iChar < 36 Then
            iChar = iChar + 7
        Else
            iChar = iChar + 13
        End If
        strString = strString & Chr$(iChar)
    Next I
    CreateString = strString
End Function

You can eliminate the variable I by replacing For I = 1 to iStrLen with Do until Len(strString)=iStrLen and Next I with Loop
#3
General Discussion / Re: keytester
March 12, 2007, 03:55 PM
Quote from: Crafty Craft Mc Pot on March 12, 2007, 03:29 PM
Your Ip only ussally allows what 7 or 8? you wouldn't get (IPBanned, Account closures)  using proxys.

Cupheads keytester is WAY old though, and at this point in time, BNLS is basicly the best way to go but you can just use BNLS once for multiple bots.
of course he used proxies, otherwise he couldnt have loaded 10 bots in the first place...
#4
General Discussion / Re: WTF
March 11, 2007, 08:52 AM
lol...someone needs to fix it...like a mod or admin...
#5
Politics / Re: Political Belief Test
March 06, 2007, 05:12 PM
Quote from: brew on March 01, 2007, 04:04 PM
Your true political self:
You are a

Social Moderate
(43% permissive)


and an...

Economic Liberal
(31% permissive)


You are best described as a:


Democrat


You exhibit a very well-developed sense of Right and Wrong and believe in economic fairness. loc: (-25, -69)

I'm really... a republican....
i guess that shows ur kinda RINO. But that's okay, as long as you vote for republicans :D
#6
Battle.net Bot Development / Re: BNLS
March 05, 2007, 06:07 PM
I see.
#7
Battle.net Bot Development / Re: BNLS
March 05, 2007, 04:52 PM
Quote from: ♥ on March 05, 2007, 04:35 PM
i highly doubt we'll see another change like we saw when battlenet switched over to the 'new log on system'.
and that is why skywing should release his ways. now there are at least 3 supporters
#8
Battle.net Bot Development / Re: BNLS
March 05, 2007, 04:05 PM
Quote from: l2k-Shadow on March 05, 2007, 03:57 PM
Quote from: Ante on March 05, 2007, 03:53 PM
Quote from: brew on March 04, 2007, 07:36 PM
Here's an even better way to take stress off the bnls server: Release the checkrevision code, so formulating the checksum can be done locally.
then hacks can know  how to get past too, and theyd change it again...

or just load the hack after logging in?
that breaks the point of the current CREv system, but either way, once its released, itll be changed.

However, if it isn't released, more and more bots have to rely on BNLS.
#9
Battle.net Bot Development / Re: BNLS
March 05, 2007, 03:53 PM
Quote from: brew on March 04, 2007, 07:36 PM
Here's an even better way to take stress off the bnls server: Release the checkrevision code, so formulating the checksum can be done locally.
then hacks can know  how to get past too, and theyd change it again...
#10
hm...even if God gave you the source code, you can't change it. You are Part of the program. It is extremely difficult for a part of the program to change the structure of itself. It can output source code, but God himself will have to put it in the program for it to actually be used.
#11
Battle.net Bot Development / Re: BNLS
March 04, 2007, 05:05 PM
Quote from: Hdx on February 28, 2007, 09:10 PM
Hehe, And acording to Sky (Long time ago)
It's better to have one connection with all the crevs you need.
What i'll be doing in my future bots is just having one connection to BNLS at all times.
And just passing info for all the clients there there.
Which, I *think* is the best way to go.
~Hdx
if about 10 crevs are sent in one connection, only about 5 crevs are returned.
i tested that myself.
#12
General Discussion / Re: keytester
February 28, 2007, 06:55 PM
#13
Battle.net Bot Development / Re: Syncing
February 26, 2007, 05:16 PM
there is about 1000 values for each mpq for sexp. that adds up to 20000 values for sexp. Star has a similarly high amount of values. unless you have at least 20000 of the 40000 values, it is suggestted that you use BNLS.
#14
Battle.net Bot Development / Re: Syncing
February 25, 2007, 04:29 PM
Currently the most reliable way to get past the lockdown mpqs is with BNLS, because Skywing developped a reliable method that he will not release.

however, if you really need speed and don't want another connection, you can use the caching system that we came up with, and some people have most of the values needed, but they won't release them.
#15
Quote from: rabbit on February 23, 2007, 05:12 PM
The bottom bit is an Ethereal dump.  There's BNCS 0x0b and 0x0c in there, as well as the TCP headers.  Packet 0x0c starts at 003e, and is *identical* to the one I send from my bot.
it isn't identical. notice the char difference in the first few chars of 0x0c for both cases.
however, the hex seem to be identical...