示例#1
0
def get_item_from_bank(qty):
    while mouse.get_freeze_dialog() == 0:
        mouse.moveMouse(548, 231)
        sleep(0.5)
        macro.mouseClick()
        sleep(0.5)
        k.send_keys('{ENTER}')
        sleep(1)
    k.send_keys('{1 down}' '{1 up}')
    k.send_keys('{1 down}' '{1 up}')
    k.send_keys('{1 down}' '{1 up}')
    k.send_keys('{1 down}' '{1 up}')
    k.send_keys('{ENTER}')
    sleep(0.5)
    for i in range(0, qty + 2):
        if not has_empty_slot():
            print("inven penuh batal tarik barang")
            break
        mouse.moveMouse(BANK_POSITION[i][0], BANK_POSITION[i][1])
        macro.mouseDown()
        mouse.moveMouse(380, 169)
        macro.mouseUp()
        sleep(0.2)
        k.send_keys('{ENTER}')
        sleep(0.2)

    while mouse.get_freeze_dialog() == DIALOG['bank']:
        k.send_keys("{VK_ESCAPE}")
        sleep(0.5)
        mouse.moveMouse(292, 83)
        sleep(0.5)
        macro.mouseClick()
示例#2
0
def open_refine():
    print(mouse.get_freeze_dialog() == DIALOG['refine'])
    print(mouse.get_freeze_dialog() == DIALOG['transaction'])
    print(mouse.get_freeze_dialog())
    while mouse.get_freeze_dialog() == 0:
        mouse.moveMouse(396, 290)
        sleep(0.2)
        macro.mouseClick()
    while mouse.get_freeze_dialog() == DIALOG['transaction']:
        macro.mouseClick()
示例#3
0
def start_hunt():
    mouse.moveMouse(391, 325)
    k.send_keys('{q down}' '{q up}')
    k.send_keys('{SPACE}')
    k.send_keys('{F1}')
    k.send_keys('{F2}')
    k.send_keys('{F3}')
    sleep(1)
    k.send_keys('{SPACE}')
    k.send_keys('{SPACE}')
    k.send_keys('{SPACE}')
    k.send_keys('{SPACE}')
    macro.mouseClick()
示例#4
0
def refine_7_to_9(inventory):
    global force_stop

    diamond = find_item_position(DIAMOND)
    wrs = find_item_position(WRS)
    brs = find_item_position(BRS)
    qty = 0

    if not wrs:
        print("purchasing wrs")
        purchase_item(auto_purchase.ITEM['wrs'], wrs_brs_diamond_per_purchase)
        qty = qty + wrs_brs_diamond_per_purchase
        sleep(0.5)

    if not brs:
        print("purchasing brs")
        purchase_item(auto_purchase.ITEM['brs'], wrs_brs_diamond_per_purchase)
        qty = qty + wrs_brs_diamond_per_purchase
        sleep(0.5)

    if not diamond:
        print("purchasing diamond")
        purchase_item(auto_purchase.ITEM['diamond'],
                      wrs_brs_diamond_per_purchase)
        qty = qty + wrs_brs_diamond_per_purchase
        sleep(0.5)

    if not wrs or not brs or not diamond:
        print("getting item from bank")
        get_item_from_bank(qty)
        return

    if force_stop:
        print("force_stop triggered")
        force_stop = True
        return

    open_refine()

    move_item(REFINE_INVENTORY[0], REFINE_ITEM)
    move_item(REFINE_INVENTORY[diamond], REFINE_GEM)
    move_item(REFINE_INVENTORY[brs], REFINE_BRS)
    move_item(REFINE_INVENTORY[wrs], REFINE_WRS)
    move_atb()

    mouse.moveMouse(203, 473)
    sleep(0.5)
    macro.mouseClick()
    sleep(8)
