I guess this will be my contribution to this forum.
NOTE: u can apply this to any game; i only give cabal as a practical example.
<hr>Append on Jul 26 2007, 16:58<hr> PS: plz don't post i have 2 more to write :P
<hr>Append on Jul 26 2007, 17:06<hr> [AUTO-POT]
We're just gonna take the in game SS and work with it.
[Only registered and activated users can see links. Click Here To Register...]
NOTE: u can apply this to any game; i only give cabal as a practical example.
- Go to [Only registered and activated users can see links. Click Here To Register...] and download AutoIt Full Installation
- Go to [Only registered and activated users can see links. Click Here To Register...] and download SciTE4AutoIt3.exe
- Install them ofc ...
- The most important action u can take is to THINK. I know it's hard for some but try >.< . What do we wanna do ?
- auto-login
- auto-hunt
- auto-pot - because doing all 3 in a single script will just make things complicated and the program to run slower we just gonna make 3 different scripts for each action. And because it could be a pain and most probably ruin everything to run myself all 3 programs the auto-login will just run as the main-brain that will coordinate all.
- The auto-login requires:
- screen shoot will the log-in menu
- screen shoot with the server select menu
- screen shot with the char menu
- in game SS (ScreenShoot)
IMPORTANT: The SS's will be made by pressing the PrintScreen Button on the keyboard. Entering paint, Edit - > Paste and save it as 24-Bit BMP. Another format will just lose from pixel color range and u will do ABSOLUTELY NOTHING since the pixels won't be the same. I'll just use a personally made program that help me to capture the screen and save it with just a button.
PS: Here i'll post the JPG versions of the SS's since they are a lot smaller.
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
- Now after some THINKING i realize that i don't want my program to start log in 1st. Because i will be in front of my PC when running the game and program so i can log it in myself for the 1st time. So i want the program to start when i'm actually in game. For this i need a particular color on an un-movable menu. First color that jumps in it's the GOLD from the Item Shop.
So i go to Start -> All programs -> AutoIt v3 -> AutoIt Window Info ; i right click it and i choose Pin To Start Menu since I'll need it a lot. Now if u press Start on WinXp Desktop u will see it on the top list.
I open it, i also open the ingame SS (i use AcdSee), i Press F to make the pic full screen and i see that the AutoIt Window Info stays on top and that is great since i need it. I do Option -> Magnify in AWI (AutoIt Window Info) and i also chose the Mouse Tab ... and voila i can chose EXACTLY the pixel i want to use.
After i chose it i press Ctrl+Alt+F to freeze the AWI so i can copy the data collected.
[Only registered and activated users can see links. Click Here To Register...] - Now i am actually ready too start my program. I right click the desktop -> New -> AutoIt v3 Script. I right click the file and press Edit. The SciTE will now open the script to be edited.
NOTE: the ; marks a comment. It's just for the user, it's not being used by the program and it's not part of the code. It's just for u to understand it.
Code:HotKeySet("{F12}","startover") ;i allocate to key F12 the function start over ;i do this because when i exit the game the auto-hunt might be too fast for me to stop ; so i'll just press F12 and it will be stopped ; also u can add any key u want F1-12, NumPad0-9 ... and so on startover() ; i call that same function to run so i just won't have to press F12 Func startover();i declare it Endfunc ;and i end it while 1; it will just keep the program in stand by untill the function is called ; useless in our case since we called the function automatically but it's good for u to know it sleep(1000) WEnd
- U have to understand that you'll most probably won't achieve perfection from the 1st try. You'll have to work of your programs to eliminate the flaws. What i show u now it's the result of about 3 tries. Or about what i remember since my Hard-Disc broke :|
Let's get on the function ...
Code:Func startover() while 1 ;because i want it to run over and over again ProcessClose("hunt.exe") ;that's the auto-hunt i'll make later ProcessClose("pot.exe") ;and the auto-pot i'll make later ;ProcessClose it basically just does what it says it closed a process ;what i do this ? because i don't want my auto-hunt and auto-pot to run more that once ;so each time the function initiate it will kill it?s *Sub-Functions* ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; while 1;we start a loop that wait for u to enter the game PixelSearch(964,743,964,743,0xF7E52B,15) ; we look for the GOLD color we;collected . The last number ?15? it?s the pixel color range it can search ;so basically it doesn?t have to be the EXACT pixel If NOT @error Then; PixelSearch color returns @error = 1 if the color ain?t found ;and 0 if the color is found ;NOT @error means @error = 0 ;so if it founds that GOLD pixel it continues Run("pot.exe"); run it Run("hunt.exe") ; run it Mouseclick("left",999,22,1); this will close the mini-map in 1024x768 ExitLoop ; it exists the current while loop EndIf ; we close the IF sleep(1000) ; it waits 1000 ms (1 second) before it continnues Wend ; we close the while loop ;in less words this while loop will search for pixel over and over and over again ;until the pixel it?s found ;then it exit loop and it continues EndFunc
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
So i continue my function
Code:while 1 ;the best way is to use the same recognition system as before only the opposite way ;we don't want the GOLD pixel to be there PixelSearch(964,743,964,743,0xF7E52B,15) ;same pixel search as before $n = @error while $n ;while the pixel is not found Select Case Hex(PixelGetColor(428,347),6) = "FEFEFE" and Hex(PixelGetColor(581,444),6) = "EEEEEE" ; the 2 pixels in the main menu Sleep(200) ProcessClose("hunt.exe") ; we close both the Sub-Functions ProcessClose("pot.exe") ; we don't want keys to be pressed ;while it writes the password Sleep(6000) Send("{Enter}");just to be sure we try a log in before we right;the password. This will clear the pass field and leave it blank Sleep(2000) MouseClick("left",528,381,1,0) ; left click in the pass field Sleep(200) Send("PutYourPasswordHere") ;it will write the pass Send("{Enter}");log in Sleep(800) MouseMove(950,650) ;move the mouse to a non-related point ; u can notice some useless things that i add to the script just to be sure the program will never fail ;next server list Case Hex(PixelGetColor(457,572),6) = "EEEEEE" Sleep(1000) Send("{Right}");it collapse the server list Send("{Down 1}"); the number will be sub-server u want 1-20 Sleep(200) EndIf ;next is char list Case Hex(PixelGetColor(755,575),6) = "55504A"; adaugi un Send("{Down}") ;before the next Send("{Enter}") u have to add Send("{Down x}") where ;x is 1 for the 2nd char, 2 for the 3rd char and so on ;u don't add anything if the char u wanna play with it's the 1st char Send("{Enter}");it selects the char ExitLoop 2; it exits 2 loops: the current one and the one that ;started the search for disconnect EndSelect PixelSearch(964,743,964,743,0xF7E52B,15) $n = @error Sleep(1000) ;this keeps the while loop running till success wend wend
<hr>Append on Jul 26 2007, 16:58<hr> PS: plz don't post i have 2 more to write :P
<hr>Append on Jul 26 2007, 17:06<hr> [AUTO-POT]
We're just gonna take the in game SS and work with it.
[Only registered and activated users can see links. Click Here To Register...]
Code:
while 1 $coord = PixelSearch(186,26,187,26,0xA00C00,1);looking for the HP pixel in a color;range of 1 If not @error Then;if the color is not found Send ("{F11}") ;it presses F11 ;in game Options -> Game -> unMark "Use numeric Keys" ;just trust me with this one EndIf Sleep(100) ; if we don't put this sleep the auto-pot will keep the CPU used 100% WEnd while 1;just keep the script alive sleep(1000) wend