King of avalon farm bot Topic is solved

Ask gaming related questions
Jaybals

King of avalon farm bot  Topic is solved

24 Nov 2017, 18:32

It has been a looooong time since I wrote any ahk scripts, however I wanted to try to get something going for king of avalon.

The eventual goal here is to have one script that can run 4 or 5 instances of the game (on Nox) to gather resources (from alliance buildings and tiles), collect resources as they are produced in the cities, kill monsters, heal troops, use resource items, dump food into a bank and restart the game as needed when Nox freezes. I realize that's a lot and it will take some time. I already started a script to run 1 account to the alliance mine with BlueStacks and 4 accounts with Nox. I have yet to test the Nox script. Hopefully with some input from others we can piece this thing together.

Here is the script for BlueStacks:

Code: Select all

#SingleInstance, Force



Button_Color := "0x164C67"		;corner of the call back button
Button_X := 298
Button_Y := 185





!X::		;ctl+X to start the script
	Loop
		{
			PixelGetColor,Current_color,Button_X,Button_Y,RGB	;checks to see if troops are out
			if(Current_Color!=Button_Color)
				{
					MouseClick, Left, 512, 355		;alliance mine
					sleep, 3000
					MouseClick, Left, 594, 365		;gather
					sleep, 4000
					MouseClick, Left, 755, 326		;troop formation
					sleep, 1000
					MouseClick, Left, 840, 555		;send
					sleep, 10000
				}
		}
	return

^A::	Pause, Toggle	return		;Alt+A to pause and unpause
Here is the untested Nox script:

Code: Select all

#SingleInstance, Force



Button_Color := "0x164C67"		;corner of the call back button
Button_X := 298
Button_Y := 185





WinGet, Nox, List, NoxPlayer		;list Nox windows
	return

!X::		;ctl+X to start the script
	Loop
		{
			WinActivate,ahk_id %Nox1%		;switch to first window
			sleep, 1000
			PixelGetColor,Current_color,Button_X,Button_Y,RGB	;checks to see if troops are out
			if(Current_Color!=Button_Color)
				{
					MouseClick, Left, 512, 355		;alliance mine
					sleep, 2000
					MouseClick, Left, 594, 365		;gather
					sleep, 4000
					MouseClick, Left, 755, 326		;troop formation
					sleep, 1000
					MouseClick, Left, 840, 555		;send
					sleep, 10000
				}
			WinActivate,ahk_id %Nox2%		;switch to second window
			sleep, 1000
			PixelGetColor,Current_color,Button_X,Button_Y,RGB	;checks to see if troops are out
			if(Current_Color!=Button_Color)
				{
					MouseClick, Left, 512, 355		;alliance mine
					sleep, 2000
					MouseClick, Left, 594, 365		;gather
					sleep, 4000
					MouseClick, Left, 755, 326		;troop formation
					sleep, 1000
					MouseClick, Left, 840, 555		;send
					sleep, 10000
				}
			WinActivate,ahk_id %Nox3%		;switch to third window
			sleep, 1000
			PixelGetColor,Current_color,Button_X,Button_Y,RGB	;checks to see if troops are out
			if(Current_Color!=Button_Color)
				{
					MouseClick, Left, 512, 355		;alliance mine
					sleep, 2000
					MouseClick, Left, 594, 365		;gather
					sleep, 4000
					MouseClick, Left, 755, 326		;troop formation
					sleep, 1000
					MouseClick, Left, 840, 555		;send
					sleep, 10000
				}
			WinActivate,ahk_id %Nox4%		;switch to fourth window
			sleep, 1000
			PixelGetColor,Current_color,Button_X,Button_Y,RGB	;checks to see if troops are out
			if(Current_Color!=Button_Color)
				{
					MouseClick, Left, 512, 355		;alliance mine
					sleep, 2000
					MouseClick, Left, 594, 365		;gather
					sleep, 4000
					MouseClick, Left, 755, 326		;troop formation
					sleep, 1000
					MouseClick, Left, 840, 555		;send
					sleep, 10000
				}
		}
	return

^A::	Pause, Toggle	return		;Alt+A to pause and unpause
Jaybals

Re: King of avalon farm bot

25 Nov 2017, 09:27

A few things about the scripts: resolution was set to 960x540. Alliance mine was centered on the screen already using a bookmark. The way I always enter the map is by using coords from mail because it zooms out further.

I already started editing the BlueStacks script to loop for 30 minuets then restart the program, but it is a very crude way of doing it (by clicking the close button then double clicking the desktop icon). I would like to see if I can get it to detect if the game is frozen then restart by running the program rather than double clicking an icon.
xRaggon

Re: King of avalon farm bot

24 Jan 2018, 07:06

Cześć! , jak dalej potoczyło się sytuacja z tym skryptem?
Anonymous1

Re: King of avalon farm bot

14 Jun 2018, 01:53

Are its work?or server detect a apllication
Aslan

Re: King of avalon farm bot

18 Aug 2018, 18:06

Just go to http://www.jeobots.com

A lot easier and does a lot more. And super cheap compared to others. I love donations script, helps a lot when trying to heal alliance hospital troops.

Also sends marches fast. Have had 75 farms and no sms verifications.

Return to “Gaming”

Who is online

Users browsing this forum: Bing [Bot], Evil-e and 18 guests