def compass(self):
		sm = ScreenMatcher("templates/interface/compass.png", 0.6);
		mc = MatchCleaner(sm.getPositions());
		cl = Clicker();
		cl.LC(mc.getCenters()[0], 0.5);
		pyautogui.keyDown('up');
		time.sleep(1.9);
		pyautogui.keyUp('up');
Example #2
0
 def on_init(self):
     pygame.init()
     self._display_surf = pygame.display.set_mode(
         self.size, pygame.HWSURFACE | pygame.DOUBLEBUF)
     self._display_surf.fill((255, 255, 255))
     self.twoCols = TwoCols(self)
     self._running = True
     self.leftbutton = Clicker(
         (255, 58, 44), (int(self.width / 3), int(5 * self.height / 6)),
         pygame.K_LEFT, self, self.twoCols.col1)
     self.rightbutton = Clicker(
         (255, 58, 44), (int(2 * self.width / 3), int(5 * self.height / 6)),
         pygame.K_RIGHT, self, self.twoCols.col2)
	def login(self):
		sm = ScreenMatcher("templates/login/existing.png");
		mc = MatchCleaner(sm.getPositions());
		cl = Clicker();
		cl.LC(mc.getCenters()[0], 0.5);
		pyautogui.typewrite(self.password, interval=0.1);
		sm = ScreenMatcher("templates/login/login.png");
		mc = MatchCleaner(sm.getPositions());
		#print(mc.getCenters());
		cl.LC(mc.getCenters()[0], 5);

		sm = ScreenMatcher("templates/login/play.png");
		mc = MatchCleaner(sm.getPositions());
		cl.LC(mc.getCenters()[0], 0.5);
Example #4
0
class App:
    t = .003
    thing = 0

    def __init__(self):
        self._running = True
        self._display_surf = None
        self.size = self.width, self.height = 640, 400
        self.background_colour = (255, 255, 255)

    def on_init(self):
        pygame.init()
        self._display_surf = pygame.display.set_mode(
            self.size, pygame.HWSURFACE | pygame.DOUBLEBUF)
        self._display_surf.fill((255, 255, 255))
        self.twoCols = TwoCols(self)
        self._running = True
        self.leftbutton = Clicker(
            (255, 58, 44), (int(self.width / 3), int(5 * self.height / 6)),
            pygame.K_LEFT, self, self.twoCols.col1)
        self.rightbutton = Clicker(
            (255, 58, 44), (int(2 * self.width / 3), int(5 * self.height / 6)),
            pygame.K_RIGHT, self, self.twoCols.col2)

    def on_event(self, event):
        if event.type == pygame.QUIT:
            self._running = False
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_LEFT:
                self.leftbutton.click()
            if event.key == pygame.K_RIGHT:
                self.rightbutton.click()
            if event.key == pygame.K_ESCAPE:
                self._running = False

    def on_loop(self):
        pass

    def on_render(self):
        self._display_surf.fill(self.background_colour)
        self.twoCols.move()
        self.leftbutton.render()
        self.rightbutton.render()
        pygame.display.flip()

    def on_cleanup(self):
        pygame.quit()

    def on_execute(self):
        if self.on_init() == False:
            self._running = False

        while (self._running):
            for event in pygame.event.get():
                self.on_event(event)
            self.on_loop()
            self.on_render()
        self.on_cleanup()
from Baseline import Baseline
from ScreenMatcher import ScreenMatcher
from MatchCleaner import MatchCleaner
from Clicker import Clicker

base = Baseline()
base.setPassword("aa212692")
base.login()
sm = ScreenMatcher("templates/interface/lunar_book.png")

mc = MatchCleaner(sm.getPositions())
cl = Clicker()
cl.LC(mc.getCenters()[0], 0.5)
base.compass()

sm.setTemplate("templates/interface/spin_flax.png")
mc.setRawPos(sm.getPositions())
for i in range(5):
    cl.LC(mc.getCenters()[0], 3)

while True:
    sm.setTemplate("templates/world/edge_bank.png")
    mc.setRawPos(sm.getPositions())
    cl.LC(mc.getCenters()[0], 1)

    sm.setTemplate("templates/items/bow_string.png")
    mc.setRawPos(sm.getPositions())
    cl.RC(mc.getCenters()[3], 0.5)

    sm.setTemplate("templates/interface/all.png")
    mc.setRawPos(sm.getPositions())
base = Baseline()
#nature_rune_check = ScreenMatcher("templates/items/nature_rune.png");
#astral_rune_check = ScreenMatcher("templates/items/astral_rune.png");
#coin_check = ScreenMatcher("templates/items/cash_stack");
print(
    'Start in north edge bank with inventory of astral runes, 13 seaweed, and 13 sand buckets'
)
print('How much astral runes do you have: ')
#print('If you do not the bot will not stop');
astral_runes_start = input()
base.compass()

