Пример #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 open_bank():
    while mouse.get_freeze_dialog() != DIALOG['bank']:
        mouse.moveMouse(790, 228)
        sleep(0.5)
        mouseClick()
        sleep(0.5)
        k.send_keys('{ENTER}')
        sleep(0.5)

    # password
    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}' )
    sleep(0.5)
    k.send_keys('{ENTER}')
Пример #4
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")
Пример #5
0
def checkShop():
    return mouse.get_freeze_dialog() == DIALOG['shop']
Пример #6
0
def checkBank():
    return mouse.get_freeze_dialog() == DIALOG['bank']
Пример #7
0
def close_item_shop():
    while mouse.get_freeze_dialog() == DIALOG['shop']:
        k.send_keys("{VK_ESCAPE}")
        sleep(0.5)
Пример #8
0
def close_bank():
    while mouse.get_freeze_dialog() == DIALOG['bank']:
        k.send_keys("{VK_ESCAPE}")
        sleep(0.5)
Пример #9
0
from datetime import datetime
import auto_purchase
import struct
import os

print(os.path.basename(__file__))
user_id = mouse.getUserId()
print(user_id)
# deret sini jgn di ubah
k = p.keyboard


def process_value(value):
    return struct.pack('@i', value)


while True:
    if keyboard.is_pressed("-"):
        print(mouse.get_freeze_dialog())
        print(mouse.get_item_bank_status())
        print(mouse.getItemValue())
        print(mouse.getPosition())
        sleep(0.2)

    if keyboard.is_pressed("]"):
        value = input("value : ")
        print(value)
        result = mouse.scan_memory(int(value))
        print(result)
        sleep(0.2)