Jump to content
Sign in to follow this  
Markuss75

Need help with fighting script for a game Pokemon Moon.

Recommended Posts

Markuss75

Hi everyone i am newbie to auotit , started yesterday and i learn a bit of autoit scripting , watched a video . So i need help with my script ! I need a x and y script . I got color bot only but i need one normal click with coordinates . 

Script :

HotKeySet("{ESC}", "Terminate")

HotKeySet("!c", "getColor")
HotKeySet("!a", "click")
 
Global $color
Global $interval
$interval = 300
 
MsgBox(0, "Starting Up", "Starting, use ESCAPE to quit, Alt + C to set color, and Alt + A to click.")
 
Func Terminate()
   Exit 1
EndFunc
 
Func getColor()
   $point = MouseGetPos()
   $color = PixelGetColor($point[0], $point[1])
   MsgBox(0, "Color Set", "The color has been set to " & $color)
EndFunc
 
Func click()
   MsgBox(0, "clicking", "Starting to click")
   While 1
          $point = PixelSearch(1363, 745, 1712, 911, $color)
          if IsArray($point) Then
                 MouseClick("left", $point[0], $point[1],1,0)
                 Sleep($interval)
          EndIf
          Sleep(300)
   WEnd
EndFunc
 
While 1
   sleep(10)
WEnd
Edited by Markuss75

Share this post


Link to post
Share on other sites
JLogan3o13

Markus75, welcome to the forum. First off, please give your threads meaningful titles - everyone here is in search of help for an AutoIt script. Secondly, can you please explain in detail what you are trying to accomplish? You will find, 99% of the time, that there are much easier ways to script what you're trying to do without having to resort to PixelGetColors or MouseClicks.

 

What will best help us help you is a step by step guide of what you are trying to do, and in what application/window.


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
Markuss75

I am trying to accomplish a fighting bot for a game : Pokemon Moon . I need PixelGotColors because there's a image when you fight and restart text when you complete the fight.

Share this post


Link to post
Share on other sites
JLogan3o13

So, here is where I direct you to the forum rules, in the lower right hand corner of every page. You'll see that we do not support game automation here (mainly because cheating at games is lame :) ). Sorry, but you will not receive any help on this topic.


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×