script set: union

code

ev_union_flag_change:
    end()

ev_union_init_change:
    end()

ev_union_obj_change:
    union_obj_all_vanish()
    end()

ev_connect_union_comm_obj:
    talk_obj_start()
    union_id_set(work: 246)
    ldwk(work: 238, work: 246)
    ifval_jump(work: 246, "EQ", "UNION_PARENT_CONNECT_NG", "ev_connect_union_talk_obj_ng")
    union_trainer_name_regist("UNION_TALK_CHILD")
    ifval_jump(work: 246, "EQ", "UNION_PARENT_OEKAKI_OK", "ev_connect_union_talk_obj_oekaki")
    ifval_jump(work: 246, "EQ", "UNION_PARENT_RECORD_OK", "ev_connect_union_talk_obj_record")
    union_connect_start(work: 238, work: 246)
    union_id_set(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_PARENT_CONNECT_NG", "ev_connect_union_talk_obj_ng")
    talkmsg("msg_connect_union_08")
    union_result_get(work: 246)
    switch(work: 246)
    case_jump("UNION_CONNECT_PARENT", "ev_connect_union_receive_obj")
    case_jump("UNION_CONNECT_FAILED", "ev_connect_union_talk_obj_failed")
    jump("ev_connect_union_child_menu")
    end()

ev_connect_union_child_menu:
    comm_synchronize("UNION_SYNCHRO_CONNECTSTART")
    union_get_talk_number("UNION_CONNECT_SUCCESS_TALK", work: 246)
    talkmsg_sp_auto(work: 246)
    jump("ev_connect_union_child_menu_select")
    end()

ev_connect_union_next_child_menu:
    comm_synchronize("UNION_SYNCHRO_CONNECTSTART")
    union_beacon_change("UNION_PARENT_MODE_PARTY")
    union_get_talk_number("UNION_SELECT_NEXT_TALK", work: 246)
    talkmsg_sp(work: 246)
    jump("ev_connect_union_child_menu_select")
    end()

ev_connect_union_child_menu_select:
    bmpmenu_init(24.0, 5.0, 0.0, 1.0, work: 246)
    bmpmenu_make_list("msg_ev_win_142", 0.0)
    bmpmenu_make_list("msg_ev_win_064", 1.0)
    bmpmenu_make_list("msg_ev_win_054", 2.0)
    bmpmenu_make_list("msg_ev_win_027", 3.0)
    bmpmenu_make_list("msg_ev_win_136", 4.0)
    bmpmenu_make_list("msg_ev_win_028", 5.0)
    union_bmpmenu_start()
    switch(work: 246)
    case_jump(0.0, "ev_connect_union_talk_obj_00")
    case_jump(1.0, "ev_connect_union_talk_obj_03")
    case_jump(2.0, "ev_connect_union_talk_obj_02")
    case_jump(3.0, "ev_connect_union_talk_obj_01")
    case_jump(4.0, "ev_connect_union_talk_obj_12")
    case_jump(7.0, "ev_connect_union_connect_parent_killed")
    union_script_result_set("UNION_SELECT_EVENT", "UNION_CHILD_SELECT_CANCEL")
    jump("ev_connect_union_connect_kill")
    end()

ev_connect_union_talk_obj_00:
    union_script_result_set("UNION_SELECT_EVENT", "UNION_CHILD_SELECT_CARD")
    union_get_talk_number("UNION_CONNECT_ANSWER_WAIT", work: 246)
    ifval_jump(work: 246, "EQ", 0.0, "ev_cnnect_union_talk_obj_00_01")
    talkmsg_sp(work: 246)
    jump("ev_cnnect_union_talk_obj_00_01")

ev_cnnect_union_talk_obj_00_01:
    union_parent_start_command_set(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_CHILD_SELECT_CANCEL", "ev_connect_union_card_canceled")
    union_beacon_change("UNION_PARENT_MODE_CARDNOW")
    union_get_talk_number("UNION_CONNECTED_START_TALK", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    comm_synchronize("UNION_CHILD_SELECT_CARD")
    talk_close()
    black_out("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    tr_card_set_proc()
    set_map_proc()
    call("ev_union_return_setup")
    talkmsg_allput("msg_union_connect_01_02_4")
    jump("ev_connect_union_next_child_menu")
    end()

ev_connect_union_talk_obj_01:
    get_poke_count2(work: 246)
    ifval_jump(work: 246, "LT", 2.0, "ev_connect_union_talk_trade_reject")
    union_script_result_set("UNION_SELECT_EVENT", "UNION_CHILD_SELECT_TRDE")
    union_get_talk_number("UNION_CONNECT_ANSWER_WAIT", work: 246)
    ifval_jump(work: 246, "EQ", 0.0, "ev_connect_union_talk_obj_01_01")
    talkmsg_sp(work: 246)
    jump("ev_connect_union_talk_obj_01_01")

ev_connect_union_talk_obj_01_01:
    union_parent_start_command_set(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_CHILD_SELECT_CANCEL", "ev_connect_union_trade_canceled")
    union_beacon_change("UNION_PARENT_MODE_TRADENOW")
    union_get_talk_number("UNION_CONNECTED_START_TALK", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    comm_synchronize("UNION_CHILD_SELECT_TRDE")
    talk_close()
    black_out("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    trade_list_set_proc()
    set_map_proc()
    call("ev_union_return_setup")
    jump("ev_connect_union_next_child_menu")
    end()

ev_connect_union_talk_trade_reject:
    union_get_talk_number("UNION_CONNECT_TRADE_REJECT", work: 246)
    talkmsg_sp(work: 246)
    jump("ev_connect_union_next_child_menu")
    end()

ev_connect_union_talk_obj_02:
    poke_level_chk(work: 246, 30.0)
    ifval_jump(work: 246, "LT", 2.0, "ev_connect_union_talk_battle_reject")
    union_script_result_set("UNION_SELECT_EVENT", "UNION_CHILD_SELECT_BATTLE")
    union_get_talk_number("UNION_CONNECT_ANSWER_WAIT", work: 246)
    ifval_jump(work: 246, "EQ", 0.0, "ev_cnnect_union_talk_obj_02_01")
    talkmsg_sp(work: 246)
    jump("ev_cnnect_union_talk_obj_02_01")

ev_cnnect_union_talk_obj_02_01:
    union_parent_start_command_set(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_CHILD_SELECT_CANCEL", "ev_connect_union_battle_canceled")
    union_beacon_change("UNION_PARENT_MODE_BATTLENOW")
    union_get_talk_number("UNION_CONNECTED_START_TALK", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    comm_synchronize("UNION_CHILD_SELECT_BATTLE")
    talk_close()
    black_out("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    union_pokelist_set_proc()
    set_map_proc()
    black_in("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    talkmsg("msg_connect_union_11")
    comm_synchronize("UNION_SYNCHRO_POKELIST")
    talk_close()
    union_battle_start_check(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_BATTLE_MY_CANCEL", "ev_connect_union_battle_cancel")
    ifval_jump(work: 246, "EQ", "UNION_BATTLE_PARTNER_CANCEL", "ev_connect_union_battle_cancel")
    debug_sio_encount()
    call("ev_union_return_setup")
    jump("ev_connect_union_next_child_menu")
    end()

ev_connect_union_talk_battle_reject:
    union_get_talk_number("UNION_CONNECT_BATTLE_REJECT", work: 246)
    talkmsg_sp(work: 246)
    jump("ev_connect_union_next_child_menu")
    end()

ev_connect_union_talk_obj_03:
    union_script_result_set("UNION_SELECT_EVENT", "UNION_CHILD_SELECT_OEKAKI")
    union_get_talk_number("UNION_CONNECT_ANSWER_WAIT", work: 246)
    ifval_jump(work: 246, "EQ", 0.0, "ev_cnnect_union_talk_obj_03_01")
    talkmsg_sp(work: 246)
    jump("ev_cnnect_union_talk_obj_03_01")

ev_cnnect_union_talk_obj_03_01:
    union_parent_start_command_set(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_CHILD_SELECT_CANCEL", "ev_connect_union_oekaki_canceled")
    union_get_talk_number("UNION_CONNECTED_START_TALK", work: 246)
    talkmsg_sp(work: 246)
    ab_key_time_wait("UNION_EVNET_PRE_WAIT")
    comm_synchronize("UNION_CHILD_SELECT_OEKAKI")
    talk_close()
    black_out("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    oekaki_board_set_proc()
    set_map_proc()
    call("ev_union_return_setup")
    jump("ev_connect_union_talk_obj_10")
    end()

ev_connect_union_talk_obj_12:
    union_script_result_set("UNION_SELECT_EVENT", "UNION_CHILD_SELECT_RECORD")
    union_get_talk_number("UNION_CONNECT_ANSWER_WAIT", work: 246)
    ifval_jump(work: 246, "EQ", 0.0, "ev_cnnect_union_talk_obj_12_01")
    talkmsg_sp(work: 246)
    jump("ev_cnnect_union_talk_obj_12_01")

ev_cnnect_union_talk_obj_12_01:
    union_parent_start_command_set(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_CHILD_SELECT_CANCEL", "ev_connect_union_record_canceled")
    union_get_talk_number("UNION_CONNECTED_START_TALK", work: 246)
    talkmsg_sp(work: 246)
    ab_key_time_wait("UNION_EVNET_PRE_WAIT")
    comm_synchronize("UNION_CHILD_SELECT_RECORD")
    talk_close()
    black_out("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    record_corner_set_proc()
    set_map_proc()
    call("ev_union_return_setup")
    jump("ev_connect_union_talk_obj_10")
    end()

ev_connect_union_talk_obj_10:
    talk_obj_end()
    end()

ev_connect_union_talk_obj_04:
    union_script_result_set("UNION_SELECT_EVENT", 1.0)
    talk_close()
    talk_obj_end()
    end()

ev_connect_union_talk_obj_failed:
    talk_keywait("msg_union_talkboy_00_03")
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    talk_close()
    union_connect_talk_ok()
    talk_obj_end()
    end()

ev_connect_union_talk_obj_ng:
    union_connect_talk_denied()
    union_get_talk_number("UNION_NO_CONNECT_TALK", work: 246)
    talkmsg_sp(work: 246)
    ab_keywait()
    talk_close()
    union_connect_talk_ok()
    talk_obj_end()
    end()

ev_connect_union_talk_obj_oekaki:
    union_connect_talk_denied()
    union_get_talk_number("UNION_JOIN_OEKAKI_TALK", work: 246)
    talkmsg_sp(work: 246)
    yes_no_win(work: 246)
    ifval_jump(work: 246, "EQ", 1.0, "no_connect_union_talk_obj_oekaki")
    union_connect_start(work: 238, work: 246)
    ifval_jump(work: 246, "EQ", "UNION_PARENT_CONNECT_NG", "ev_connect_union_talk_obj_failed")
    union_result_get(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_CONNECT_FAILED", "ev_connect_union_talk_obj_failed")
    union_get_talk_number("UNION_SUCCESS_OEKAKI_JOIN", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    talk_close()
    black_out("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    oekaki_board_set_proc()
    set_map_proc()
    black_in("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    jump("ev_connect_union_talk_obj_10")
    end()

no_connect_union_talk_obj_oekaki:
    union_get_talk_number("UNION_JOIN_OEKAKI_NO", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    union_connect_talk_ok()
    talk_close()
    talk_obj_end()
    end()

ev_connect_union_talk_obj_record:
    union_connect_talk_denied()
    union_get_talk_number("UNION_JOIN_RECORD_TALK", work: 246)
    talkmsg_sp(work: 246)
    yes_no_win(work: 246)
    ifval_jump(work: 246, "EQ", 1.0, "no_connect_union_talk_obj_record")
    union_connect_start(work: 238, work: 246)
    ifval_jump(work: 246, "EQ", "UNION_PARENT_CONNECT_NG", "ev_connect_union_talk_obj_failed")
    union_result_get(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_CONNECT_FAILED", "ev_connect_union_talk_obj_failed")
    union_get_talk_number("UNION_SUCCESS_RECORD_JOIN", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    talk_close()
    black_out("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    record_corner_set_proc()
    set_map_proc()
    black_in("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    jump("ev_connect_union_talk_obj_10")
    end()

no_connect_union_talk_obj_record:
    union_get_talk_number("UNION_JOIN_RECORD_NO", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    talk_close()
    union_connect_talk_ok()
    talk_obj_end()
    end()

no_connect_union_talk_obj_guruguru:
    union_get_talk_number("UNION_JOIN_GURUGURU_NO", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    talk_close()
    talk_obj_end()
    end()

ev_connect_union_card_canceled:
    union_get_talk_number("UNION_TALK_CANCEL_CARD", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    jump("ev_connect_union_connect_talk_end")
    end()

ev_connect_union_oekaki_canceled:
    union_get_talk_number("UNION_TALK_CANCEL_OEKAKI", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    jump("ev_connect_union_connect_talk_end")
    end()

ev_connect_union_battle_canceled:
    union_get_talk_number("UNION_TALK_CANCEL_BATTLE", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    jump("ev_connect_union_connect_talk_end")
    end()

ev_connect_union_trade_canceled:
    union_get_talk_number("UNION_TALK_CANCEL_TRADE", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    jump("ev_connect_union_connect_talk_end")
    end()

ev_connect_union_guruguru_canceled:
    union_get_talk_number("UNION_TALK_CANCEL_GURUGURU", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    jump("ev_connect_union_connect_talk_end")
    end()

ev_connect_union_record_canceled:
    union_get_talk_number("UNION_TALK_CANCEL_RECORD", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    jump("ev_connect_union_connect_talk_end")
    end()

ev_connect_union_connect_kill:
    union_get_talk_number("UNION_TALK_CONNECT_CANCEL", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    comm_synchronize("UNION_SYNCHRO_CONNECTEND")
    talk_close()
    union_connect_cut_restart()
    talk_obj_end()
    end()

ev_connect_union_connect_parent_killed:
    union_get_talk_number("UNION_TALK_CONNECT_CANCELED", work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    comm_synchronize("UNION_SYNCHRO_CONNECTEND")
    talk_close()
    union_connect_cut_restart()
    talk_obj_end()
    end()

ev_connect_union_connect_talk_end:
    comm_synchronize("UNION_SYNCHRO_CONNECTEND")
    talk_close()
    union_connect_cut_restart()
    talk_obj_end()
    end()

ev_connect_union_receive_obj:
    event_start()
    se_play("SE_UNION_TALK")
    union_trainer_name_regist("UNION_TALK_PARENT")
    talkmsg_sp_auto("msg_union_connect_00_02")
    ab_key_time_wait(30.0)
    jump("ev_connect_union_receive_menu")
    end()

ev_connect_union_receive_menu:
    talkmsg("msg_union_connect_00_04")
    comm_synchronize("UNION_SYNCHRO_CONNECTSTART")
    union_beacon_change("UNION_PARENT_MODE_PARTY")
    union_child_select_command_set(work: 246)
    switch(work: 246)
    case_jump("UNION_CHILD_SELECT_CARD", "ev_connect_union_receive_obj_01")
    case_jump("UNION_CHILD_SELECT_OEKAKI", "ev_connect_union_receive_obj_04")
    case_jump("UNION_CHILD_SELECT_BATTLE", "ev_connect_union_receive_obj_03")
    case_jump("UNION_CHILD_SELECT_TRDE", "ev_connect_union_receive_obj_02")
    case_jump("UNION_CHILD_SELECT_RECORD", "ev_connect_union_receive_obj_12")
    case_jump("UNION_CHILD_SELECT_CANCEL", "ev_connect_union_connect_killed")
    case_jump("UNION_PARENT_SELECT_CANCEL", "ev_connect_union_connect_my_kill")
    end()

ev_connect_union_receive_obj_01:
    talkmsg("msg_union_connect_01_01")
    yes_no_win(work: 246)
    ifval_jump(work: 246, "EQ", 1.0, "no_connect_union_receive_obj_01")
    union_script_result_set("UNION_YESNO_RESULT", 0.0)
    talk_close()
    union_parent_start_command_set(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_CHILD_SELECT_CANCEL", "ev_connect_union_card_cancel")
    union_get_card_talk_no(work: 246)
    talkmsg_sp(work: 246)
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    comm_synchronize("UNION_CHILD_SELECT_CARD")
    talk_close()
    union_beacon_change("UNION_PARENT_MODE_CARDNOW")
    black_out("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    tr_card_set_proc()
    set_map_proc()
    call("ev_union_return_setup")
    jump("ev_connect_union_receive_menu")
    end()

no_connect_union_receive_obj_01:
    union_script_result_set("UNION_YESNO_RESULT", 1.0)
    talk_keywait("msg_union_connect_01_03")
    jump("ev_connect_union_connect_event_end")
    end()

ev_connect_union_receive_obj_02:
    talkmsg("msg_union_connect_04_01")
    yes_no_win(work: 246)
    ifval_jump(work: 246, "EQ", 1.0, "no_connect_union_receive_obj_02")
    get_poke_count2(work: 246)
    ifval_jump(work: 246, "LT", 2.0, "no_connecT_union_reject_trade")
    union_script_result_set("UNION_YESNO_RESULT", 0.0)
    talk_close()
    union_parent_start_command_set(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_CHILD_SELECT_CANCEL", "ev_connect_union_connect_killed")
    talkmsg("msg_union_connect_04_02")
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    comm_synchronize("UNION_CHILD_SELECT_TRDE")
    talk_close()
    union_beacon_change("UNION_PARENT_MODE_TRADENOW")
    black_out("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    trade_list_set_proc()
    set_map_proc()
    union_beacon_change("UNION_PARENT_MODE_PARTY")
    call("ev_union_return_setup")
    jump("ev_connect_union_receive_menu")
    end()

no_connect_union_receive_obj_02:
    union_script_result_set("UNION_YESNO_RESULT", 1.0)
    talk_keywait("msg_union_connect_02_03")
    jump("ev_connect_union_connect_event_end")
    end()

no_connecT_union_reject_trade:
    union_script_result_set("UNION_YESNO_RESULT", 1.0)
    talk_keywait("msg_union_connect_04_04")
    jump("ev_connect_union_connect_event_end")
    end()

ev_connect_union_receive_obj_03:
    talkmsg("msg_union_connect_03_01")
    yes_no_win(work: 246)
    ifval_jump(work: 246, "EQ", 1.0, "no_connect_union_receive_obj_03")
    poke_level_chk(work: 246, 30.0)
    ifval_jump(work: 246, "LT", 2.0, "no_connect_union_reject_battle")
    union_script_result_set("UNION_YESNO_RESULT", 0.0)
    talk_close()
    union_parent_start_command_set(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_CHILD_SELECT_CANCEL", "ev_connect_union_connect_killed")
    talkmsg("msg_union_connect_03_02")
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    comm_synchronize("UNION_CHILD_SELECT_BATTLE")
    talk_close()
    union_beacon_change("UNION_PARENT_MODE_BATTLENOW")
    black_out("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    union_pokelist_set_proc()
    set_map_proc()
    black_in("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    talkmsg("msg_connect_union_11")
    comm_synchronize("UNION_SYNCHRO_POKELIST")
    talk_close()
    union_battle_start_check(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_BATTLE_MY_CANCEL", "ev_connect_union_battle_cancel")
    ifval_jump(work: 246, "EQ", "UNION_BATTLE_PARTNER_CANCEL", "ev_connect_union_battle_cancel")
    debug_sio_encount()
    union_beacon_change("UNION_PARENT_MODE_PARTY")
    call("ev_union_return_setup")
    jump("ev_connect_union_receive_menu")
    end()

no_connect_union_receive_obj_03:
    union_script_result_set("UNION_YESNO_RESULT", 1.0)
    talk_keywait("msg_union_connect_03_03")
    jump("ev_connect_union_connect_event_end")
    end()

no_connect_union_reject_battle:
    union_script_result_set("UNION_YESNO_RESULT", 1.0)
    talk_keywait("msg_union_connect_03_04")
    jump("ev_connect_union_connect_event_end")
    end()

ev_connect_union_receive_obj_12:
    talkmsg("msg_union_connect_05_01")
    yes_no_win(work: 246)
    ifval_jump(work: 246, "EQ", 1.0, "no_connect_union_receive_obj_03")
    union_script_result_set("UNION_YESNO_RESULT", 0.0)
    talk_close()
    union_parent_start_command_set(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_CHILD_SELECT_CANCEL", "ev_connect_union_connect_killed")
    talkmsg("msg_union_connect_05_02")
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    comm_synchronize("UNION_CHILD_SELECT_RECORD")
    talk_close()
    union_beacon_change("UNION_PARENT_MODE_RECORD_FREE")
    black_out("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    record_corner_set_proc()
    set_map_proc()
    call("ev_union_return_setup")
    talk_obj_end()
    end()

ev_connect_union_receive_obj_04:
    talkmsg("msg_union_connect_02_01")
    yes_no_win(work: 246)
    ifval_jump(work: 246, "EQ", 1.0, "no_connect_union_receive_obj_04")
    union_script_result_set("UNION_YESNO_RESULT", 0.0)
    talk_close()
    union_parent_start_command_set(work: 246)
    ifval_jump(work: 246, "EQ", "UNION_CHILD_SELECT_CANCEL", "ev_connect_union_connect_killed")
    talkmsg("msg_union_connect_02_02")
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    comm_synchronize("UNION_CHILD_SELECT_OEKAKI")
    talk_close()
    union_beacon_change("UNION_PARENT_MODE_OEKAKI_FREE")
    black_out("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    wipe_fade_end_check()
    oekaki_board_set_proc()
    set_map_proc()
    call("ev_union_return_setup")
    talk_obj_end()
    end()

no_connect_union_receive_obj_04:
    union_script_result_set("UNION_YESNO_RESULT", 1.0)
    talk_keywait("msg_union_connect_04_03")
    jump("ev_connect_union_connect_event_end")
    end()

ev_connect_union_card_cancel:
    talkmsg("msg_union_connect_06_03")
    jump("ev_connect_union_connect_event_end")
    end()

ev_connect_union_battle_cancel:
    union_beacon_change("UNION_PARENT_MODE_PARTY")
    talkmsg("msg_union_connect_03_05")
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    jump("ev_connect_union_connect_event_end")
    end()

ev_connect_union_connect_killed:
    talkmsg("msg_union_connect_00_03")
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    jump("ev_connect_union_connect_event_end")
    end()

ev_connect_union_connect_my_kill:
    talkmsg("msg_union_connect_00_05")
    time_wait("UNION_EVNET_PRE_WAIT", work: 246)
    jump("ev_connect_union_connect_event_end")
    end()

ev_connect_union_connect_event_end:
    comm_synchronize("UNION_SYNCHRO_CONNECTEND")
    talk_close()
    union_connect_cut_restart()
    event_end()
    end()

ev_connect_union_receive_yameru:
    union_script_result_set("UNION_YESNO_RESULT", 1.0)
    talk_close()
    talk_obj_end()
    end()

ev_union_return_setup:
    union_return_setup()
    black_in("SCR_WIPE_DIV", "SCR_WIPE_SYNC")
    ret()

ev_connect_union_dummy:
    easy_obj_msg("msg_connect_union_16")
    end()

ev_connect_union_talk_obj:
    talk_obj_start()
    jump("ev_connect_union_talk_obj_ng")
    end()

ev_connect_union_guide:
    talk_obj_start()
    jump("ev_connect_union_guide_menu_01")
    end()

ev_connect_union_guide_menu_01:
    union_connect_talk_denied()
    if_flagon_call(flag: 148, "ev_connect_union_guide_talk_on")
    if_flagoff_call(flag: 148, "ev_connect_union_guide_talk_off")
    flag_set(flag: 148)
    bmpmenu_init(21.0, 11.0, 0.0, 1.0, work: 246)
    bmpmenu_make_list("msg_ev_win_011", 0.0)
    bmpmenu_make_list("msg_ev_win_143", 1.0)
    bmpmenu_make_list("msg_ev_win_028", 2.0)
    bmpmenu_start()
    switch(work: 246)
    case_jump(0.0, "ev_connect_union_guide_00")
    case_jump(1.0, "ev_connect_union_guide_01")
    jump("ev_connect_union_guide_02")
    end()

ev_connect_union_guide_talk_on:
    talkmsg("msg_union_info_01_02")
    ret()

ev_connect_union_guide_talk_off:
    talkmsg("msg_union_info_01_01")
    ret()

ev_connect_union_guide_01:
    union_get_info_talk_no(work: 246)
    talkmsg_sp(work: 246)
    jump("ev_connect_union_guide_menu_01")
    end()

ev_connect_union_guide_02:
    union_connect_talk_ok()
    talk_close()
    talk_obj_end()
    end()

ev_connect_union_guide_00:
    talkmsg("msg_union_info_01_03")
    bmpmenu_init(24.0, 5.0, 0.0, 1.0, work: 246)
    bmpmenu_make_list("msg_ev_win_054", 0.0)
    bmpmenu_make_list("msg_ev_win_027", 1.0)
    bmpmenu_make_list("msg_ev_win_136", 2.0)
    bmpmenu_make_list("msg_ev_win_064", 3.0)
    bmpmenu_make_list("msg_ev_win_144", 4.0)
    bmpmenu_make_list("msg_ev_win_013", 5.0)
    bmpmenu_start()
    switch(work: 246)
    case_jump(0.0, "ev_connect_union_guide_10")
    case_jump(1.0, "ev_connect_union_guide_11")
    case_jump(2.0, "ev_connect_union_guide_12")
    case_jump(3.0, "ev_connect_union_guide_14")
    case_jump(4.0, "ev_connect_union_guide_15")
    jump("ev_connect_union_guide_menu_01")
    end()

ev_connect_union_guide_10:
    talk_keywait("msg_union_info_01_04")
    jump("ev_connect_union_guide_00")
    end()

ev_connect_union_guide_11:
    talk_keywait("msg_union_info_01_05")
    jump("ev_connect_union_guide_00")
    end()

ev_connect_union_guide_12:
    talk_keywait("msg_union_info_01_06")
    jump("ev_connect_union_guide_00")
    end()

ev_connect_union_guide_14:
    talk_keywait("msg_union_info_01_08")
    jump("ev_connect_union_guide_00")
    end()

ev_connect_union_guide_15:
    talk_keywait("msg_union_info_01_09")
    jump("ev_connect_union_guide_00")
    end()

ev_connect_union_guide_16:
    jump("ev_connect_union_guide_menu_01")
    end()