Что нового

Помогите сделать "бота" для игры

topdotakek

Новичок
Сообщения
1
Репутация
0
Добрый день! Нужно сделать бота для игры stronghold kingdoms, который будет собирать "мешочки с ресурсами" и переключаться между городами.
В интернете нашел исходник, который написан на Python, но как его запустить я не нашел......
Там есть иконки с мешочками и ресурсами, которые должен собирать бот
Сам исходник выглядит так:
Код:
class Scout:
	@staticmethod
	def scout(village, stash):
		openMap()
		centerVillage(village)
		sendscout = Region(102,501,628,115)
		sendscout.setThrowException(False)
		# location = map.find(stash)
		loc = Scout.rsearch(stash, 250)
		if loc:
			Mouse.slowClick(loc)
			device.click("button-scout.png")
			sendscout.wait("icon-scout.png", 5)
			#k = sendscout.find(Pattern("scroll-handle.png").exact());
			#if k:
			#	sendscout.dragDrop(k, [k.x - 100, k.y])
			sendscout.click("G0-1.png")
			sleep(0.5)
			closebutton = "1313209825368.png"
			if map.exists(closebutton):
				map.click(closebutton)
			return True
		return False
	##
	# Search for the stash in given radius (square)
	@staticmethod
	def rsearch(stash, radius):
		c = map.find(stash)
		if c: return c
		t = map.find("village-shield.png.png")
		if not t: return False
		map.dragDrop(t, [t.x - radius, t.y])
		c = map.find(stash)
		if c: return c
		map.dragDrop(t, [t.x, t.y - radius])
		c = map.find(stash)
		if c: return c
		map.dragDrop(t, [t.x + radius, t.y])
		map.dragDrop(t, [t.x + radius, t.y])
		c = map.find(stash)
		if c: return c
		map.dragDrop(t, [t.x, t.y + radius])
		map.dragDrop(t, [t.x, t.y + radius])
		c = map.find(stash)
		if c: return c
		map.dragDrop(t, [t.x - radius, t.y])
		map.dragDrop(t, [t.x - radius, t.y])
		return map.find(stash)
------------------------------
Помогите люди добрые, все сообщество этой замечательной игрушки скажет вам спасибо'
 

be4hoctb

Новичок
Сообщения
38
Репутация
0
У меня есть полностью рабочий бот по этой игре если интересно пишите в скайп
[email protected]
 
Верх