示例#5
0
def runHunt():
    print("Hunt Started..")
    start_hunt = True
    while start_hunt:
        print("Getting inventory list")
        inventory = mouse.getItemValue()
        if inventory[32] < 200 or inventory[33] < 150:
            macro.buyPot()
            sleep(0.1)
            print("bank : " + str(macro.checkBank()))
            print("shop : " + str(macro.checkShop()))
            macro.sellTrashItem()
            sleep(0.1)
        macro.closeBSIfOpen()
        mouse.moveMouse(505, 401)
        macro.mouseClick()
        sleep(1)
        if keyboard.is_pressed('c'):
            print('Hunt Stopped.')
            start_hunt = False
            break
        print("Item : " + str(inventory[0]))
        if inventory[0] == 300:
            print('Item Full Detected.')
            puttingItem()
            print("bank : " + str(macro.checkBank()))
            print("shop : " + str(macro.checkShop()))
            macro.closeBSIfOpen()
            print("Hunt Continue..")
        k.send_keys("{q down}" "{q up}")
        sleep(1)
        k.send_keys("{F5}")
        sleep(3)
        for x in range(0, 10):
            k.send_keys("{SPACE}")
            sleep(0.05)
            k.send_keys("{SPACE}")
            sleep(0.05)
            k.send_keys("{SPACE}")
            sleep(0.05)
            k.send_keys("{SPACE}")
            sleep(0.05)
            if keyboard.is_pressed('c'):
                print('Hunt Stopped.')
                start_hunt = False
                break
示例#6
0
def sellItem():
    logger.log("Selling Item")
    while not macro.checkShop():
        mouse.moveMouse(555, 227)
        sleep(0.5)
        macro.mouseClick()
        sleep(0.5)
        k.send_keys('{ENTER}')
        sleep(0.5)
        mouse.moveMouse(394, 296)
        macro.mouseClick()
        sleep(0.5)
    sleep(0.5)
    macro.sellSlot1()
    macro.sellSlot2()
    macro.sellSlot3()
    macro.sellSlot4()
    macro.sellSlot5()
    sleep(1)
    logger.log("escape")
示例#7
0
def sellItem():
    print('Selling Item..')
    mouse.moveMouse(555, 227)
    sleep(0.5)
    macro.mouseClick()
    sleep(0.5)
    while img.checkImage("./img/shop.jpg") == False:
        k.send_keys('{ENTER}')
        sleep(0.5)
        mouse.moveMouse(394, 296)
        macro.mouseClick()
        sleep(0.5)
    sleep(0.5)
    macro.sellSlot1()
    macro.sellSlot2()
    macro.sellSlot3()
    macro.sellSlot4()
    macro.sellSlot5()
    sleep(1)
    print("escape")
示例#8
0
def sellItem(item_list):
    print('Selling Item..')
    mouse.moveMouse(555, 227)
    sleep(0.5)
    macro.mouseClick()
    sleep(0.5)
    while mouse.get_freeze_dialog() != DIALOG['shop']:
        k.send_keys('{ENTER}')
        sleep(0.5)
        mouse.moveMouse(394, 296)
        macro.mouseClick()
        sleep(0.5)
    sleep(0.5)

    for item in item_list:
        macro.sell(SELL_INVENTORY[item][0], SELL_INVENTORY[item][1])

    close_item_shop()
    sleep(1)
    print("escape")
示例#9
0
def refine_9_to_12(inventory):
    global force_stop

    pd = find_item_position(PD)
    grs = find_item_position(GRS)
    qty = 0

    if not pd:
        print("purchasing pd")
        purchase_item(auto_purchase.ITEM['pd'], pd_grs_per_purchase)
        qty = qty + pd_grs_per_purchase
        sleep(0.5)

    if not grs:
        print("purchasing grs")
        purchase_item(auto_purchase.ITEM['grs'], pd_grs_per_purchase)
        qty = qty + pd_grs_per_purchase
        sleep(0.5)

    if not pd or not grs:
        print("getting item from bank")
        get_item_from_bank(qty)
        sleep(0.5)
        return

    if force_stop:
        print("force_stop triggered")
        force_stop = True
        return

    open_refine()

    move_item(REFINE_INVENTORY[0], REFINE_ITEM)
    move_item(REFINE_INVENTORY[pd], REFINE_GEM)
    move_item(REFINE_INVENTORY[grs], REFINE_GRS)
    move_atb()

    mouse.moveMouse(203, 473)
    sleep(0.5)
    macro.mouseClick()
    sleep(8)
