Recognize a circle shape

Ask gaming related questions (AHK v1.1 and older)
Banayat
Posts: 10
Joined: 08 Jul 2018, 14:29

Recognize a circle shape

21 Oct 2018, 11:30

Do you know a way of recognizing circle shapes and let it wait for the next object to be found? If yes, How can I implement to the following with this in mind by using FindText made by feiyue or any other method you come up with:

Let's pretend, I need to use feiyue's FindText script:
https://autohotkey.com/boards/viewtopic.php?f=6&t=17834

(1) <Move> until object can be found, gather and count it. Repeat actions with the next one.
(2) If object got found save its mouse position.
(3) Check every two seconds if it got gathered.
(4) Player (=circle shape) keeps sufficient distance from other Players with circle shape (58x58 px below or higher) that does not supply given color patterns (see below), whose may appear randomly anywhere at the whole screen. Note: The Player always appears at the center of the whole screen and may also have various sizes.

Code: Select all

Text := "|<Pumpk>[email protected]$23.2Tt02DlU0D020z0G3y1WDy72zzG7zx4DkuAzXoHzzt2zzY4000000E0004000Q001w006U"
Text .= "|<Coin>*210$16.0w03k0zk7zkzz3ysDU0y03y0Dy0Tw0zw0zk0TU1y87szz7zwTzVzw0T00w03k8"
"|<Dia>*176$71.zzz000007zzzzzw000007zzzzzk000007zzzzzU000007zzzzy000000Dzzzzw000000Dzzszs000000Dzzlzk000000TzzVz0000000Tzy3w0000000Tzw300000000zzs400000001rzkE000000031zV0000000007zW000000000zzA000000007zyE00000000TzwU00000001zzs000000007vzs00000000Trzk1U000000zzTUD0000000zzz0y0000000zzz1w0000001zzy3s0000003zz"
...
...
...

[AnyHotkey]::
loop
{
   FindText (...)  [b]>> How can I implement FindText here?[/b]
   Sleep, 650
   ;If nothing could be found move to a random position without touching circles (=other players)
   Gosub, RndMve
   
   if (ElapsedTime := A_TickTime - StartTime >= 600000)	; = 10 minutes
     break
}
   Msgbox,,%Pumpk% Pumpkins, %Coin% Coins and `n %Dia% Diamonds has been collected within %ElapsedTime% minutes.
return

; Move Mouse to one of these non-specific areas
RndMve:
   CoordMode, Mouse, Screen
   Random, Mov, 1, 5
	if (Mov=1)
	{
	   Random, LSIX, 200,1500    ; Left Side I
	   Random, LSIY, 150,900
  	   SendInput {Click LSIX LSIY 0}
	}
	else if (Mov=2)
	{
	   Random, LSIIX, 200,1500   ; Left Side II
	   Random, LSIIY, 150,900
           SendInput {Click LSIIX LSIIY 0}
	}	
	else if (Mov=3)
	{
	   Random, CNTX, 200,1500   ; Center
	   Random, CNTY, 150,900
           SendInput {Click CNTX CNTY 0}
	}	
	else if (Mov=4)
	{
	   Random, RSIX, 200,1500   ; Right Side I
	   Random, RSIY, 150,900
           SendInput {Click RSIX RSIY 0}
	}	
	else if (Mov=5)
	{
	   Random, RSIIX, 200,1500   ; Right Side II
	   Random, RSIIY, 150,900
           SendInput {Click RSIIX RSIIY 0}
	}	
   Sleep, 550
Return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 72 guests