Ejemplo n.º 1
0
def droidGotoNextCard():
    # clicks on the right arrow tab
    moveX = utility.r(droidRightCard[0], droidRightCard[2])
    moveY = utility.r(droidRightCard[1], droidRightCard[3])
    pyautogui.moveTo(moveX, moveY, utility.r(0.3, 0.2))  # x, y, duration
    pyautogui.click(moveX, moveY, 1,
                    utility.r(1, 0.2))  # x, y, number of clicks, pause
Ejemplo n.º 2
0
def gotoNextCard():
    # clicks on the player tab
    moveX = utility.r(cardTab[0], cardTab[2])
    moveY = utility.r(cardTab[1], cardTab[3])
    pyautogui.moveTo(moveX, moveY, utility.r(0.3, 0.2))  # x, y, duration
    pyautogui.click(moveX, moveY, 1,
                    utility.r(0.5, 0.2))  # x, y, number of clicks, pause

    # scrolls down to next card and selects
    pyautogui.scroll(int(scroll / 2 * -1 + 3), None, None,
                     utility.r(0.5, 0.2))  # clicks, x, y, pause
    pyautogui.click()
Ejemplo n.º 3
0
def relistCard():
    # clicks on the "List on Transfer Market" tab
    moveX = utility.r(listTab[0], listTab[2])
    moveY = utility.r(listTab[1], listTab[3])
    pygui.moveTo(moveX, moveY, utility.r(0.3, 0.2)) # x, y, duration
    pygui.click(moveX, moveY, 1, utility.r(0.5, 0.2)) # x, y, number of clicks, pause

    # scrolls down to reveal price buttons
    pygui.scroll(scroll * -1, None, None, utility.r(0.1, 0.2)) # clicks, x,  y, pause

    # clicks on the "List Item" button
    moveX = utility.r(listButton[0], listButton[2])
    moveY = utility.r(listButton[1], listButton[3])
    pygui.moveTo(moveX, moveY, utility.r(0.2, 0.2)) # x, y, duration
    pygui.click(moveX, moveY, 1, utility.r(2, 0.2)) # x, y, number of clicks, pause

    # scrolls up to reveal card
    pygui.scroll(scroll, None, None, utility.r(0.1, 0.2)) # clicks, x, y, pause
Ejemplo n.º 4
0
def gotoUnassigned():
    # clicks on home button
    moveX = utility.r(homeButton[0], homeButton[2])
    moveY = utility.r(homeButton[1], homeButton[3])
    pyautogui.moveTo(moveX, moveY, utility.r(0.3, 0.2))  # x, y, duration
    pyautogui.click(moveX, moveY, 1,
                    utility.r(2.2, 0.3))  # x, y, number of clicks, pause

    # clicks on unassigned
    moveX = utility.r(unassignedButton[0], unassignedButton[2])
    moveY = utility.r(unassignedButton[1], unassignedButton[3])
    pyautogui.moveTo(moveX, moveY, utility.r(0.3, 0.2))  # x, y, duration
    pyautogui.click(moveX, moveY, 1,
                    utility.r(2.2, 0.3))  # x, y, number of clicks, pause
Ejemplo n.º 5
0
def refreshPage():
    # refreshes the page
    moveX = refreshButton[0]
    moveY = refreshButton[1]
    pyautogui.moveTo(moveX, moveY, utility.r(0.3, 0.2))  # x, y, duration
    pyautogui.click(moveX, moveY, 1,
                    utility.r(0.5, 0.2))  # x, y, number of clicks, pause

    # checks for login button and presses if present
    utility.s(10)
    moveX = utility.r(loginButton[0], loginButton[2])
    moveY = utility.r(loginButton[1], loginButton[3])
    pyautogui.moveTo(moveX, moveY, utility.r(0.3, 0.2))  # x, y, duration
    pyautogui.click(moveX, moveY, 1,
                    utility.r(0.5, 0.2))  # x, y, number of clicks, pause

    # pauses to make sure that main menu is displayed
    utility.s(20)
Ejemplo n.º 6
0
variance = 50

# records the start time
time1 = utility.t()
# tabs out to the web app
utility.tabOut()

# runs loop for number of cards to sell
for x in range(cards):
    # finds the price of the card by checking player image
    price = whichcard.player()
    # moves on to the next card if no price is found
    if price is None:
        navigate.gotoNextCard()
        # pauses the program before the next card
        utility.s(utility.r(1, 2))
    else:
        # adds price variance if in variance mode
        if modeVariance == True:
            price = int(utility.r(price, variance))
        # lists the card
        listcard.listCard(price)
        # pauses the program before the next card
        utility.s(utility.r(2, 2))

    # if x is 49 or x is 99:
    #     # end of unassigned, refreshes page
    #     navigate.refreshPage()
    #     navigate.gotoUnassigned()

# output at the end of the program
Ejemplo n.º 7
0
import utility
import listcard
import locations
import whichcard