示例#10
0
def get_atb_from_bank():
    k.send_keys("{VK_LMENU down}" "{v down}" "{v up}" "{VK_LMENU up}")
    sleep(0.3)
    k.send_keys('{ENTER}')
    sleep(0.5)
    for i in range(0, atb_per_purchase + 5):
        mouse.moveMouse(ITEM_BANK[i][0], ITEM_BANK[i][1])
        macro.mouseDown()
        mouse.moveMouse(410, 195)
        macro.mouseUp()
        sleep(0.2)
        k.send_keys('{ENTER}')

    sleep(0.5)
    while mouse.get_item_bank_status() == 1:
        mouse.moveMouse(292, 76)
        sleep(0.5)
        macro.mouseClick()

    sleep(1)
    k.send_keys("{VK_LMENU down}" "{a down}" "{a up}" "{VK_LMENU up}")
    sleep(0.5)
示例#11
0
while True:
    if keyboard.is_pressed('-') :
        print("Start Spam Hunt..")

        while True:
            macro.closeBSIfOpen()
            mouse.spamSkill()
            sleep(2.3)
            inventory = mouse.getItemValue()
            if inventory[32] < 150 or inventory[33] < 150:
                buyPotion()
                sleep(0.5)
                mouse.moveMouse(816, 228)
                sleep(0.5)
                macro.mouseClick()
                mouse.moveMouse(500, 378)
                sleep(0.5)
                macro.mouseClick()
            if img.checkImage("./img/party.jpg") :
                mouse.moveMouse(234, 263)
                macro.mouseClick()

    if keyboard.is_pressed('=') :
        print('Script Stopped.')
        start = False
        break

    if keyboard.is_pressed(']') :
        mouse.getPosition()
        sleep(0.2)
示例#12
0
def runInden():
    run = True
    delay = 0.05
    i = 0
    while run:
        if macro.checkCash() != True:
            k.send_keys("{VK_LMENU down}" "{a down}" "{a up}" "{VK_LMENU up}")
        if macro.checkInven() != True:
            k.send_keys("{VK_LMENU down}" "{i down}" "{i up}" "{VK_LMENU up}")
        mouse.moveMouse(553, 234)
        macro.mouseClick()
        sleep(delay)
        mouse.moveMouse(550, 51)
        sleep(delay)
        macro.mouseClick()
        sleep(delay)
        k.send_keys("{ENTER}")
        mouse.moveMouse(396, 290)
        sleep(delay)
        macro.mouseClick()
        sleep(delay)
        mouse.moveMouse(50, 27)
        sleep(delay)
        macro.mouseClick()
        sleep(delay)
        mouse.moveMouse(48, 374)
        sleep(delay)
        macro.mouseClick()
        sleep(delay)
        mouse.moveMouse(340, 147)
        sleep(delay)
        macro.mouseDown()
        sleep(delay)
        mouse.moveMouse(295, 167)
        sleep(delay)
        macro.mouseUp()
        sleep(delay)
        mouse.moveMouse(167, 323)
        sleep(delay)
        macro.mouseClick()
        sleep(delay)
        k.send_keys("{ENTER}" "{ENTER}")
        sleep(delay)
        if keyboard.is_pressed("c"):
            run = False
            print("stop")
            pass
        if i >= 2000:
            print("stop")
            run = False
        i = i + 1
        # k.send_keys(
        #     "{VK_LMENU down}"
        #     "{i down}"
        #     "{i up}"
        #     "{a down}"
        #     "{a up}"
        #     "{VK_LMENU up}"
        # )
        sleep(0.5)
        status = mouse.getItemStatus()
        text = ("\ntime " + str(datetime.datetime.today()) + "\n"
                "mpw : " + str(status.mpw) + "\n"
                "defend : " + str(status.defend) + "\n"
                "mspd : " + str(status.mspd) + "\n"
                "hp : " + str(status.hp) + "\n"
                "dmg : " + str(status.dmg) + "\n")
        print(text)
        f = open("stats/inden.txt", "a")
        f.write(text)
        f.close()
        if status.hp >= 3:
            print("Opt Found")
            run = False