How to script a simple auto-bot [AutoIT]

02/26/2008 04:43 gwntd#31
I have a question for the auto-login. Is it still relative? What would be have to be added so that, it allows you to type in the Authentication for you. This kinda seems more complex. I wanted to make a bot like Dizzy's, because clearly it is more stable.

However since I am a complete noob to scripting or programming ima just take his stuff and do a double check on everything, then just add some tweaks.

$xTop = 30; i declare them Are these coordinated standard for a certain resolution?
$yTop = 73 Or would I have to find a similar set for windowed mode?
$xBot = 1002
$yBot = 692
$mobGreen = "0xC0BE40"; i also declare the mob color

Sleep(6000) Also If i wanted to make it find 2 sets of colors instead of just one
while 1 would i just add this sequence again, with a different color search
$coord = PixelSearch($xTop,$yTop,$xBot,$yBot,$mobGreen,5);i search for the green mobs
$n = @error
If NOT @error Then;if the mob is found
while $n = 0;while it is still in the screen
$x = Random($coord[0], $coord[0]+40, 1);we randomize coordinates so we won't miss the mob
;since mobs have different shape and sizes
$y = Random($coord[1], $coord[1]+40, 1)
MouseClick("right", $x, $y, 2, 0); i click at the randomized coordinates *Question Umm why is it "right" and not "left"?
$mm = PixelGetColor ( 378 , 12 ); i get the pixel color of that mob HP LIMIT
$mob = Hex($mm, 6);since the pixel i got is hex and PixelGetcolor function returns a decimal value i convert it
If $mob = "7B0000" Then; i compare the converted value i got from PixelGetColor in that point with the have i collected using AWI in the same point
ExitLoop; if it's a match (that means that the mob was selected)
;it will exit the loop and continue
EndIf
$coord = PixelSearch($xTop,$yTop,$xBot,$yBot,$mobGreen,5);w e repeat the same pixel search
; the ideea is that the program will try to click the mob untill he is selected
$n = @error
wend

;in this moment we have the mob selected
If $mob = "7B0000" Then ; but we check it anyway
while $mob = "7B0000" ; so as long as the mob is selected

Send("{F4}"); we just send the skills from F4 to F1
Send("{F3}"); chaotic i know but since we use speed hack
Send("{F2}");adding waiting times will just be a waste of time
Send("{F1}")

$mm = PixelGetColor ( 378 , 12 );we once again look for the mob's HP so we can complete the while loop
$mob = Hex($mm, 6);this means that the keys will be pressed untill the mob is dead
wend
Send("{Space}"); after the mob is dead we collect the items
Sleep(200)
Send("{Space}")
Sleep(200)
Send("{Space}")
Sleep(200)
EndIf

;now remember the "IF NOT @error Then" from the start?
;what if there is no mob in the screen?
;what then?

Else;if no mob is found
Send("{Right 7}") ;rotate the camera to look in other directions
Endif
Wend

Sry if these questions are a bit noobish, i understand most of what this says. the details gets me lol.
02/26/2008 08:53 Vip3ra#32
can some1 make now a bot for Cabal EU? :|
02/26/2008 23:06 sinx000#33
cant wait to use this once gg is bypassed for eu and kr :D
03/07/2008 07:44 pat3ee#34
i have problem in detecting the color..the autoIT only detect the position and not the color..
03/07/2008 09:42 onncai#35
$xTop = 30; i declare them
$yTop = 73
$xBot = 1002
$yBot = 692
$mobGreen = "0xC0BE40"; i also declare the mob color

if i wan add more monster color,can i just add on like this?
example:
$mobGreen = "0xC0BE40","0xc0HS76"

or

$mobGreen = "0xC0BE40, 0xc0HS76"

which 1 is the correct 1?
and will it work?
03/08/2008 13:42 Dizzydbd#36
@gwntd
For window mode u must set at the start of the program
- Opt(MouseCoordMode,0) so the coords will be taken relatively from the active window
- Yes just add it twice with other color
- can't remember but i guess with left it will move to the mob if he misses the click

@onncai
u can declare it like this
$mobgreen = ....
$mobyellow = ...

None of the examples u gave is correct
04/06/2008 03:54 yunarox#37
Can you make a excellent script instead please? :D that would be much sweeter.
04/06/2008 05:09 mewhoyou#38
I AM SO LOST! I dont EVEN have the slightest clue what you all are talking about. Can anyone do a version so we can all leech from?


Mr. LOST
04/08/2008 17:49 dudio#39
Man it's bad programming practice in any language to be putting all those comments in there like that. I had a hard time reading your examples. You had like paragraphs of stuff in between the code. O_o

Thats not so good for the people trying to learn. :o
04/09/2008 01:25 shawnking#40
:confused:sorry but im so confused and lost:confused:
04/26/2008 14:41 glacierfrost21#41
???cant relate on some things...like this:
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.

Can you specify it
(sorry i'm noob just passed by to use some bots)

some links dont work like the link for the
screenshot..the pic doesn't load...
04/27/2008 20:17 Xlax#42
very good just to much for my brain to hold on a sunday
05/02/2008 14:38 gadex554#43
The SciTE4AutoIt3.exe is broke pls fix it
05/08/2008 04:35 phatal808#44
So does this autoit script log you back in even with the security check??
05/08/2008 19:08 simonfraser16#45
hey dizzydbd anychance of posting a script for a auto hunter for conquer online plz