sm = ScreenMatcher("templates/interface/lunar_book.png")
mc = MatchCleaner(sm.getPositions())
cl = Clicker(chance=500)
cl.LC(mc.getCenters()[0], 1.2)
AvgProfitInv = 1.764
#assuming 3.5k per inv, spent 1736 per inventory on materials (13 seaweed 51 ea, 2 astrals 179 ea, 13 buckets sand 55 ea)
start = time.time()
Profit = 0
astral_runes_used = 0
while astral_runes_used < astral_runes_start:
    sm.setTemplate("templates/spells/superglass_make.png")
    sm.setThresh(0.7)
    mc.setRawPos(sm.getPositions())
    cl.LC(mc.getCenters()[0], 1.4)
    astral_runes_used += 2
    Profit += AvgProfitInv
    print(
        str(Profit) + "K made so far in " + str((time.time() - start) / 60) +
base = Baseline()
#nature_rune_check = ScreenMatcher("templates/items/nature_rune.png");
#astral_rune_check = ScreenMatcher("templates/items/astral_rune.png");
#coin_check = ScreenMatcher("templates/items/cash_stack");
print(
    'Start in north edge bank with inventory of nature runes, astral runes, money, and logs.'
)
print('How many logs do you have: ')
#print('If you do not the bot will not stop');
num_logs = input()
base.compass()

sm3 = ScreenMatcher("templates/interface/backpack.png")
mc3 = MatchCleaner(sm3.getPositions())
cl3 = Clicker()
cl3.LC(mc3.getCenters()[0], 0.5)

sm3.setTemplate("templates/items/teak_log.png")
sm3.setThresh(0.7)
mc3.setRawPos(sm3.getPositions())

sm = ScreenMatcher("templates/interface/lunar_book.png")
mc = MatchCleaner(sm.getPositions())
cl = Clicker()
cl.LC(mc.getCenters()[0], 1.2)
GPPerPlank = 2147 - 1624

planks_made = 0
while planks_made < num_logs:
    sm2 = ScreenMatcher("templates/spells/plank_make.png")
Example #8
0
from Baseline import Baseline
from gui_bot_builder.ScreenMatcher import ScreenMatcher
from MatchCleaner import MatchCleaner
from Clicker import Clicker

mc_string = None
base = Baseline()
sm = ScreenMatcher("templates/interface/lunar_book.png")
mc = MatchCleaner(sm.getPositions())
cl = Clicker(chance=100)

cl.LC(mc.getCenters()[0], 0.5)
base.compass()

sm.setTemplate("templates/interface/spin_flax.png")
mc.setRawPos(sm.getPositions())
for i in range(5):
    cl.LC(mc.getCenters()[0], 3)

while True:
    sm.setTemplate("templates/world/edge_bank.png")
    sm.setThresh(0.7)
    mc.setRawPos(sm.getPositions())
    cl.LC(mc.getCenters()[0], 0.5)

    if mc_string == None:
        sm.setTemplate("templates/items/bow_string.png")
        mc_string = MatchCleaner(sm.getPositions())
    cl.RC(mc_string.getCenters()[0], 0.2)

    sm.setTemplate("templates/interface/all.png")
Example #9
0
from Baseline import Baseline
from ScreenMatcher import ScreenMatcher
from MatchCleaner import MatchCleaner
from Clicker import Clicker
import time

alch_count = 0
base = Baseline()
cl = Clicker(chance=100, random_delay=.7)
sm = ScreenMatcher("templates/interface/normal_book.png")
mc = MatchCleaner(sm.getPositions())
cl.LC(mc.getCenters()[0], .5)

sm.setTemplate("templates/spells/high_alch.png")
while True:
    print "Alched %i times so far." % alch_count
    mc.setRawPos(sm.getPositions())
    cl.LC(mc.getCenters()[0], 0)

    sm.setTemplate("templates/bot_specific/alcher/cast.png")
    if not sm.getPositions()[0] == []:
        cl.LC(mc.getCenters()[0], 0.3)
    else:
        sm.setTemplate("templates/items/rune_arrows.png")
        mc.setRawPos(sm.getPositions())
        cl.LC(mc.getCenters()[0], 0.3)
    alch_count += 1

    count = 0
    sm.setTemplate("templates/spells/high_alch.png")
    while sm.getPositions()[0] == [] and count < 100:
base = Baseline()
#nature_rune_check = ScreenMatcher("templates/items/nature_rune.png");
#astral_rune_check = ScreenMatcher("templates/items/astral_rune.png");
#coin_check = ScreenMatcher("templates/items/cash_stack");
print(
    'Start in north edge bank with inventory of astral runes, 13 seaweed, and 13 sand buckets'
)
print('How much astral runes do you have: ')
#print('If you do not the bot will not stop');
astral_runes_start = input()
base.compass()

sm = ScreenMatcher("templates/interface/lunar_book.png")
mc = MatchCleaner(sm.getPositions())
cl = Clicker(chance=300)
cl.LC(mc.getCenters()[0], 1.2)
AvgProfitInv = 1.764
#assuming 3.5k per inv, spent 1736 per inventory on materials (13 seaweed 51 ea, 2 astrals 179 ea, 13 buckets sand 55 ea)
start = time.time()
Profit = 0
astral_runes_used = 0
while astral_runes_used < astral_runes_start:
    sm.setTemplate("templates/spells/superglass_make.png")
    sm.setThresh(0.7)
    mc.setRawPos(sm.getPositions())
    cl.LC(mc.getCenters()[0], 1.4)
    astral_runes_used += 2
    Profit += AvgProfitInv
    print(
        str(Profit) + "K made so far in " + str((time.time() - start) / 60) +