# driver program to relist cards

# records the start time
time1 = utility.t()
# tabs out to the web app
utility.tabOut()

# instantiates variable
more = True
cards = 0

# runs loop for number of cards to relist
while more:
    # relists the card
    listcard.relistCard()
    # pauses the program before the next card
    utility.s(utility.r(3, 3))
    # checks if next card needs to be relisted
    more = whichcard.didNotSell()
    cards += 1

# output at the end of the program
print("Number of cards: " + str(cards))
print("Time: " + str(utility.t() - time1) + " seconds")
Ejemplo n.º 8
0
def listCard(price):
    # clicks on the "List on Transfer Market" tab
    moveX = utility.r(listTab[0], listTab[2])
    moveY = utility.r(listTab[1], listTab[3])
    pygui.moveTo(moveX, moveY, utility.r(0.3, 0.2)) # x, y, duration
    pygui.click(moveX, moveY, 1, utility.r(0.5, 0.2)) # x, y, number of clicks, pause

    # scrolls down to reveal price buttons
    pygui.scroll(scroll * -1, None, None, utility.r(0.1, 0.2)) # clicks, x,  y, pause

    # inputs the start price
    moveX = utility.r(startPrice[0], startPrice[2])
    moveY = utility.r(startPrice[1], startPrice[3])
    pygui.moveTo(moveX, moveY, utility.r(0.2, 0.2)) # x, y, duration
    pygui.click(moveX, moveY, 1, utility.r(0, 0.2)) # x, y, number of clicks, pause
    pygui.typewrite(str(price))

    # inputs the BIN price
    moveX = utility.r(BINPrice[0], BINPrice[2])
    moveY = utility.r(BINPrice[1], BINPrice[3])
    pygui.moveTo(moveX, moveY, utility.r(0.2, 0.2)) # x, y, duration
    pygui.click(moveX, moveY, 1, utility.r(0, 0.2)) # x, y, number of clicks, pause
    pygui.typewrite(str(price))

    # clicks on the "List Item" button
    moveX = utility.r(listButton[0], listButton[2])
    moveY = utility.r(listButton[1], listButton[3])
    pygui.moveTo(moveX, moveY, utility.r(0.2, 0.2)) # x, y, duration
    pygui.click(moveX, moveY, 1, utility.r(3, 0.2)) # x, y, number of clicks, pause

    # scrolls up to reveal card
    pygui.scroll(scroll, None, None, utility.r(0.1, 0.2)) # clicks, x, y, pause
Ejemplo n.º 9
0
def droidListCard(price):
    # clicks on the "List on Transfer Market" tab
    moveX = utility.r(droidListTab[0], droidListTab[2])
    moveY = utility.r(droidListTab[1], droidListTab[3])
    pygui.moveTo(moveX, moveY, utility.r(0.3, 0.2)) # x, y, duration
    pygui.click(moveX, moveY, 1, utility.r(1, 0.2)) # x, y, number of clicks, pause

    # scrolls down to reveal price buttons
    pygui.mouseDown()
    pygui.moveTo(moveX, moveY - scroll, utility.r(0.3, 0.2)) # x, y, duration
    pygui.mouseUp()
    utility.s(0.5)

    # inputs the start price
    moveX = utility.r(droidStartPrice[0], droidStartPrice[2])
    moveY = utility.r(droidStartPrice[1], droidStartPrice[3])
    pygui.moveTo(moveX, moveY, utility.r(0.2, 0.2)) # x, y, duration
    pygui.click(moveX, moveY, 1, utility.r(0, 0.2)) # x, y, number of clicks, pause
    utility.s(0.5)
    pygui.typewrite(str(price))
    utility.s(1)

    # inputs the BIN price
    moveX = utility.r(droidBINPrice[0], droidBINPrice[2])
    moveY = utility.r(droidBINPrice[1], droidBINPrice[3])
    pygui.moveTo(moveX, moveY, utility.r(0.2, 0.2)) # x, y, duration
    pygui.click(moveX, moveY, 1, utility.r(0, 0.2)) # x, y, number of clicks, pause
    utility.s(0.5)
    pygui.typewrite(str(price))
    utility.s(1)

    # clicks on the "List Item" button
    moveX = utility.r(droidListButton[0], droidListButton[2])
    moveY = utility.r(droidListButton[1], droidListButton[3])
    pygui.moveTo(moveX, moveY, utility.r(0.2, 0.2)) # x, y, duration
    pygui.click(moveX, moveY, 1, utility.r(3, 0.2)) # x, y, number of clicks, pause
    utility.s(0.5)

    # scrolls up to reveal card
    pygui.moveTo(moveX, moveY - scroll, utility.r(0.3, 0.2)) # x, y, duration
    pygui.mouseDown()
    pygui.moveTo(moveX, moveY, utility.r(0.3, 0.2)) # x, y, duration
    pygui.mouseUp()