Script for games where you need to "plant" stuff

Ask gaming related questions
Ninjagaiden86
Posts: 3
Joined: 03 May 2018, 21:01

Script for games where you need to "plant" stuff

19 Sep 2019, 12:08

Hey,

Was wondering if someone could help me with a script like this:

First you pin point 4 coordinates with your mouse (Like the corners of a box)
After that your mouse cursor starts "filling the box" with mouse clicks. The game uses grid system like 8x8 16x16 24x24

So ideally I could determine the size of the mouse movement, like how much room between each plant and when it moves to next row.
I can easily do this manually, if someone just sets the base for it . Tbh if I can get a script for 8x8 I can easily modify that for my liking.

I drew a picture!
Spoiler


Thx in advance! <3
Last edited by joedf on 19 Sep 2019, 12:26, edited 1 time in total.
Reason: allow imgur image
User avatar
YoucefHam
Posts: 344
Joined: 24 Aug 2015, 12:56
Facebook: https://fb.me/YoucefHamDz
Google: [email protected]
GitHub: YoucefHam
Location: Algeria
Contact:

Re: Script for games where you need to "plant" stuff

25 Sep 2019, 11:08

Hi there Try this

use it like this

Image

Image

Code: Select all

#SingleInstance	Force
CoordMode, Mouse, Screen

F10::
Active := 1
;~ InputBox, w,,,,,,,,,,4
;~ InputBox, h,,,,,,,,,,4
w := 4
h := 4
i := 0
SetTimer, ToolTip, 100
Loop 3
{
	i++
	KeyWait, e, D
	MouseGetPos, x%i%, y%i%
	KeyWait, e
}
SetTimer, ToolTip, Off
ToolTip
dx := (x3 - x2) / (w)
dxC := (x1 - x2) / (w)
dy := (y1 - y2) / (h)
dyC := (y3 - y2) / (h)
Loop, 4
{
	i := A_Index - 1
	Loop, 4
	{
		j := A_Index - 1
		x := x2 + (dx * j) + (dxC * i)
		y := y2 + (dy * i) + (dyC * j)
		MouseClick, Left
		, % x + dx / 2
		, % y + dy / 2
	}
}
Active := 0
return


#if Active
$e::
return
#if

ToolTip:
ToolTip, % "Press E to Get Position N°0" i (i = 2 ? " (Corner)" : " (Ext)")
return
:wave: There is always more than one way to solve a problem. ;)
Ninjagaiden86
Posts: 3
Joined: 03 May 2018, 21:01

Re: Script for games where you need to "plant" stuff

09 Oct 2019, 15:18

Thx!!! But I dunno for some reason I can't launch it :thinking: its 23.34 PM so maybe I should try figuring it out tomorrow :D

Return to “Gaming”

Who is online

Users browsing this forum: malcev and 48 guests