Jump to content

using random numbers/letters


Recommended Posts

hello, i am making a personal bot for diablo 2 and im trying to make a way to make the bot make games. im thinking something like i can make a conf file and it will have a list and at random the bot will choose one of the names from the list and use it. any ideas?

PS: i need passwords for the games to

Edited by sumkid
Link to comment
Share on other sites

hello, i am making a personal bot for diablo 2 and im trying to make a way to make the bot make games. im thinking something like i can make a conf file and it will have a list and at random the bot will choose one of the names from the list and use it. any ideas?

PS: i need passwords for the games to

Random Strings

MsgBox(0,"Random Strings","Lower Case: "&CreateRandomString(5)&@CRLF&"Caps: "&CreateRandomString(5,1))


Func CreateRandomString($Length, $Caps=0)
    $Word=""
    For $i = 1 to $Length
        If $Caps = 0 Then $Character = Chr(Random(97,122,1))
        If Not $Caps = 0 Then $Character = StringUpper(Chr(Random(97,122,1)))
        $Word&=$Character
    Next
    Return $Word
EndFunc

Good luck botting D2, I've seen many try and fail. :)

Link to comment
Share on other sites

I would test once

Func CreateRandomString($Length, $Caps=0)
    Local $Word=""
    For $i = 1 to $Length
        $Word&=Chr(Random(97,122,1))
    Next
    If $Caps = 0 Then Return $Word
    Return StringUpper($Word) 
EndFunc

.... but Paulies UDF does the job

8)

Valuater - I love your scripts! They're like a library of code examples ready to help noobs understand the magic you do. Thanks for the code and slick way of doing this. Its going to come in so handy with a project I've started and PsaltyDS help me get started. As I get closer to having something to share, I'd love your thought and help on my project.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...