Пример #1
0
def main():

    name = "闻人晓"
    auth, socket_url = utils.getRoleConfig(name)
    mud = MudClient(auth, socket_url)
    mud.login()
    mineTask = MineTaskMatchine(name, TaskStatus.STARTING)
    dailyTask = DailyTaskMachine(name, TaskStatus.STARTING)
    goodUseMatchine = GoodUseMatchine("养精丹", None)
    dupMatchine = DuplicateTask(name, TaskStatus.STARTING, "dupBY")
    signinTaskIsOver = False
    goodUse = False

    isDoingDailyTask = True
    isDoingDuplicateTask = True
    while isDoingDailyTask:
        value = mud.flush()
        msg, flag = logger.info(value)
        flows = dailyTask.doTask(msg)
        doCommond(mud, flows)
        if dailyTask.status is TaskStatus.END:
            isDoingDailyTask = False
            print(isDoingDailyTask)

    flows = goodUseMatchine.open()
    doCommond(mud, flows)
    for i in range(8):
        value = mud.flush()
        msg, flag = logger.info(value)
        if goodUseMatchine.isOpen is True:
            flows = goodUseMatchine.mathineDo(msg)
        doCommond(mud, flows)

    while isDoingDuplicateTask:
        value = mud.flush()
        msg, flag = logger.info(value)
        flows = dupMatchine.doTask(msg, 0)
        if dupMatchine.status is TaskStatus.OVER:
            isDoingDuplicateTask = False
            print(isDoingDailyTask)
        doCommond(mud, flows)

    doCommond(mud, ['taskover signin'])

    for i in range(30):
        value = mud.flush()
        msg, flag = logger.info(value)
        flows = mineTask.doTask(msg)
        doCommond(mud, flows)

    mud.close()
    logger.close()
Пример #2
0
def test():
    name = "韦晓宝"
    auth, socket_url = utils.getRoleConfig(name)
    mud = MudClient(auth, socket_url)
    mud.login()
    #taskMatchine = LearnTaskMatchine(name,TaskStatus.STARTING)
    mineTask = MineTaskMatchine(name, TaskStatus.STARTING)
    dailyTask = DailyTaskMachine(name, TaskStatus.STARTING)
    for i in range(2000):
        value = mud.flush()
        msg, flag = logger.info(value)
        flows = dailyTask.doTask(msg)
        if dailyTask.status is TaskStatus.END:
            flows = mineTask.doTask(msg)
        doCommond(mud, flows)
    mud.close()
    logger.close()
Пример #3
0
def test():
    name = "闻人晓"
    auth, socket_url = utils.getRoleConfig(name)
    mud = MudClient(auth, socket_url)
    mud.login()
    mineTask = MineTaskMatchine(name, TaskStatus.STARTING)
    goodUseMatchine = GoodUseMatchine("养精丹", None)
    flows = goodUseMatchine.open()
    doCommond(mud, flows)
    for i in range(100):
        value = mud.flush()
        msg, flag = logger.info(value)
        if goodUseMatchine.isOpen is True:
            flows = goodUseMatchine.mathineDo(msg)
        else:
            flows = mineTask.doTask(msg)
        doCommond(mud, flows)
    mud.close()
    logger.close()
Пример #4
0
def test():
    name = "韦晓宝"
    auth,socket_url = utils.getRoleConfig(name)
    mud = MudClient(auth,socket_url)
    mud.login()
    signinTaskIsOver = False
    #dupOne  dupBY
    dupMatchine = DuplicateTask(name,TaskStatus.STARTING,"dupBY")
    mineTask = MineTaskMatchine(name,TaskStatus.STARTING)
    for i in range (11000):
        value = mud.flush()
        msg,flag = logger.info(value)
        flows = dupMatchine.doTask(msg,i)
        if dupMatchine.status is TaskStatus.OVER:
            flows = mineTask.doTask(msg)
            if signinTaskIsOver is False :
                flows.append('taskover signin')
                signinTaskIsOver = True
        doCommond(mud,flows)
    mud.close()
    logger.close()
Пример #5
0
def main():
    name = "闻人晓"
    auth, socket_url = utils.getRoleConfig(name)
    mud = MudClient(auth, socket_url)
    mud.login()
    taskMatchine = LearnTaskMatchine(name, TaskStatus.STARTING)
    mineTask = MineTaskMatchine(name, TaskStatus.STARTING)
    tag = True
    while tag:
        value = mud.flush()
        msg, flag = logger.info(value)
        flows = taskMatchine.doTask(msg)
        if taskMatchine.status is TaskStatus.OVER:
            flows = mineTask.doTask(msg)
            tag = False
        doCommond(mud, flows)

    for i in range(20):
        value = mud.flush()
        logger.info(value)

    mud.close()
    logger.close()