Пример #1
0
	def moveToPortableKey():
		mouse.moveRect(x, y, xT, yT)

		sleepDuration = -1
		while sleepDuration < 0:
			sleepDuration = np.random.normal(0.2, 0.01)
		sleep(sleepDuration)

		pyautogui.click(button='right')
Пример #2
0
def extendPortable(portableKeyCoordinates, extendInterfaceLocation, tries = 0):
	(x, y, xT, yT) = portableKeyCoordinates
	(x, y, xT, yT) = (5 + x//2, 5 + y//2, -5 + xT//2, -5 + yT//2)

	if tries == 10:
		print("Failed to extend portable")
		return False
	
	def moveToPortableKey():
		mouse.moveRect(x, y, xT, yT)

		sleepDuration = -1
		while sleepDuration < 0:
			sleepDuration = np.random.normal(0.2, 0.01)
		sleep(sleepDuration)

		pyautogui.click(button='right')

	portableClickLocation = utils.Location()

	succ = utils.performAction(moveToPortableKey, 
		utils.makeSuccess(portableClickLocation, portableClickInterfacePath, False))
	if not succ:
		print("Failed to right click portable key, retrying")
		extendPortable(portableKeyCoordinates, extendInterfaceLocation, tries = tries + 1)
		

	sleep(3)

	(x, y, xT, yT) = utils.convert(portableClickLocation.getLoc())
	(x, y, xT, yT) = (x//2, y//2, xT//2, yT//2)
	mouse.moveRect(x, y, xT, yT, teleportRandom=False)
	pyautogui.click()
	
	sleep(3)

	if not utils.checkLocation(extendInterfaceLocation, extendInterfacePath):
		print("Failed to open extend interface, retrying")
		extendPortable(portableKeyCoordinates, extendInterfaceLocation, tries = tries + 1)

	sleepDuration = -1
	while sleepDuration < 0:
		sleepDuration = np.random.normal(0.2, 0.2)
	utils.spamPress('1')
	sleep(sleepDuration)
	utils.spamPress('enter')

	sleep(3)

	if utils.checkLocation(extendInterfaceLocation, extendInterfacePath):
		print("Failed to extend portable, retrying")
		extendPortable(portableKeyCoordinates, extendInterfaceLocation, tries = tries + 1)

	return True
Пример #3
0
def extend(silverhawkCoordinates, overloadCoordinates, aggressionCoordinates):
    x, y, xT, yT = silverhawkCoordinates
    mouse.moveRect(x, y, xT, yT)
    pyautogui.click()
    sleep(getSleep(2, 0.3))

    x, y, xT, yT = overloadCoordinates
    mouse.moveRect(x, y, xT, yT)
    pyautogui.click()
    sleep(getSleep(2, 0.3))

    x, y, xT, yT = aggressionCoordinates
    mouse.moveRect(x, y, xT, yT)
    pyautogui.click()
    sleep(getSleep(2, 0.3))

    return True
Пример #4
0
def extend(silverhawkCoordinates, overloadCoordinates, aggressionCoordinates):
    x, y, xT, yT = silverhawkCoordinates
    mouse.moveRect(x, y, xT, yT)
    pyautogui.click()
    sleep(getSleep(1, 0.3))

    x, y, xT, yT = overloadCoordinates
    mouse.moveRect(x, y, xT, yT)
    pyautogui.click()
    sleep(getSleep(1, 0.3))

    x, y, xT, yT = aggressionCoordinates
    mouse.moveRect(x, y, xT, yT)
    pyautogui.click()
    sleep(getSleep(1, 0.3))

    for _ in range(10):
        ovlLoc = utils.Location()
        if utils.checkLocation(ovlLoc, overloadPath):
            return True

    return False
Пример #5
0
	def clickOnFurnace():
		(x, y, xT, yT) = furnaceLocation
		mouse.moveRect(x, y, xT, yT)
		pyautogui.click()
Пример #6
0
	def openRange():
		x, y, xT, yT = rangeCoordinates
		mouse.moveRect(x, y, xT, yT)
		pyautogui.click()
Пример #7
0
	def openBank():
		x, y, xT, yT = bankCoordinates
		mouse.moveRect(x, y, xT, yT)
		pyautogui.click()
Пример #8
0
	def extendSilverhawk():
		x, y, xT, yT = silverhawkCoordinates
		mouse.moveRect(x, y, xT, yT)
		pyautogui.click()