Ejemplo n.º 1
0
def sort_card(by, reverse=True):
    ma = MA()
    login = ma.login(config.loginId, config.password)
    ma.masterdata_card()
    for card in ma.cards.values():
        card.hp_power = card.hp + card.power
        card.cp =  card.hp_power / card.cost
        card.lvmax_hp_power = card.lvmax_hp + card.lvmax_power
        card.lvmax_cp = card.lvmax_hp_power / card.cost

    return sorted(ma.cards.values(), key=lambda x: getattr(x, by),
            reverse=reverse)
Ejemplo n.º 2
0
def sort_card(by, reverse=True):
    ma = MA()
    login = ma.login(config.loginId, config.password)
    ma.masterdata_card()
    for card in ma.cards.values():
        card.hp_power = card.hp + card.power
        card.cp = card.hp_power / card.cost
        card.lvmax_hp_power = card.lvmax_hp + card.lvmax_power
        card.lvmax_cp = card.lvmax_hp_power / card.cost

    return sorted(ma.cards.values(),
                  key=lambda x: getattr(x, by),
                  reverse=reverse)
Ejemplo n.º 3
0
        (571, 444, 0, lambda: time.sleep(2)),  #go
        (560, 514, 0, None),  # go
    ]
    for i, (x, y, color, text) in enumerate(steps):
        print 'step %d' % i
        if color:
            while color_like(get_color(x, y), color) > 10:
                time.sleep(1)
        click(x, y)
        if text:
            if callable(text):
                text = text()
            if text:
                time.sleep(1)
                send(text)
        time.sleep(1)
    # over
    while get_color(619, 601) == 0:
        click(619, 601)
        time.sleep(1)

    from ma import MA
    print tel, code
    ma = MA()
    ma.login(tel, PASSWORD)
    ma.save_character(tel)

    ma.tutorial_next(7030)
    ma.tutorial_next(8000)
    os.system(r'"C:\Program Files\BlueStacks\HD-Quit.exe"')
Ejemplo n.º 4
0
import sys
from ma import MA

login_id = sys.argv[1]
password = sys.argv[2]
#regist = sys.argv[3]

ma = MA()
ma.login(login_id, password)
#ma.check_inspection()
#ma.notification_post_devicetoken(login_id, password)
#try:
#ma.regist(login_id, password, regist)
#except:
#pass
ma.save_character(login_id)

ma.tutorial_next(7030)
ma.tutorial_next(8000)
Ejemplo n.º 5
0
        (571, 444, 0, lambda: time.sleep(2)),   #go
        (560, 514, 0, None),  # go
        ]
    for i, (x, y, color, text) in enumerate(steps):
        print 'step %d' % i
        if color:
            while color_like(get_color(x, y), color) > 10:
                time.sleep(1)
        click(x, y)
        if text:
            if callable(text):
                text = text()
            if text:
                time.sleep(1)
                send(text)
        time.sleep(1)
    # over
    while get_color(619, 601) == 0:
        click(619, 601)
        time.sleep(1)

    from ma import MA
    print tel, code
    ma = MA()
    ma.login(tel, PASSWORD)
    ma.save_character(tel)

    ma.tutorial_next(7030)
    ma.tutorial_next(8000)
    os.system(r'"C:\Program Files\BlueStacks\HD-Quit.exe"')
Ejemplo n.º 6
0
import sys
from ma import MA

login_id = sys.argv[1]
password = sys.argv[2]
#regist = sys.argv[3]

ma = MA()
ma.login(login_id, password)
#ma.check_inspection()
#ma.notification_post_devicetoken(login_id, password)
#try:
    #ma.regist(login_id, password, regist)
#except:
    #pass
ma.save_character(login_id)

ma.tutorial_next(7030)
ma.tutorial_next(8000)