lolp1 Posted September 29, 2006 Share Posted September 29, 2006 (edited) Ok, I've looked around and couldent find anything, so I decided to post. (Agian, I know...)So I've been working on a Diablo II bot, and I was wondering how I could have it join games I list. Here is what I use now to join a game:Func BnetJoin() If $mode = "Bnet" then$lobby = PixelGetColor(419,453) While $lobby <> 525312 Sleep(50) $lobby = PixelGetColor(419,453) WendMyClick("left", 587, 491)$opengame = PixelGetColor(458,146) While $opengame <> 1580056 Sleep(50) $opengame = PixelGetColor(458,146) Wend Sleep(100)Send($gn)Sleep(800)Send("{TAB}")Sleep(100)Send($pw)Sleep(1000)As you can tell, I am just reading the game from a .ini.. This 'bot' is going to kill a certian boss (alot of them) and I'm looking for a way for the game to read from a list, instead of a hard and paintfull .ini. (it would be hard to list 100+ games in a .ini) Thanks in advanced.EDIT: also, it would need to perform the list in order, and it would help if after the task is done, to delete the last done game. Just need a point in the right direction. (Or maybe even some code snipets:)?) Edited September 29, 2006 by lolp1 Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 29, 2006 Share Posted September 29, 2006 HI, so you want to have a list.txt with let say: game1 game2 game3 and you want to read the list. Try _FileReadToArray() So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
lolp1 Posted September 29, 2006 Author Share Posted September 29, 2006 Thats sort've correct yes. I searched for "FileReadToArray" in the help file and did not find anything. Your idea is right though, except how would I get it to send the keys it reads? Andhow exzactly does the read function work? Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 29, 2006 Share Posted September 29, 2006 Hi, then the func does exactly what you want. What version are you using? #include <file.au3> Dim $aRecords If Not _FileReadToArray("error.log",$aRecords) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf For $x = 1 to $aRecords[0] Msgbox(0,'Record:' & $x, $aRecords[$x]) Next So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
lolp1 Posted September 29, 2006 Author Share Posted September 29, 2006 I'm using beta. I got a little more insight on it now, but how would I make the 'bot' go through the list of 'games' from the file? Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 29, 2006 Share Posted September 29, 2006 Hi, post your complete source. This part loops through the read data For $x = 1 to $aRecords[0] Msgbox(0,'Record:' & $x, $aRecords[$x]) Next So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now