Пример #1
0
def postprocess_server_quest_failed(server, opcode, data):
    global expert_id, work_order_id

    (quest_id, unknown) = struct.unpack("=HB", data)

    if quest_id == 5400:
        constructors.client_npcoption(server.client, expert_id, 1002, 1, 4, work_order_id, 0)
Пример #2
0
def postprocess_server_craft_status(server, opcode, data):
    global success, failure, expert_id, work_order_id, table_id, craft_id, recipe_id, ingredients

    (player_id, objid, unknown, status) = struct.unpack("=2IHB", data)

    if player_id != 0x30562:
        return

    if status == 0 or status == 1:
        return

    if status == 2:
        success += 1

    if status == 4:
        failure += 1

    if success + failure >= 4:

        if success < 3:
            constructors.client_abandon_quest(server.client, work_order_id)
        else:
            constructors.client_npcoption(server.client, expert_id, 17, 1, 5, work_order_id, 0)

        return

    constructors.client_craft(server.client, 128, craft_id, recipe_id, table_id, ingredients)
Пример #3
0
def postprocess_server_craft_status(server, opcode, data):
    global success, failure, expert_id, work_order_id, table_id, craft_id, recipe_id, ingredients

    (player_id, objid, unknown, status) = struct.unpack('=2IHB', data)

    if player_id != 0x30562:
        return

    if status == 0 or status == 1:
        return

    if status == 2:
        success += 1

    if status == 4:
        failure += 1

    if success + failure >= 4:

        if success < 3:
            constructors.client_abandon_quest(server.client, work_order_id)
        else:
            constructors.client_npcoption(server.client, expert_id, 17, 1, 5,
                                          work_order_id, 0)

        return

    constructors.client_craft(server.client, 128, craft_id, recipe_id,
                              table_id, ingredients)
Пример #4
0
def postprocess_server_quest_failed(server, opcode, data):
    global expert_id, work_order_id

    (quest_id, unknown) = struct.unpack('=HB', data)

    if quest_id == 5400:
        constructors.client_npcoption(server.client, expert_id, 1002, 1, 4,
                                      work_order_id, 0)