Sign in to follow this  
Followers 0
Guest charlie

A weird Problem

3 posts in this topic

; Prompt the user to run the script - use a Yes/No prompt (4 - see help file)
$answer = MsgBox(4, "outpost","This will log into helbreath")

If $answer = 7 Then
    MsgBox(0, "AutoIt", "OK.  Bye!")
    Exit
EndIf

WinActivate("Helbreath Crusade") 


Sleep(20000)
Send("Starting Helbreath Bot v0.1 By Outpost{ENTER}")



While 1 
 $time = 6
 $start = TimerInit() 
 $dif = TimerDiff($start) 
 While 1 
   If $time = 6 Then 
     $coord = PixelSearch (340, 205, 370, 230, 0xFFFFFF, 30, 1) 
   Else 
     $coord = PixelSearch (5, 300, 1024, 560, 0xA6ABAF, 55, 3) 
   EndIf 

; 5, 300 - 1024, 560 can be changed if you want to search a wider area. 
; Not recommended though since you can just adjust your view to fit all 
; the water in that space. The bigger the area, the less likely it is to 
; detect it. 
; If the splash isn't getting detected then change the hex colour to 
; something a bit closer. Top one is day, bottom is night. 

   If UBound($coord)>1 Then 
     Send("Found the color!{ENTER}")
     MouseClick("left", 360, 230)
     MouseClick("right", 360, 230)
     Sleep(10000) 
     ExitLoop 
   Else 
     Send("Cant find the color!{ENTER}")
     Sleep(10000) 
     ExitLoop
   EndIf 
 WEnd 
WEnd 

; Finished!

I made this and my problem is it detects the pixel no trouble at all but when it goes to click the mouse down the mouse moves into a corner and not at the cords the window is fullscreen and is about 640x800 pixels thanks for your time ciao

Share this post


Link to post
Share on other sites

Hi..

i looked at your code.. it seems a little weird.. but that schouldnt be the problem..

so you are clickling at coord: 360,230 hm .. i think the problem could be that you need the relativ coordinates, so it clicks, relativ to the windows.

you set this with:

AutoItSetOption("MouseCoordMode",0) ..

hope i could help..

mfg

Share this post


Link to post
Share on other sites

didnt work i think it might be a protection in the game to stop macros

Share this post


Link to post
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
Sign in to follow this  
Followers 0