﻿from ScenarioHelper import *

def main():
    CreateScenaFile(
        "t1020.bin",                # FileName
        "t1020",                    # MapName
        "t1020",                    # Location
        0x0095,                     # MapIndex
        "ed7565",
        0x00002000,                 # Flags
        ("", "", "", "", "", ""),   # include
        0x00,                       # PlaceNameNumber
        0x1A,                       # PreInitFunctionIndex
        b'\x00\xff\xff',            # Unknown_51

        # Information
        [0, 0, -1000, 0, 0, 0, 24000, 500, 30, 45, 0, 360, 0, 0, 0, 0, 0, 1, 149, 0, 2, 0, 3],
    )

    BuildStringList((
        "t1020",                  # 0
        "艾丽洁",                 # 1
        "游客",                   # 2
        "游客",                   # 3
        "游客",                   # 4
        "游客",                   # 5
        "游客",                   # 6
        "沙扎克",                 # 7
        "珍妮特",                 # 8
        "猎兵",                   # 9
        "猎兵",                   # 10
        "猎兵",                   # 11
        "猎兵",                   # 12
        "军犬",                   # 13
        "军犬",                   # 14
        "军犬",                   # 15
        "军犬",                   # 16
        "琪雅",                   # 17
        "芙兰",                   # 18
        "塞茜尔",                 # 19
        "伊莉娅",                 # 20
        "莉夏",                   # 21
        "修利",                   # 22
        "玛丽亚贝尔",             # 23
        "SE控制",                 # 24
        "bt1020",                 # 25
    ))

    ATBonus("ATBonus_504", 100, 5, 0, 5, 0, 5, 0, 2, 5, 0, 0, 0, 2, 0, 0, 0)

    MonsterBattlePostion("MonsterBattlePostion_5C4", 7, 10, 180)
    MonsterBattlePostion("MonsterBattlePostion_5C8", 9, 10, 180)
    MonsterBattlePostion("MonsterBattlePostion_5CC", 5, 11, 180)
    MonsterBattlePostion("MonsterBattlePostion_5D0", 11, 11, 180)
    MonsterBattlePostion("MonsterBattlePostion_5D4", 7, 14, 180)
    MonsterBattlePostion("MonsterBattlePostion_5D8", 9, 14, 180)
    MonsterBattlePostion("MonsterBattlePostion_5DC", 5, 14, 180)
    MonsterBattlePostion("MonsterBattlePostion_5E0", 11, 14, 180)
    MonsterBattlePostion("MonsterBattlePostion_5A4", 7, 4, 0)
    MonsterBattlePostion("MonsterBattlePostion_5A8", 10, 11, 225)
    MonsterBattlePostion("MonsterBattlePostion_5AC", 4, 7, 90)
    MonsterBattlePostion("MonsterBattlePostion_5B0", 12, 7, 270)
    MonsterBattlePostion("MonsterBattlePostion_5B4", 4, 11, 135)
    MonsterBattlePostion("MonsterBattlePostion_5B8", 11, 4, 315)
    MonsterBattlePostion("MonsterBattlePostion_5BC", 7, 12, 180)
    MonsterBattlePostion("MonsterBattlePostion_5C0", 5, 5, 45)

    # monster count: 0

    # event battle count: 1

    BattleInfo(
        "BattleInfo_5E4", 0x004A, 255, 6, 45, 3, 3, 30, 0, "bt1020", 0x00000000, 100, 0, 0, 0,
        (
            ("ms42001.dat", "ms42001.dat", "ms41902.dat", "ms41902.dat", "ms82002.dat", "ms82002.dat", "ms82002.dat", "ms82002.dat", "MonsterBattlePostion_5C4", "MonsterBattlePostion_5A4", "ed7540", "ed7453", "ATBonus_504"),
            (),
            (),
            (),
        )
    )

    AddCharChip((
        "apl/ch51706.itc",                   # 00
        "chr/ch00000.itc",                   # 01
        "chr/ch33200.itc",                   # 02
        "chr/ch21600.itc",                   # 03
        "chr/ch20100.itc",                   # 04
        "chr/ch34300.itc",                   # 05
        "chr/ch34302.itc",                   # 06
        "chr/ch32300.itc",                   # 07
        "chr/ch26702.itc",                   # 08
        "chr/ch22000.itc",                   # 09
        "chr/ch26600.itc",                   # 0A
    ))

    DeclNpc(-24909,  0,       5570,    90,   261,  0x0, 0,   2,   0,   0,   0,   0,   4,   255,  0)
    DeclNpc(98650,   0,       2349,    315,  389,  0x0, 0,   3,   0,   0,   0,   0,   5,   255,  0)
    DeclNpc(0,       0,       500,     0,    385,  0x0, 0,   4,   0,   0,   1,   0,   6,   255,  0)
    DeclNpc(96000,   100,     20399,   90,   389,  0x0, 0,   5,   0,   0,   0,   0,   7,   255,  0)
    DeclNpc(100000,  0,       21000,   0,    389,  0x0, 0,   7,   0,   0,   0,   0,   8,   255,  0)
    DeclNpc(96000,   100,     19600,   90,   453,  0x0, 0,   8,   0,   255, 255, 0,   9,   255,  0)
    DeclNpc(98349,   0,       2000,    0,    389,  0x0, 0,   9,   0,   0,   0,   0,   10,  255,  0)
    DeclNpc(99000,   0,       2700,    270,  389,  0x0, 0,   10,  0,   0,   0,   0,   12,  255,  0)
    DeclNpc(0,       0,       0,       0,    389,  0x0, 1,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    389,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    389,  0x0, 1,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    389,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    389,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    389,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    389,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    389,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    453,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    453,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    453,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    453,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    453,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    453,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    453,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)
    DeclNpc(0,       0,       0,       0,    197,  0x0, 0,   0,   0,   255, 255, 255, 255, 255,  0)

    DeclEvent(0x0000, 0, 27,  7.5,                   8.5,                   -1.0,                  225.0,                 [0.3333333432674408,   -0.0,                  0.0,                   0.0,                   -0.0,                  0.10000000149011612,   -0.0,                  0.0,                   0.0,                   -0.0,                  0.20000000298023224,   0.0,                   -2.5,                  -0.8500000238418579,   0.20000000298023224,   1.0])
    DeclEvent(0x0000, 0, 46,  100.16000366210938,    23.280000686645508,    -1.0,                  225.0,                 [0.10000000149011612,  -0.0,                  0.0,                   0.0,                   -0.0,                  0.3333333432674408,    -0.0,                  0.0,                   0.0,                   -0.0,                  0.20000000298023224,   0.0,                   -10.016000747680664,   -7.760000228881836,    0.20000000298023224,   1.0])

    DeclActor(-29040,  0,       8010,    1200,    -29040,  1500,    8010,    0x007C, 0,  42, 0x0000)
    DeclActor(28550,   0,       7990,    1200,    28550,   1500,    7990,    0x007C, 0,  43, 0x0000)
    DeclActor(96820,   0,       -30,     1200,    96820,   1500,    -30,     0x007C, 0,  44, 0x0000)
    DeclActor(-19000,  0,       11820,   1200,    -19000,  1500,    11820,   0x007C, 0,  44, 0x0000)
    DeclActor(19000,   0,       11760,   1200,    19000,   1500,    11760,   0x007C, 0,  44, 0x0000)

    ChipFrameInfo(1768, 0)                                       # 0

    ScpFunction((
        "Function_0_6E8",          # 00, 0
        "Function_1_7A0",          # 01, 1
        "Function_2_7CB",          # 02, 2
        "Function_3_937",          # 03, 3
        "Function_4_AEC",          # 04, 4
        "Function_5_DC2",          # 05, 5
        "Function_6_E60",          # 06, 6
        "Function_7_FF3",          # 07, 7
        "Function_8_11AE",         # 08, 8
        "Function_9_1246",         # 09, 9
        "Function_10_131C",        # 0A, 10
        "Function_11_13ED",        # 0B, 11
        "Function_12_14F9",        # 0C, 12
        "Function_13_1596",        # 0D, 13
        "Function_14_1846",        # 0E, 14
        "Function_15_1885",        # 0F, 15
        "Function_16_18C4",        # 10, 16
        "Function_17_1903",        # 11, 17
        "Function_18_1942",        # 12, 18
        "Function_19_1981",        # 13, 19
        "Function_20_19C0",        # 14, 20
        "Function_21_19FF",        # 15, 21
        "Function_22_1A61",        # 16, 22
        "Function_23_1AC3",        # 17, 23
        "Function_24_1B25",        # 18, 24
        "Function_25_1B87",        # 19, 25
        "Function_26_1BE9",        # 1A, 26
        "Function_27_1C4B",        # 1B, 27
        "Function_28_23C0",        # 1C, 28
        "Function_29_23DF",        # 1D, 29
        "Function_30_23FE",        # 1E, 30
        "Function_31_2416",        # 1F, 31
        "Function_32_242E",        # 20, 32
        "Function_33_2457",        # 21, 33
        "Function_34_246B",        # 22, 34
        "Function_35_2494",        # 23, 35
        "Function_36_2561",        # 24, 36
        "Function_37_2584",        # 25, 37
        "Function_38_27E0",        # 26, 38
        "Function_39_27FC",        # 27, 39
        "Function_40_2818",        # 28, 40
        "Function_41_2834",        # 29, 41
        "Function_42_28D5",        # 2A, 42
        "Function_43_2925",        # 2B, 43
        "Function_44_297C",        # 2C, 44
        "Function_45_2A0E",        # 2D, 45
        "Function_46_2AEA",        # 2E, 46
        "Function_47_2B76",        # 2F, 47
    ))


    def Function_0_6E8(): pass

    label("Function_0_6E8")

    RunExpression(0x2, (scpexpr(EXPR_RAND), scpexpr(EXPR_PUSH_LONG, 0x8), scpexpr(EXPR_IMOD), scpexpr(EXPR_STUB), scpexpr(EXPR_END)))
    Switch(
        (scpexpr(EXPR_GET_RESULT, 0x2), scpexpr(EXPR_END)),
        (0, "loc_728"),
        (1, "loc_734"),
        (2, "loc_740"),
        (3, "loc_74C"),
        (4, "loc_758"),
        (5, "loc_764"),
        (6, "loc_770"),
        (SWITCH_DEFAULT, "loc_77C"),
    )


    label("loc_728")

    OP_A0(0xFE, 1450, 0x0, 0xFB)
    Jump("loc_788")

    label("loc_734")

    OP_A0(0xFE, 1550, 0x0, 0xFB)
    Jump("loc_788")

    label("loc_740")

    OP_A0(0xFE, 1600, 0x0, 0xFB)
    Jump("loc_788")

    label("loc_74C")

    OP_A0(0xFE, 1400, 0x0, 0xFB)
    Jump("loc_788")

    label("loc_758")

    OP_A0(0xFE, 1650, 0x0, 0xFB)
    Jump("loc_788")

    label("loc_764")

    OP_A0(0xFE, 1350, 0x0, 0xFB)
    Jump("loc_788")

    label("loc_770")

    OP_A0(0xFE, 1500, 0x0, 0xFB)
    Jump("loc_788")

    label("loc_77C")

    OP_A0(0xFE, 1500, 0x0, 0xFB)
    Jump("loc_788")

    label("loc_788")

    Jc((scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_END)), "loc_79F")
    OP_A0(0xFE, 1500, 0x0, 0xFB)
    Jump("loc_788")

    label("loc_79F")

    Return()

    # Function_0_6E8 end

    def Function_1_7A0(): pass

    label("Function_1_7A0")

    Jc((scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_END)), "loc_7CA")
    OP_94(0xFE, 0xFFFFF542, 0x60E, 0xABE, 0xFFFFFE3E, 0x3E8)
    Sleep(300)
    Jump("Function_1_7A0")

    label("loc_7CA")

    Return()

    # Function_1_7A0 end

    def Function_2_7CB(): pass

    label("Function_2_7CB")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x146, 0)), scpexpr(EXPR_END)), "loc_7DE")
    SetChrFlags(0x8, 0x80)
    Jump("loc_905")

    label("loc_7DE")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 7)), scpexpr(EXPR_END)), "loc_7EC")
    Jump("loc_905")

    label("loc_7EC")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 5)), scpexpr(EXPR_END)), "loc_7FA")
    Jump("loc_905")

    label("loc_7FA")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 4)), scpexpr(EXPR_END)), "loc_808")
    Jump("loc_905")

    label("loc_808")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 2)), scpexpr(EXPR_END)), "loc_863")
    ClearChrFlags(0xA, 0x80)
    ClearChrFlags(0xB, 0x80)
    SetChrChipByIndex(0xB, 0x6)
    SetChrSubChip(0xB, 0x0)
    EndChrThread(0xB, 0x0)
    SetChrBattleFlags(0xB, 0x4)
    SetChrFlags(0xB, 0x10)
    SetChrSubChip(0xB, 0x2)
    ClearChrFlags(0xD, 0x80)
    SetChrChipByIndex(0xD, 0x8)
    SetChrSubChip(0xD, 0x0)
    EndChrThread(0xD, 0x0)
    SetChrBattleFlags(0xD, 0x4)
    SetChrFlags(0xD, 0x10)
    SetChrSubChip(0xD, 0x1)
    ClearChrFlags(0xE, 0x80)
    ClearChrFlags(0xF, 0x80)
    Jump("loc_905")

    label("loc_863")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 1)), scpexpr(EXPR_END)), "loc_8C0")
    ClearChrFlags(0xA, 0x80)
    ClearChrFlags(0xB, 0x80)
    SetChrChipByIndex(0xB, 0x6)
    SetChrSubChip(0xB, 0x0)
    EndChrThread(0xB, 0x0)
    SetChrBattleFlags(0xB, 0x4)
    ClearChrFlags(0xD, 0x80)
    SetChrChipByIndex(0xD, 0x8)
    SetChrSubChip(0xD, 0x0)
    EndChrThread(0xD, 0x0)
    SetChrBattleFlags(0xD, 0x4)
    ClearChrFlags(0xE, 0x80)
    ClearChrFlags(0xF, 0x80)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x0, 3)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_END)), "loc_8BB")
    SetChrFlags(0xE, 0x10)
    SetChrFlags(0xF, 0x10)

    label("loc_8BB")

    Jump("loc_905")

    label("loc_8C0")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 0)), scpexpr(EXPR_END)), "loc_8CE")
    Jump("loc_905")

    label("loc_8CE")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x144, 5)), scpexpr(EXPR_END)), "loc_8FC")
    ClearChrFlags(0x9, 0x80)
    ClearChrFlags(0xB, 0x80)
    SetChrPos(0xB, 26870, 0, 10210, 180)
    ClearChrFlags(0xC, 0x80)
    Jump("loc_905")

    label("loc_8FC")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x144, 0)), scpexpr(EXPR_END)), "loc_905")

    label("loc_905")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x22, 0)), scpexpr(EXPR_END)), "loc_919")
    ClearScenarioFlags(0x22, 0)
    Event(0, 13)
    Jump("loc_936")

    label("loc_919")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x22, 1)), scpexpr(EXPR_END)), "loc_936")
    ClearScenarioFlags(0x22, 1)
    SetChrPos(0x0, 28500, 0, 8080, 270)

    label("loc_936")

    Return()

    # Function_2_7CB end

    def Function_3_937(): pass

    label("Function_3_937")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A7, 1)), scpexpr(EXPR_END)), "loc_949")
    OP_50(0x1, (scpexpr(EXPR_PUSH_LONG, 0x233), scpexpr(EXPR_STUB), scpexpr(EXPR_END)))

    label("loc_949")

    ModifyEventFlags(0, 0, 0x80)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A3, 5)), scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A3, 6)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_NEQUZ_I64), scpexpr(EXPR_END)), "loc_961")
    ModifyEventFlags(1, 0, 0x80)

    label("loc_961")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A3, 4)), scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A4, 1)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_NEQUZ_I64), scpexpr(EXPR_END)), "loc_974")
    OP_1B(0x5, 0x0, 0x2D)

    label("loc_974")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 1)), scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 2)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_NEQUZ_I64), scpexpr(EXPR_END)), "loc_9AA")
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x15A, 6)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_END)), "loc_9A0")
    OP_1B(0x1, 0x0, 0x26)
    OP_1B(0x6, 0x0, 0x27)
    OP_1B(0x9, 0x0, 0x28)
    Jump("loc_9AA")

    label("loc_9A0")

    OP_1B(0x6, 0x0, 0x27)
    OP_1B(0x9, 0x0, 0x28)

    label("loc_9AA")

    OP_65(0x0, 0x1)
    OP_65(0x1, 0x1)
    OP_65(0x2, 0x1)
    OP_65(0x3, 0x1)
    OP_65(0x4, 0x1)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x180, 0)), scpexpr(EXPR_END)), "loc_A24")
    ClearMapObjFlags(0x6, 0x4)
    ClearMapObjFlags(0x1, 0x10)
    ClearMapObjFlags(0x5, 0x10)
    ClearMapObjFlags(0x2, 0x10)
    ClearMapObjFlags(0x3, 0x10)
    OP_66(0x0, 0x1)
    OP_66(0x1, 0x1)
    OP_66(0x2, 0x1)
    OP_66(0x3, 0x1)
    OP_66(0x4, 0x1)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A3, 3)), scpexpr(EXPR_END)), "loc_A0C")
    SetMapObjFlags(0x6, 0x4)
    OP_65(0x1, 0x1)

    label("loc_A0C")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A3, 3)), scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A4, 1)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_NEQUZ_I64), scpexpr(EXPR_END)), "loc_A24")
    SetMapObjFlags(0x1, 0x10)
    OP_65(0x0, 0x1)

    label("loc_A24")

    ModifyEventFlags(0, 1, 0x80)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A3, 4)), scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A7, 1)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_NEQUZ_I64), scpexpr(EXPR_END)), "loc_A41")
    ModifyEventFlags(1, 1, 0x80)
    OP_1B(0x0, 0x0, 0x2F)

    label("loc_A41")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A3, 6)), scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A4, 1)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_NEQUZ_I64), scpexpr(EXPR_END)), "loc_A52")
    Call(0, 35)

    label("loc_A52")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A3, 5)), scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A4, 1)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_NEQUZ_I64), scpexpr(EXPR_END)), "loc_AEB")
    Jc((scpexpr(EXPR_PUSH_VALUE_INDEX, 0x0), scpexpr(EXPR_PUSH_LONG, 0x66), scpexpr(EXPR_EQU), scpexpr(EXPR_PUSH_VALUE_INDEX, 0x0), scpexpr(EXPR_PUSH_LONG, 0x6C), scpexpr(EXPR_EQU), scpexpr(EXPR_OR), scpexpr(EXPR_PUSH_VALUE_INDEX, 0x0), scpexpr(EXPR_PUSH_LONG, 0x6D), scpexpr(EXPR_EQU), scpexpr(EXPR_OR), scpexpr(EXPR_END)), "loc_AA1")
    SoundDistance(0x6E, 0x16382, 0x0, 0x6CC0, 0x11170, 0xC350, 0x64, 0x0)
    Jump("loc_AEB")

    label("loc_AA1")

    Jc((scpexpr(EXPR_PUSH_VALUE_INDEX, 0x0), scpexpr(EXPR_PUSH_LONG, 0x64), scpexpr(EXPR_EQU), scpexpr(EXPR_PUSH_VALUE_INDEX, 0x0), scpexpr(EXPR_PUSH_LONG, 0x65), scpexpr(EXPR_EQU), scpexpr(EXPR_OR), scpexpr(EXPR_PUSH_VALUE_INDEX, 0x0), scpexpr(EXPR_PUSH_LONG, 0x67), scpexpr(EXPR_EQU), scpexpr(EXPR_OR), scpexpr(EXPR_PUSH_VALUE_INDEX, 0x0), scpexpr(EXPR_PUSH_LONG, 0x68), scpexpr(EXPR_EQU), scpexpr(EXPR_OR), scpexpr(EXPR_PUSH_VALUE_INDEX, 0x0), scpexpr(EXPR_PUSH_LONG, 0x69), scpexpr(EXPR_EQU), scpexpr(EXPR_OR), scpexpr(EXPR_PUSH_VALUE_INDEX, 0x0), scpexpr(EXPR_PUSH_LONG, 0x6A), scpexpr(EXPR_EQU), scpexpr(EXPR_OR), scpexpr(EXPR_PUSH_VALUE_INDEX, 0x0), scpexpr(EXPR_PUSH_LONG, 0x6B), scpexpr(EXPR_EQU), scpexpr(EXPR_OR), scpexpr(EXPR_END)), "loc_AEB")
    Sound(110, 1, 10, 0)

    label("loc_AEB")

    Return()

    # Function_3_937 end

    def Function_4_AEC(): pass

    label("Function_4_AEC")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 2)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 1)), scpexpr(EXPR_NEQUZ_I64), scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x15A, 6)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_NEQUZ_I64), scpexpr(EXPR_END)), "loc_B03")
    Call(0, 37)
    Return()

    label("loc_B03")

    TalkBegin(0xFE)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 5)), scpexpr(EXPR_END)), "loc_B14")
    Jump("loc_DBE")

    label("loc_B14")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 2)), scpexpr(EXPR_END)), "loc_C4D")
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x0, 0)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_END)), "loc_BDC")

    #C0001
    ChrTalk(
        0x8,
        (
            "我经常来这家施行\x01",
            "会员制度的珠宝店购物。\x02",
        )
    )

    CloseMessageWindow()

    #C0002
    ChrTalk(
        0x8,
        (
            "因为一般游客无法入内，所以店内很安静，\x01",
            "我一直都很喜欢这里……\x02",
        )
    )

    CloseMessageWindow()

    #C0003
    ChrTalk(
        0x8,
        (
            "但不知为何，今天的客人似乎\x01",
            "比平时多，还是稍后再来好了。\x02",
        )
    )

    CloseMessageWindow()
    SetScenarioFlags(0x0, 0)
    Jump("loc_C48")

    label("loc_BDC")


    #C0004
    ChrTalk(
        0x8,
        (
            "我经常来这家施行\x01",
            "会员制度的珠宝店购物……\x02",
        )
    )

    CloseMessageWindow()

    #C0005
    ChrTalk(
        0x8,
        (
            "但不知为何，今天的客人似乎\x01",
            "比平时多，还是稍后再来好了。\x02",
        )
    )

    CloseMessageWindow()

    label("loc_C48")

    Jump("loc_DBE")

    label("loc_C4D")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 1)), scpexpr(EXPR_END)), "loc_CC0")
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x15A, 6)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_END)), "loc_C65")
    Jump("loc_CBB")

    label("loc_C65")


    #C0006
    ChrTalk(
        0x8,
        (
            "刚才那个女孩\x01",
            "往别墅区走去了。\x02",
        )
    )

    CloseMessageWindow()

    #C0007
    ChrTalk(
        0x8,
        (
            "那孩子真是太可爱了……\x01",
            "莫非是谁家的大小姐吗？\x02",
        )
    )

    CloseMessageWindow()

    label("loc_CBB")

    Jump("loc_DBE")

    label("loc_CC0")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x144, 5)), scpexpr(EXPR_END)), "loc_DBE")
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x0, 0)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_END)), "loc_D64")

    #C0008
    ChrTalk(
        0x8,
        (
            "我老公在前方的别墅区\x01",
            "购置了房子。\x02",
        )
    )

    CloseMessageWindow()

    #C0009
    ChrTalk(
        0x8,
        (
            "每到休息的时候，\x01",
            "我就会来这里度假。\x02",
        )
    )

    CloseMessageWindow()

    #C0010
    ChrTalk(
        0x8,
        (
            "和喧嚣的克洛斯贝尔市不同，\x01",
            "那里真是个宁静的好地方。\x02",
        )
    )

    CloseMessageWindow()
    SetScenarioFlags(0x0, 0)
    Jump("loc_DBE")

    label("loc_D64")


    #C0011
    ChrTalk(
        0x8,
        (
            "我经常在前方的\x01",
            "别墅区度假。\x02",
        )
    )

    CloseMessageWindow()

    #C0012
    ChrTalk(
        0x8,
        (
            "和喧嚣的克洛斯贝尔市不同，\x01",
            "那里真是个宁静的好地方。\x02",
        )
    )

    CloseMessageWindow()

    label("loc_DBE")

    TalkEnd(0xFE)
    Return()

    # Function_4_AEC end

    def Function_5_DC2(): pass

    label("Function_5_DC2")

    TalkBegin(0xFE)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 5)), scpexpr(EXPR_END)), "loc_DD3")
    Jump("loc_E5C")

    label("loc_DD3")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 2)), scpexpr(EXPR_END)), "loc_DE1")
    Jump("loc_E5C")

    label("loc_DE1")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 1)), scpexpr(EXPR_END)), "loc_DEF")
    Jump("loc_E5C")

    label("loc_DEF")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x144, 5)), scpexpr(EXPR_END)), "loc_E5C")

    #C0013
    ChrTalk(
        0x9,
        (
            "呵呵，每道菜都很诱人呢，\x01",
            "午餐就在这里吃好了。\x02",
        )
    )

    CloseMessageWindow()

    #C0014
    ChrTalk(
        0x9,
        (
            "难得来米修拉姆一次，\x01",
            "自然要多品尝一些美食。\x02",
        )
    )

    CloseMessageWindow()

    label("loc_E5C")

    TalkEnd(0xFE)
    Return()

    # Function_5_DC2 end

    def Function_6_E60(): pass

    label("Function_6_E60")

    TalkBegin(0xFE)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 5)), scpexpr(EXPR_END)), "loc_E71")
    Jump("loc_FEF")

    label("loc_E71")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 2)), scpexpr(EXPR_END)), "loc_EEC")

    #C0015
    ChrTalk(
        0xA,
        (
            "说起米修拉姆，\x01",
            "值得一游的地方实在太多了，\x01",
            "简直让人眼花缭乱。\x02",
        )
    )

    CloseMessageWindow()

    #C0016
    ChrTalk(
        0xA,
        (
            "呵呵，我好像又找回了\x01",
            "年轻时的感觉呢。\x02",
        )
    )

    CloseMessageWindow()
    Jump("loc_FEF")

    label("loc_EEC")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 1)), scpexpr(EXPR_END)), "loc_FE6")
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x0, 1)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_END)), "loc_F83")

    #C0017
    ChrTalk(
        0xA,
        "嗯？小女孩吗？\x02",
    )

    CloseMessageWindow()

    #C0018
    ChrTalk(
        0xA,
        (
            "说起来，我刚才的确看到一个\x01",
            "小女孩独自走在商店街……\x02",
        )
    )

    CloseMessageWindow()

    #C0019
    ChrTalk(
        0xA,
        (
            "至于她的去向，我就不清楚了。\x01",
            "真是抱歉啊。\x02",
        )
    )

    CloseMessageWindow()
    SetScenarioFlags(0x0, 1)
    Jump("loc_FE1")

    label("loc_F83")


    #C0020
    ChrTalk(
        0xA,
        (
            "我刚才的确看到一个\x01",
            "小女孩独自走在商店街……\x02",
        )
    )

    CloseMessageWindow()

    #C0021
    ChrTalk(
        0xA,
        (
            "至于她的去向，我就不清楚了。\x01",
            "真是抱歉。\x02",
        )
    )

    CloseMessageWindow()

    label("loc_FE1")

    Jump("loc_FEF")

    label("loc_FE6")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x144, 5)), scpexpr(EXPR_END)), "loc_FEF")

    label("loc_FEF")

    TalkEnd(0xFE)
    Return()

    # Function_6_E60 end

    def Function_7_FF3(): pass

    label("Function_7_FF3")

    TalkBegin(0xFE)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 5)), scpexpr(EXPR_END)), "loc_1004")
    Jump("loc_11AA")

    label("loc_1004")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 2)), scpexpr(EXPR_END)), "loc_106E")

    #C0022
    ChrTalk(
        0xB,
        (
            "啊，你怎么一副\x01",
            "昏昏欲睡的样子？\x02",
        )
    )

    CloseMessageWindow()

    #C0023
    ChrTalk(
        0xB,
        (
            "真正的游玩才刚刚开始啊。\x01",
            "好啦好啦，赶快清醒一下！\x02",
        )
    )

    CloseMessageWindow()
    Jump("loc_11AA")

    label("loc_106E")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 1)), scpexpr(EXPR_END)), "loc_1145")
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x0, 2)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_END)), "loc_10F1")

    #C0024
    ChrTalk(
        0xB,
        (
            "哎？你问绿色头发的小女孩\x01",
            "有没有从这里经过？\x02",
        )
    )

    CloseMessageWindow()

    #C0025
    ChrTalk(
        0xB,
        (
            "唔～我没看到呢。\x01",
            "和父母在一起的小孩倒是看到很多。\x02",
        )
    )

    CloseMessageWindow()
    SetScenarioFlags(0x0, 2)
    Jump("loc_1140")

    label("loc_10F1")


    #C0026
    ChrTalk(
        0xB,
        (
            "不好意思哦，我并没有见过\x01",
            "绿色头发的小女孩。\x02",
        )
    )

    CloseMessageWindow()

    #C0027
    ChrTalk(
        0xB,
        "你还是去别的地方找找吧。\x02",
    )

    CloseMessageWindow()

    label("loc_1140")

    Jump("loc_11AA")

    label("loc_1145")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x144, 5)), scpexpr(EXPR_END)), "loc_11AA")

    #C0028
    ChrTalk(
        0xB,
        (
            "今天上午，湖水浴场\x01",
            "被人包场了呢。\x02",
        )
    )

    CloseMessageWindow()

    #C0029
    ChrTalk(
        0xB,
        (
            "好羡慕啊，我也想包下\x01",
            "整个浴场，悠然自在地享受～\x02",
        )
    )

    CloseMessageWindow()

    label("loc_11AA")

    TalkEnd(0xFE)
    Return()

    # Function_7_FF3 end

    def Function_8_11AE(): pass

    label("Function_8_11AE")

    TalkBegin(0xFE)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 5)), scpexpr(EXPR_END)), "loc_11BF")
    Jump("loc_1242")

    label("loc_11BF")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 2)), scpexpr(EXPR_END)), "loc_11CD")
    Jump("loc_1242")

    label("loc_11CD")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 1)), scpexpr(EXPR_END)), "loc_11DB")
    Jump("loc_1242")

    label("loc_11DB")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x144, 5)), scpexpr(EXPR_END)), "loc_1242")

    #C0030
    ChrTalk(
        0xC,
        (
            "既然来到米修拉姆，\x01",
            "自然不能不去主题公园。\x02",
        )
    )

    CloseMessageWindow()

    #C0031
    ChrTalk(
        0xC,
        (
            "虽然门票并不便宜，\x01",
            "但我相信一定物有所值。\x02",
        )
    )

    CloseMessageWindow()

    label("loc_1242")

    TalkEnd(0xFE)
    Return()

    # Function_8_11AE end

    def Function_9_1246(): pass

    label("Function_9_1246")

    TalkBegin(0xFE)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 5)), scpexpr(EXPR_END)), "loc_1257")
    Jump("loc_1318")

    label("loc_1257")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 2)), scpexpr(EXPR_END)), "loc_12B5")

    #C0032
    ChrTalk(
        0xD,
        (
            "上午一直在主题公园玩，\x01",
            "真是累死人了……\x02",
        )
    )

    CloseMessageWindow()

    #C0033
    ChrTalk(
        0xD,
        (
            "就让我稍微睡一会吧。\x01",
            "呼呼……\x02",
        )
    )

    CloseMessageWindow()
    Jump("loc_1318")

    label("loc_12B5")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 1)), scpexpr(EXPR_END)), "loc_130F")

    #C0034
    ChrTalk(
        0xD,
        (
            "我上午一直陪女友\x01",
            "在主题公园游玩，\x01",
            "都快累死了。\x02",
        )
    )

    CloseMessageWindow()

    #C0035
    ChrTalk(
        0xD,
        "唔～好想睡一觉啊。\x02",
    )

    CloseMessageWindow()
    Jump("loc_1318")

    label("loc_130F")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x144, 5)), scpexpr(EXPR_END)), "loc_1318")

    label("loc_1318")

    TalkEnd(0xFE)
    Return()

    # Function_9_1246 end

    def Function_10_131C(): pass

    label("Function_10_131C")

    TalkBegin(0xFE)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 5)), scpexpr(EXPR_END)), "loc_132D")
    Jump("loc_13E9")

    label("loc_132D")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 1)), scpexpr(EXPR_END)), "loc_13E0")
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x0, 3)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_END)), "loc_1348")
    Call(0, 11)
    Jump("loc_13DB")

    label("loc_1348")


    #C0036
    ChrTalk(
        0xE,
        (
            "珍妮特在最近的一场联谊会上\x01",
            "受了挫折，心情十分沮丧，\x01",
            "于是我便鼓起勇气，把她约出来了。\x02",
        )
    )

    CloseMessageWindow()

    #C0037
    ChrTalk(
        0xE,
        (
            "……好，必须要去和店员们谈一谈，\x01",
            "事先做好准备工作。\x02",
        )
    )

    CloseMessageWindow()

    label("loc_13DB")

    Jump("loc_13E9")

    label("loc_13E0")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x144, 5)), scpexpr(EXPR_END)), "loc_13E9")

    label("loc_13E9")

    TalkEnd(0xFE)
    Return()

    # Function_10_131C end

    def Function_11_13ED(): pass

    label("Function_11_13ED")

    OP_4B(0xE, 0xFF)
    OP_4B(0xF, 0xFF)

    #C0038
    ChrTalk(
        0xE,
        (
            "对了，珍妮特，\x01",
            "我们今晚就在这里用餐如何？\x02",
        )
    )

    CloseMessageWindow()

    #C0039
    ChrTalk(
        0xE,
        (
            "我在杂志上看到过介绍文章，\x01",
            "据说这里的料理非常美味呢。\x02",
        )
    )

    CloseMessageWindow()

    #C0040
    ChrTalk(
        0xF,
        "啊，真的吗？\x02",
    )

    CloseMessageWindow()

    #C0041
    ChrTalk(
        0xF,
        "呵呵，那就期待一下好了～\x02",
    )

    CloseMessageWindow()

    #C0042
    ChrTalk(
        0xE,
        (
            "……对了，我稍微有点事情，\x01",
            "你先一个人去别的店\x01",
            "逛逛行吗？\x02",
        )
    )

    CloseMessageWindow()

    #C0043
    ChrTalk(
        0xF,
        "哎？嗯……好啊～\x02",
    )

    CloseMessageWindow()
    ClearChrFlags(0xE, 0x10)
    ClearChrFlags(0xF, 0x10)
    SetScenarioFlags(0x0, 3)
    OP_4C(0xE, 0xFF)
    OP_4C(0xF, 0xFF)
    Return()

    # Function_11_13ED end

    def Function_12_14F9(): pass

    label("Function_12_14F9")

    TalkBegin(0xFE)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 5)), scpexpr(EXPR_END)), "loc_150A")
    Jump("loc_1592")

    label("loc_150A")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x145, 1)), scpexpr(EXPR_END)), "loc_1589")
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x0, 3)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_END)), "loc_1525")
    Call(0, 11)
    Jump("loc_1584")

    label("loc_1525")


    #C0044
    ChrTalk(
        0xF,
        (
            "我们刚刚从\x01",
            "水上巴士下来。\x02",
        )
    )

    CloseMessageWindow()

    #C0045
    ChrTalk(
        0xF,
        (
            "沙扎克先生说今天要请我\x01",
            "随便吃喝玩乐，\x01",
            "一定要好好享受一下！\x02",
        )
    )

    CloseMessageWindow()

    label("loc_1584")

    Jump("loc_1592")

    label("loc_1589")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x144, 5)), scpexpr(EXPR_END)), "loc_1592")

    label("loc_1592")

    TalkEnd(0xFE)
    Return()

    # Function_12_14F9 end

    def Function_13_1596(): pass

    label("Function_13_1596")

    EventBegin(0x0)
    FadeToDark(0, 0, -1)
    LoadChrToIndex("chr/ch08200.itc", 0x1E)
    LoadChrToIndex("chr/ch08500.itc", 0x1F)
    LoadChrToIndex("chr/ch05200.itc", 0x20)
    LoadChrToIndex("chr/ch05100.itc", 0x21)
    LoadChrToIndex("chr/ch07500.itc", 0x22)
    LoadChrToIndex("chr/ch10000.itc", 0x23)
    LoadChrToIndex("chr/ch05500.itc", 0x24)
    ClearChrFlags(0x4, 0x80)
    ClearChrBattleFlags(0x4, 0x8000)
    ClearChrFlags(0x5, 0x80)
    ClearChrBattleFlags(0x5, 0x8000)
    ClearChrFlags(0x18, 0x80)
    SetChrChipByIndex(0x18, 0x1E)
    SetChrSubChip(0x18, 0x0)
    SetChrFlags(0x18, 0x8000)
    ClearChrFlags(0x19, 0x80)
    SetChrChipByIndex(0x19, 0x1F)
    SetChrSubChip(0x19, 0x0)
    SetChrFlags(0x19, 0x8000)
    ClearChrFlags(0x1B, 0x80)
    SetChrChipByIndex(0x1B, 0x21)
    SetChrSubChip(0x1B, 0x0)
    SetChrFlags(0x1B, 0x8000)
    ClearChrFlags(0x1A, 0x80)
    SetChrChipByIndex(0x1A, 0x22)
    SetChrSubChip(0x1A, 0x0)
    SetChrFlags(0x1A, 0x8000)
    ClearChrFlags(0x1C, 0x80)
    SetChrChipByIndex(0x1C, 0x20)
    SetChrSubChip(0x1C, 0x0)
    SetChrFlags(0x1C, 0x8000)
    ClearChrFlags(0x1D, 0x80)
    SetChrChipByIndex(0x1D, 0x23)
    SetChrSubChip(0x1D, 0x0)
    SetChrFlags(0x1D, 0x8000)
    ClearChrFlags(0x1E, 0x80)
    SetChrChipByIndex(0x1E, 0x24)
    SetChrSubChip(0x1E, 0x0)
    SetChrFlags(0x1E, 0x8000)
    SetChrPos(0x101, 0, 0, 0, 0)
    SetChrPos(0x102, 0, 0, 0, 0)
    SetChrPos(0x103, 0, 0, 0, 0)
    SetChrPos(0x104, 0, 0, 0, 0)
    SetChrPos(0x109, 0, 0, 0, 0)
    SetChrPos(0x105, 0, 0, 0, 0)
    SetChrPos(0x18, 0, 0, 0, 0)
    SetChrPos(0x19, 0, 0, 0, 0)
    SetChrPos(0x1B, 0, 0, 0, 0)
    SetChrPos(0x1A, 0, 0, 0, 0)
    SetChrPos(0x1C, 0, 0, 0, 0)
    SetChrPos(0x1D, 0, 0, 0, 0)
    SetChrPos(0x1E, 0, 0, 0, 0)
    ClearChrFlags(0x18, 0x4)
    ClearChrFlags(0x19, 0x4)
    ClearChrFlags(0x1B, 0x4)
    ClearChrFlags(0x1A, 0x4)
    ClearChrFlags(0x1C, 0x4)
    ClearChrFlags(0x1D, 0x4)
    ClearChrFlags(0x1E, 0x4)
    OP_68(0, 2400, 0, 0)
    MoveCamera(325, 21, 0, 0)
    OP_6E(500, 0)
    SetCameraDistance(22000, 0)
    Sound(107, 0, 100, 0)
    Sleep(300)
    FadeToBright(1000, 0)
    MoveCamera(325, 12, 0, 7000)
    BeginChrThread(0x1E, 3, 0, 14)
    BeginChrThread(0x1B, 3, 0, 15)
    BeginChrThread(0x1A, 3, 0, 16)
    BeginChrThread(0x19, 3, 0, 17)
    BeginChrThread(0x1C, 3, 0, 19)
    BeginChrThread(0x1D, 3, 0, 20)
    BeginChrThread(0x18, 3, 0, 21)
    BeginChrThread(0x102, 3, 0, 22)
    BeginChrThread(0x103, 3, 0, 23)
    BeginChrThread(0x109, 3, 0, 18)
    BeginChrThread(0x105, 3, 0, 26)
    BeginChrThread(0x101, 3, 0, 24)
    BeginChrThread(0x104, 3, 0, 25)
    OP_6F(0x79)
    OP_0D()
    FadeToDark(1000, 0, -1)
    OP_0D()
    EndChrThread(0x101, 0x3)
    EndChrThread(0x102, 0x3)
    EndChrThread(0x103, 0x3)
    EndChrThread(0x104, 0x3)
    EndChrThread(0x109, 0x3)
    EndChrThread(0x105, 0x3)
    EndChrThread(0x18, 0x3)
    EndChrThread(0x19, 0x3)
    EndChrThread(0x1B, 0x3)
    EndChrThread(0x1A, 0x3)
    EndChrThread(0x1C, 0x3)
    EndChrThread(0x1D, 0x3)
    EndChrThread(0x1E, 0x3)
    SetScenarioFlags(0x22, 0)
    NewScene("t1050", 0, 0, 0)
    IdleLoop()
    Return()

    # Function_13_1596 end

    def Function_14_1846(): pass

    label("Function_14_1846")

    SetChrPos(0xFE, 0, 0, 1000, 0)
    OP_9B(0x0, 0xFE, 0x0, 0x157C, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_14_1846 end

    def Function_15_1885(): pass

    label("Function_15_1885")

    SetChrPos(0xFE, -700, 0, -500, 0)
    OP_9B(0x0, 0xFE, 0x0, 0x1964, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_15_1885 end

    def Function_16_18C4(): pass

    label("Function_16_18C4")

    SetChrPos(0xFE, 700, 0, -500, 0)
    OP_9B(0x0, 0xFE, 0x0, 0x1B58, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_16_18C4 end

    def Function_17_1903(): pass

    label("Function_17_1903")

    SetChrPos(0xFE, -700, 0, -2000, 0)
    OP_9B(0x0, 0xFE, 0x0, 0x1D4C, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_17_1903 end

    def Function_18_1942(): pass

    label("Function_18_1942")

    SetChrPos(0xFE, 700, 0, -2000, 0)
    OP_9B(0x0, 0xFE, 0x0, 0x1F40, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_18_1942 end

    def Function_19_1981(): pass

    label("Function_19_1981")

    SetChrPos(0xFE, -700, 0, -3500, 0)
    OP_9B(0x0, 0xFE, 0x0, 0x251C, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_19_1981 end

    def Function_20_19C0(): pass

    label("Function_20_19C0")

    SetChrPos(0xFE, 700, 0, -3500, 0)
    OP_9B(0x0, 0xFE, 0x0, 0x2710, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_20_19C0 end

    def Function_21_19FF(): pass

    label("Function_21_19FF")

    SetChrPos(0xFE, 0, 0, -5000, 0)
    OP_A7(0xFE, 0xFF, 0xFF, 0xFF, 0x0, 0x0)

    def lambda_1A20():
        OP_9B(0x0, 0xFE, 0x0, 0x2AF8, 0x7D0, 0x1)
        ExitThread()

    QueueWorkItem(0xFE, 1, lambda_1A20)
    Sleep(500)
    OP_A7(0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F4)
    WaitChrThread(0xFE, 1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_21_19FF end

    def Function_22_1A61(): pass

    label("Function_22_1A61")

    SetChrPos(0xFE, -700, 0, -6500, 0)
    OP_A7(0xFE, 0xFF, 0xFF, 0xFF, 0x0, 0x0)

    def lambda_1A82():
        OP_9B(0x0, 0xFE, 0x0, 0x2EE0, 0x7D0, 0x1)
        ExitThread()

    QueueWorkItem(0xFE, 1, lambda_1A82)
    Sleep(1000)
    OP_A7(0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F4)
    WaitChrThread(0xFE, 1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_22_1A61 end

    def Function_23_1AC3(): pass

    label("Function_23_1AC3")

    SetChrPos(0xFE, 700, 0, -6500, 0)
    OP_A7(0xFE, 0xFF, 0xFF, 0xFF, 0x0, 0x0)

    def lambda_1AE4():
        OP_9B(0x0, 0xFE, 0x0, 0x30D4, 0x7D0, 0x1)
        ExitThread()

    QueueWorkItem(0xFE, 1, lambda_1AE4)
    Sleep(1000)
    OP_A7(0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F4)
    WaitChrThread(0xFE, 1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_23_1AC3 end

    def Function_24_1B25(): pass

    label("Function_24_1B25")

    SetChrPos(0xFE, 0, 0, -8000, 0)
    OP_A7(0xFE, 0xFF, 0xFF, 0xFF, 0x0, 0x0)

    def lambda_1B46():
        OP_9B(0x0, 0xFE, 0x0, 0x36B0, 0x7D0, 0x1)
        ExitThread()

    QueueWorkItem(0xFE, 1, lambda_1B46)
    Sleep(1500)
    OP_A7(0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F4)
    WaitChrThread(0xFE, 1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_24_1B25 end

    def Function_25_1B87(): pass

    label("Function_25_1B87")

    SetChrPos(0xFE, -700, 0, -9500, 0)
    OP_A7(0xFE, 0xFF, 0xFF, 0xFF, 0x0, 0x0)

    def lambda_1BA8():
        OP_9B(0x0, 0xFE, 0x0, 0x3C8C, 0x7D0, 0x1)
        ExitThread()

    QueueWorkItem(0xFE, 1, lambda_1BA8)
    Sleep(2000)
    OP_A7(0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F4)
    WaitChrThread(0xFE, 1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_25_1B87 end

    def Function_26_1BE9(): pass

    label("Function_26_1BE9")

    SetChrPos(0xFE, 700, 0, -9500, 0)
    OP_A7(0xFE, 0xFF, 0xFF, 0xFF, 0x0, 0x0)

    def lambda_1C0A():
        OP_9B(0x0, 0xFE, 0x0, 0x3C8C, 0x7D0, 0x1)
        ExitThread()

    QueueWorkItem(0xFE, 1, lambda_1C0A)
    Sleep(2000)
    OP_A7(0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F4)
    WaitChrThread(0xFE, 1)
    OP_9B(0x0, 0xFE, 0xFFDD, 0x2EE0, 0x7D0, 0x1)
    OP_9B(0x0, 0xFE, 0x1E, 0x5DC, 0x7D0, 0x1)
    Return()

    # Function_26_1BE9 end

    def Function_27_1C4B(): pass

    label("Function_27_1C4B")

    EventBegin(0x0)
    FadeToDark(0, -1, 0)
    FadeToDark(500, 0, -1)
    OP_0D()
    FadeToBright(0, -1)
    LoadChrToIndex("chr/ch00050.itc", 0x1E)
    LoadChrToIndex("chr/ch00250.itc", 0x1F)
    LoadChrToIndex("chr/ch00350.itc", 0x20)
    LoadChrToIndex("chr/ch02950.itc", 0x21)
    LoadChrToIndex("chr/ch03150.itc", 0x22)
    LoadChrToIndex("chr/ch03250.itc", 0x23)
    LoadChrToIndex("chr/ch41950.itc", 0x24)
    LoadChrToIndex("chr/ch41951.itc", 0x25)
    LoadChrToIndex("chr/ch41952.itc", 0x26)
    LoadChrToIndex("chr/ch42050.itc", 0x27)
    LoadChrToIndex("chr/ch42051.itc", 0x28)
    LoadChrToIndex("monster/ch82050.itc", 0x29)
    LoadChrToIndex("monster/ch82051.itc", 0x2A)
    ClearChrFlags(0x4, 0x80)
    ClearChrBattleFlags(0x4, 0x8000)
    ClearChrFlags(0x5, 0x80)
    ClearChrBattleFlags(0x5, 0x8000)
    SetChrPos(0x101, 10000, 0, 7400, 270)
    SetChrPos(0x104, 10000, 0, 8600, 270)
    SetChrPos(0x103, 11500, 0, 7400, 270)
    SetChrPos(0x105, 11500, 0, 8600, 270)
    SetChrPos(0x109, 11100, 0, 6400, 270)
    SetChrPos(0x106, 10550, 0, 9600, 270)
    ClearChrFlags(0x10, 0x80)
    ClearChrFlags(0x11, 0x80)
    ClearChrFlags(0x12, 0x80)
    ClearChrFlags(0x13, 0x80)
    SetChrChipByIndex(0x10, 0x28)
    SetChrChipByIndex(0x11, 0x28)
    SetChrChipByIndex(0x12, 0x25)
    SetChrChipByIndex(0x13, 0x25)
    SetChrSubChip(0x10, 0x0)
    SetChrSubChip(0x11, 0x0)
    SetChrSubChip(0x12, 0x0)
    SetChrSubChip(0x13, 0x0)
    SetChrFlags(0x10, 0x8000)
    SetChrFlags(0x11, 0x8000)
    SetChrFlags(0x12, 0x8000)
    SetChrFlags(0x13, 0x8000)
    ClearChrFlags(0x14, 0x80)
    ClearChrFlags(0x15, 0x80)
    ClearChrFlags(0x16, 0x80)
    ClearChrFlags(0x17, 0x80)
    SetChrChipByIndex(0x14, 0x2A)
    SetChrChipByIndex(0x15, 0x2A)
    SetChrChipByIndex(0x16, 0x2A)
    SetChrChipByIndex(0x17, 0x2A)
    SetChrSubChip(0x14, 0x0)
    SetChrSubChip(0x15, 0x0)
    SetChrSubChip(0x16, 0x0)
    SetChrSubChip(0x17, 0x0)
    SetChrFlags(0x14, 0x8000)
    SetChrFlags(0x15, 0x8000)
    SetChrFlags(0x16, 0x8000)
    SetChrFlags(0x17, 0x8000)
    SetChrFlags(0x14, 0x20)
    SetChrFlags(0x15, 0x20)
    SetChrFlags(0x16, 0x20)
    SetChrFlags(0x17, 0x20)
    OP_52(0x14, 0x7, (scpexpr(EXPR_PUSH_LONG, 0x7D0), scpexpr(EXPR_STUB), scpexpr(EXPR_END)))
    OP_52(0x15, 0x7, (scpexpr(EXPR_PUSH_LONG, 0x7D0), scpexpr(EXPR_STUB), scpexpr(EXPR_END)))
    OP_52(0x16, 0x7, (scpexpr(EXPR_PUSH_LONG, 0x7D0), scpexpr(EXPR_STUB), scpexpr(EXPR_END)))
    OP_52(0x17, 0x7, (scpexpr(EXPR_PUSH_LONG, 0x7D0), scpexpr(EXPR_STUB), scpexpr(EXPR_END)))
    BeginChrThread(0x14, 0, 0, 29)
    BeginChrThread(0x15, 0, 0, 29)
    BeginChrThread(0x16, 0, 0, 29)
    BeginChrThread(0x17, 0, 0, 29)
    SetChrPos(0x10, -15000, 0, 8700, 90)
    SetChrPos(0x11, -15000, 0, 7300, 90)
    SetChrPos(0x12, -16000, 0, 10000, 90)
    SetChrPos(0x13, -16000, 0, 6000, 90)
    SetChrPos(0x14, -18500, 0, 9000, 90)
    SetChrPos(0x15, -18500, 0, 7000, 90)
    SetChrPos(0x16, -21500, 0, 10000, 90)
    SetChrPos(0x17, -21500, 0, 6000, 90)
    OP_68(8000, 1300, 8000, 0)
    MoveCamera(315, 25, 0, 0)
    OP_6E(500, 0)
    SetCameraDistance(21000, 0)
    FadeToBright(1000, 0)
    OP_68(6000, 1300, 8000, 2500)

    def lambda_1EF0():
        OP_9B(0x0, 0x101, 0x0, 0xFA0, 0x7D0, 0x0)
        ExitThread()

    QueueWorkItem(0x101, 0, lambda_1EF0)
    Sleep(50)

    def lambda_1F08():
        OP_9B(0x0, 0x103, 0x0, 0xFA0, 0x7D0, 0x0)
        ExitThread()

    QueueWorkItem(0x103, 0, lambda_1F08)
    Sleep(50)

    def lambda_1F20():
        OP_9B(0x0, 0x104, 0x0, 0xFA0, 0x7D0, 0x0)
        ExitThread()

    QueueWorkItem(0x104, 0, lambda_1F20)
    Sleep(50)

    def lambda_1F38():
        OP_9B(0x0, 0x109, 0x0, 0xFA0, 0x7D0, 0x0)
        ExitThread()

    QueueWorkItem(0x109, 0, lambda_1F38)
    Sleep(50)

    def lambda_1F50():
        OP_9B(0x0, 0x105, 0x0, 0xFA0, 0x7D0, 0x0)
        ExitThread()

    QueueWorkItem(0x105, 0, lambda_1F50)
    Sleep(50)

    def lambda_1F68():
        OP_9B(0x0, 0x106, 0x0, 0xFA0, 0x7D0, 0x0)
        ExitThread()

    QueueWorkItem(0x106, 0, lambda_1F68)
    WaitChrThread(0x101, 0)
    WaitChrThread(0x103, 0)
    WaitChrThread(0x104, 0)
    WaitChrThread(0x109, 0)
    WaitChrThread(0x105, 0)
    WaitChrThread(0x106, 0)
    OP_6F(0x79)
    OP_0D()

    #N0046
    NpcTalk(
        0x10,
        "男人的声音",
        "你们是……！？\x02",
    )

    CloseMessageWindow()
    OP_63(0x101, 0x0, 2000, 0x2, 0x7, 0x50, 0x1)
    Sound(28, 0, 100, 0)
    Sleep(50)
    OP_63(0x103, 0x0, 2000, 0x2, 0x7, 0x50, 0x1)
    Sound(28, 0, 100, 0)
    OP_63(0x104, 0x0, 2000, 0x2, 0x7, 0x50, 0x1)
    Sound(28, 0, 100, 0)
    Sleep(50)
    OP_63(0x109, 0x0, 2000, 0x2, 0x7, 0x50, 0x1)
    Sound(28, 0, 100, 0)
    OP_63(0x105, 0x0, 2000, 0x2, 0x7, 0x50, 0x1)
    Sound(28, 0, 100, 0)
    Sleep(50)
    OP_63(0x106, 0x0, 2000, 0x2, 0x7, 0x50, 0x1)
    Sound(28, 0, 100, 0)
    Sleep(1000)
    BeginChrThread(0x10, 3, 0, 31)
    Sleep(50)
    BeginChrThread(0x11, 3, 0, 31)
    Sleep(50)
    BeginChrThread(0x14, 3, 0, 32)
    BeginChrThread(0x1F, 1, 0, 36)
    BeginChrThread(0x12, 3, 0, 30)
    Sleep(50)
    BeginChrThread(0x15, 3, 0, 32)
    BeginChrThread(0x13, 3, 0, 30)
    Sleep(50)
    BeginChrThread(0x16, 3, 0, 32)
    Sleep(50)
    BeginChrThread(0x17, 3, 0, 32)
    Fade(1000)
    OP_68(-10000, 1300, 8000, 0)
    OP_68(4000, 1300, 8000, 3500)
    MoveCamera(315, 23, 0, 0)
    OP_6E(500, 0)
    SetCameraDistance(21000, 0)
    WaitChrThread(0x10, 3)
    WaitChrThread(0x11, 3)
    Sound(531, 0, 50, 0)
    Sound(358, 0, 50, 0)
    WaitChrThread(0x12, 3)
    WaitChrThread(0x13, 3)
    WaitChrThread(0x14, 3)
    WaitChrThread(0x15, 3)
    WaitChrThread(0x16, 3)
    WaitChrThread(0x17, 3)
    EndChrThread(0x1F, 0x1)
    OP_6F(0x79)
    OP_0D()

    #C0047
    ChrTalk(
        0x10,
        "#5P兰道夫队长……！\x02",
    )

    CloseMessageWindow()

    #C0048
    ChrTalk(
        0x11,
        (
            "#5P啧……原来那只怪物\x01",
            "只是在吸引我们的注意力！？\x02",
        )
    )

    CloseMessageWindow()
    OP_57(0x0)
    OP_5A()
    Fade(250)
    Sound(805, 0, 100, 0)
    Sound(531, 0, 100, 0)
    Sound(540, 0, 50, 0)
    SetChrChipByIndex(0x101, 0x1E)
    SetChrSubChip(0x101, 0x0)
    SetChrChipByIndex(0x103, 0x1F)
    SetChrSubChip(0x103, 0x0)
    SetChrChipByIndex(0x104, 0x20)
    SetChrSubChip(0x104, 0x0)
    SetChrChipByIndex(0x109, 0x21)
    SetChrSubChip(0x109, 0x0)
    SetChrChipByIndex(0x105, 0x22)
    SetChrSubChip(0x105, 0x0)
    SetChrChipByIndex(0x106, 0x23)
    SetChrSubChip(0x106, 0x0)
    OP_0D()
    Sleep(250)

    #C0049
    ChrTalk(
        0x104,
        "#00312F#12P嗯，正是如此。\x02",
    )

    CloseMessageWindow()

    #C0050
    ChrTalk(
        0x101,
        "#00007F#12P不好意思，我们要从此路通过。\x02",
    )

    CloseMessageWindow()

    #C0051
    ChrTalk(
        0x103,
        (
            "#00211F#12P#N还有，蔡特\x01",
            "并不是怪物。\x02",
        )
    )

    CloseMessageWindow()
    Sleep(300)
    OP_82(0x64, 0x0, 0xBB8, 0x12C)

    #C0052
    ChrTalk(
        0x10,
        "#5P可恶……给我上！\x02",
    )

    CloseMessageWindow()
    Sleep(300)
    OP_82(0x64, 0x0, 0xBB8, 0x12C)

    #C0053
    ChrTalk(
        0x11,
        "#5P拿出全力，把他们干掉！\x02",
    )

    CloseMessageWindow()
    SetCameraDistance(13000, 500)
    SetChrChipByIndex(0x10, 0x28)
    BeginChrThread(0x10, 3, 0, 33)
    Sleep(10)
    BeginChrThread(0x14, 3, 0, 34)
    SetChrChipByIndex(0x11, 0x28)
    BeginChrThread(0x11, 3, 0, 33)
    Sleep(10)
    BeginChrThread(0x15, 3, 0, 34)
    SetChrChipByIndex(0x12, 0x25)
    BeginChrThread(0x12, 3, 0, 33)
    Sleep(10)
    BeginChrThread(0x16, 3, 0, 34)
    SetChrChipByIndex(0x13, 0x25)
    BeginChrThread(0x13, 3, 0, 33)
    Sleep(10)
    BeginChrThread(0x17, 3, 0, 34)
    Sleep(60)
    BlurSwitch(0x64, 0xBBFFFFFF, 0x0, 0x0, 0x0)
    Sleep(250)
    EndChrThread(0x10, 0x3)
    EndChrThread(0x11, 0x3)
    EndChrThread(0x12, 0x3)
    EndChrThread(0x13, 0x3)
    EndChrThread(0x14, 0x3)
    EndChrThread(0x15, 0x3)
    EndChrThread(0x16, 0x3)
    EndChrThread(0x17, 0x3)
    EndChrThread(0x14, 0x0)
    EndChrThread(0x15, 0x0)
    EndChrThread(0x16, 0x0)
    EndChrThread(0x17, 0x0)
    Battle("BattleInfo_5E4", 0x0, 0x0, 0x100, 0x0, 0xFF)
    FadeToDark(0, 0, -1)
    SetChrChipByIndex(0x101, 0xFF)
    SetChrSubChip(0x101, 0x0)
    SetChrChipByIndex(0x103, 0xFF)
    SetChrSubChip(0x103, 0x0)
    SetChrChipByIndex(0x104, 0xFF)
    SetChrSubChip(0x104, 0x0)
    SetChrChipByIndex(0x109, 0xFF)
    SetChrSubChip(0x109, 0x0)
    SetChrChipByIndex(0x105, 0xFF)
    SetChrSubChip(0x105, 0x0)
    SetChrChipByIndex(0x106, 0xFF)
    SetChrSubChip(0x106, 0x0)
    Call(0, 35)
    ClearChrFlags(0x10, 0x8000)
    ClearChrFlags(0x11, 0x8000)
    ClearChrFlags(0x12, 0x8000)
    ClearChrFlags(0x13, 0x8000)
    SetChrFlags(0x14, 0x80)
    SetChrFlags(0x15, 0x80)
    SetChrFlags(0x16, 0x80)
    SetChrFlags(0x17, 0x80)
    SetChrPos(0x0, 7500, 0, 8000, 270)
    SetChrFlags(0x4, 0x80)
    SetChrBattleFlags(0x4, 0x8000)
    SetChrFlags(0x5, 0x80)
    SetChrBattleFlags(0x5, 0x8000)
    OP_69(0xFF, 0x0)
    SetScenarioFlags(0x1A3, 6)
    ModifyEventFlags(0, 0, 0x80)
    Sleep(500)
    EventEnd(0x5)
    Return()

    # Function_27_1C4B end

    def Function_28_23C0(): pass

    label("Function_28_23C0")

    Jc((scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_END)), "loc_23DE")
    OP_A1(0xFE, 0x6A4, 0x8, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7)
    Jump("Function_28_23C0")

    label("loc_23DE")

    Return()

    # Function_28_23C0 end

    def Function_29_23DF(): pass

    label("Function_29_23DF")

    Jc((scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_END)), "loc_23FD")
    OP_A1(0xFE, 0xBB8, 0x8, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7)
    Jump("Function_29_23DF")

    label("loc_23FD")

    Return()

    # Function_29_23DF end

    def Function_30_23FE(): pass

    label("Function_30_23FE")

    OP_9B(0x0, 0xFE, 0x0, 0x3A98, 0x1770, 0x0)
    SetChrChipByIndex(0xFE, 0x24)
    SetChrSubChip(0xFE, 0x0)
    Return()

    # Function_30_23FE end

    def Function_31_2416(): pass

    label("Function_31_2416")

    OP_9B(0x0, 0xFE, 0x0, 0x3A98, 0x1770, 0x0)
    SetChrChipByIndex(0xFE, 0x27)
    SetChrSubChip(0xFE, 0x0)
    Return()

    # Function_31_2416 end

    def Function_32_242E(): pass

    label("Function_32_242E")

    OP_9B(0x0, 0xFE, 0x0, 0x3A98, 0x1770, 0x0)
    SetChrChipByIndex(0xFE, 0x29)
    SetChrSubChip(0xFE, 0x0)
    OP_52(0xFE, 0x7, (scpexpr(EXPR_PUSH_LONG, 0x7D0), scpexpr(EXPR_STUB), scpexpr(EXPR_END)))
    BeginChrThread(0xFE, 0, 0, 28)
    Return()

    # Function_32_242E end

    def Function_33_2457(): pass

    label("Function_33_2457")

    SetChrSubChip(0xFE, 0x0)
    OP_9B(0x0, 0xFE, 0x0, 0xFA0, 0x1770, 0x0)
    Return()

    # Function_33_2457 end

    def Function_34_246B(): pass

    label("Function_34_246B")

    SetChrChipByIndex(0xFE, 0x2A)
    SetChrSubChip(0xFE, 0x0)
    OP_52(0xFE, 0x7, (scpexpr(EXPR_PUSH_LONG, 0x7D0), scpexpr(EXPR_STUB), scpexpr(EXPR_END)))
    BeginChrThread(0xFE, 0, 0, 29)
    OP_9B(0x0, 0xFE, 0x0, 0xFA0, 0x1770, 0x0)
    Return()

    # Function_34_246B end

    def Function_35_2494(): pass

    label("Function_35_2494")

    SetChrChipByIndex(0x10, 0x0)
    SetChrSubChip(0x10, 0x1)
    ClearChrFlags(0x10, 0x80)
    OP_52(0x10, 0x24, (scpexpr(EXPR_PUSH_LONG, 0xB0), scpexpr(EXPR_STUB), scpexpr(EXPR_END)))
    ClearChrFlags(0x10, 0x40)
    ClearChrFlags(0x10, 0x1)
    SetChrPos(0x10, 2600, 0, 7500, 0)
    SetChrChipByIndex(0x11, 0x0)
    SetChrSubChip(0x11, 0x0)
    ClearChrFlags(0x11, 0x80)
    OP_52(0x11, 0x24, (scpexpr(EXPR_PUSH_LONG, 0xB0), scpexpr(EXPR_STUB), scpexpr(EXPR_END)))
    ClearChrFlags(0x11, 0x40)
    ClearChrFlags(0x11, 0x1)
    SetChrPos(0x11, 650, 0, 10150, 45)
    SetChrChipByIndex(0x12, 0x0)
    SetChrSubChip(0x12, 0x1)
    ClearChrFlags(0x12, 0x80)
    OP_52(0x12, 0x24, (scpexpr(EXPR_PUSH_LONG, 0xB0), scpexpr(EXPR_STUB), scpexpr(EXPR_END)))
    ClearChrFlags(0x12, 0x40)
    ClearChrFlags(0x12, 0x1)
    SetChrPos(0x12, -2280, 0, 6930, 90)
    SetChrChipByIndex(0x13, 0x0)
    SetChrSubChip(0x13, 0x0)
    ClearChrFlags(0x13, 0x80)
    OP_52(0x13, 0x24, (scpexpr(EXPR_PUSH_LONG, 0xB0), scpexpr(EXPR_STUB), scpexpr(EXPR_END)))
    ClearChrFlags(0x13, 0x40)
    ClearChrFlags(0x13, 0x1)
    SetChrPos(0x13, 350, 0, 4200, 135)
    Return()

    # Function_35_2494 end

    def Function_36_2561(): pass

    label("Function_36_2561")

    Jc((scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_END)), "loc_2583")
    Sound(845, 0, 70, 0)
    Sleep(150)
    Sound(845, 0, 70, 0)
    Sleep(400)
    Jump("Function_36_2561")

    label("loc_2583")

    Return()

    # Function_36_2561 end

    def Function_37_2584(): pass

    label("Function_37_2584")

    EventBegin(0x0)
    Fade(500)
    OP_68(-23640, 1700, 5050, 0)
    MoveCamera(315, 20, 0, 0)
    OP_6E(500, 0)
    SetCameraDistance(16390, 0)
    SetChrPos(0x101, -24950, 0, 7130, 180)
    OP_4B(0x8, 0xFF)
    OP_0D()

    #C0054
    ChrTalk(
        0x8,
        (
            "#6P嗯……刚才那个孩子……\x01",
            "看起来好像很没精神，\x01",
            "不要紧吧……\x02",
        )
    )

    CloseMessageWindow()

    #C0055
    ChrTalk(
        0x101,
        (
            "#00005F（莫非是……）\x02\x03",

            "#00000F那个，打扰一下，\x01",
            "您刚才所说的孩子，\x01",
            "是指一个绿头发的女孩吗？\x02",
        )
    )

    CloseMessageWindow()
    TurnDirection(0x8, 0x101, 500)

    #C0056
    ChrTalk(
        0x8,
        (
            "#6P哦，是啊……\x01",
            "你是那孩子的监护人吗？\x02",
        )
    )

    CloseMessageWindow()

    #C0057
    ChrTalk(
        0x101,
        (
            "#00000F嗯，是的。\x02\x03",

            "#00003F一眼没看住，\x01",
            "她就消失不见了……\x01",
            "您知道她去什么地方了吗？\x02",
        )
    )

    CloseMessageWindow()

    #C0058
    ChrTalk(
        0x8,
        (
            "#6P哦，她刚刚从这里经过，\x01",
            "走向别墅区那边了。\x02",
        )
    )

    CloseMessageWindow()

    #C0059
    ChrTalk(
        0x8,
        (
            "#6P不知为何，那孩子一脸茫然，\x01",
            "脚步也很蹒跚呢……\x02",
        )
    )

    CloseMessageWindow()

    #C0060
    ChrTalk(
        0x101,
        (
            "#00005F（琪雅遇到什么事情了吗……？）\x02\x03",

            "#00003F（别墅区……\x01",
            "  过去看看吧。）\x02",
        )
    )

    CloseMessageWindow()
    OP_5A()
    OP_1B(0x1, 0xFF, 0xFFFF)
    SetScenarioFlags(0x15A, 6)
    OP_4C(0x8, 0xFF)
    OP_93(0x8, 0x5A, 0x0)
    OP_69(0xFF, 0x0)
    SetChrPos(0x0, -24950, 0, 7130, 180)
    EventEnd(0x5)
    Return()

    # Function_37_2584 end

    def Function_38_27E0(): pass

    label("Function_38_27E0")

    EventBegin(0x1)
    Call(0, 41)
    Sleep(50)
    SetChrPos(0x0, -28690, 0, 8260, 90)
    EventEnd(0x4)
    Return()

    # Function_38_27E0 end

    def Function_39_27FC(): pass

    label("Function_39_27FC")

    EventBegin(0x1)
    Call(0, 41)
    Sleep(50)
    SetChrPos(0x0, 28500, 0, 8080, 270)
    EventEnd(0x4)
    Return()

    # Function_39_27FC end

    def Function_40_2818(): pass

    label("Function_40_2818")

    EventBegin(0x1)
    Call(0, 41)
    Sleep(50)
    SetChrPos(0x0, 100130, 0, 23700, 180)
    EventEnd(0x4)
    Return()

    # Function_40_2818 end

    def Function_41_2834(): pass

    label("Function_41_2834")

    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x15A, 6)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_END)), "loc_2898")

    #C0061
    ChrTalk(
        0x101,
        (
            "#00000F琪雅应该还没\x01",
            "走那么远吧……\x02\x03",

            "说不定附近有人见到过她，\x01",
            "还是再打听一下吧。\x02",
        )
    )

    CloseMessageWindow()
    Jump("loc_28D4")

    label("loc_2898")


    #C0062
    ChrTalk(
        0x101,
        (
            "#00000F有人看到琪雅\x01",
            "走向别墅区了。\x02\x03",

            "……过去找找看吧。\x02",
        )
    )

    CloseMessageWindow()

    label("loc_28D4")

    Return()

    # Function_41_2834 end

    def Function_42_28D5(): pass

    label("Function_42_28D5")

    EventBegin(0x2)
    ClearMapFlags(0x20)
    FadeToDark(300, 0, 100)
    SetChrName("")
    SetMessageWindowPos(-1, -1, -1, -1)

    #A0063
    AnonymousTalk(
        0xFF,
        (
            scpstr(SCPSTR_CODE_COLOR, 0x5),
            scpstr(0x6),
            "别墅区已经被封锁了。\x02",
        )
    )

    CloseMessageWindow()
    OP_57(0x0)
    FadeToBright(300, 0)
    SetMessageWindowPos(14, 280, 60, 3)
    EventEnd(0x3)
    Return()

    # Function_42_28D5 end

    def Function_43_2925(): pass

    label("Function_43_2925")

    EventBegin(0x2)
    ClearMapFlags(0x20)
    CloseMessageWindow()
    FadeToDark(300, 0, 100)
    SetChrName("")
    SetMessageWindowPos(-1, -1, -1, -1)

    #A0064
    AnonymousTalk(
        0xFF,
        (
            scpstr(SCPSTR_CODE_COLOR, 0x5),
            scpstr(0x6),
            "湖水浴场区域已经被封锁了。\x02",
        )
    )

    CloseMessageWindow()
    OP_57(0x0)
    FadeToBright(300, 0)
    SetMessageWindowPos(14, 280, 60, 3)
    EventEnd(0x3)
    Return()

    # Function_43_2925 end

    def Function_44_297C(): pass

    label("Function_44_297C")

    EventBegin(0x2)
    ClearMapFlags(0x20)
    Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A3, 4)), scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(0x1A7, 1)), scpexpr(EXPR_EQUZ), scpexpr(EXPR_NEQUZ_I64), scpexpr(EXPR_END)), "loc_29B5")
    Sound(807, 0, 100, 0)
    SetChrName("")

    #A0065
    AnonymousTalk(
        0xFF,
        (
            scpstr(SCPSTR_CODE_COLOR, 0x5),
            "门上了锁。\x07\x00\x02",
        )
    )

    CloseMessageWindow()
    OP_57(0x0)
    OP_5A()
    Jump("loc_2A02")

    label("loc_29B5")

    Sound(807, 0, 100, 0)
    FadeToDark(300, 0, 100)
    SetChrName("")
    SetMessageWindowPos(-1, -1, -1, -1)

    #A0066
    AnonymousTalk(
        0xFF,
        (
            scpstr(SCPSTR_CODE_COLOR, 0x5),
            scpstr(0x6),
            "上着锁。\x01",
            "好像已经停止营业了。\x02",
        )
    )

    CloseMessageWindow()
    OP_57(0x0)
    FadeToBright(300, 0)
    OP_5A()

    label("loc_2A02")

    SetMessageWindowPos(14, 280, 60, 3)
    EventEnd(0x3)
    Return()

    # Function_44_297C end

    def Function_45_2A0E(): pass

    label("Function_45_2A0E")

    EventBegin(0x1)

    #C0067
    ChrTalk(
        0x101,
        (
            "#00001F（虽然时间紧迫……\x01",
            "  但可以在这里稍微休息片刻。）\x02",
        )
    )

    CloseMessageWindow()
    FadeToDark(300, 0, 100)
    OP_0D()

    Menu(
        0,
        -1,
        -1,
        1,
        (
            "稍作休息\x01",      # 0
            "放弃\x01",          # 1
        )
    )

    MenuEnd(0x0)
    OP_60(0x0)
    FadeToBright(300, 0)
    OP_0D()
    Switch(
        (scpexpr(EXPR_GET_RESULT, 0x0), scpexpr(EXPR_END)),
        (0, "loc_2A90"),
        (SWITCH_DEFAULT, "loc_2AC5"),
    )


    label("loc_2A90")

    SoundLoad(13)
    StopBGM(0xBB8)
    FadeToDark(1000, 0, -1)
    Sleep(700)
    Sound(13, 0, 100, 0)
    OP_0D()
    OP_32(0xFF, 0xFE, 0x0)
    Sleep(3500)
    OP_1F()
    FadeToBright(1000, 0)
    OP_57(0x0)
    Jump("loc_2AD3")

    label("loc_2AC5")

    FadeToBright(300, 0)
    Jump("loc_2AD3")

    label("loc_2AD3")

    Sleep(50)
    SetChrPos(0x0, -5150, 0, 14030, 135)
    EventEnd(0x4)
    Return()

    # Function_45_2A0E end

    def Function_46_2AEA(): pass

    label("Function_46_2AEA")

    EventBegin(0x1)
    SetChrName("")

    #A0068
    AnonymousTalk(
        0xFF,
        (
            scpstr(SCPSTR_CODE_COLOR, 0x5),
            "可以听到蔡特的咆哮声\x01",
            "与猛烈的枪击声。\x02",
        )
    )

    CloseMessageWindow()
    OP_57(0x0)
    OP_5A()

    #C0069
    ChrTalk(
        0x101,
        (
            "#00003F那边就交给蔡特吧……\x02\x03",

            "#00001F我们要趁现在\x01",
            "冲向迎宾馆！\x02",
        )
    )

    CloseMessageWindow()
    OP_5A()
    SetChrPos(0x0, 100000, 0, 19640, 180)
    EventEnd(0x4)
    Return()

    # Function_46_2AEA end

    def Function_47_2B76(): pass

    label("Function_47_2B76")

    EventBegin(0x1)

    #C0070
    ChrTalk(
        0x101,
        (
            "#00001F这边是码头……\x01",
            "我们要利用蔡特发起佯攻的机会，\x01",
            "尽快赶往迎宾馆！\x02",
        )
    )

    CloseMessageWindow()
    OP_5A()
    SetChrPos(0x0, 0, 0, -2800, 1)
    EventEnd(0x4)
    Return()

    # Function_47_2B76 end

    SaveToFile()

Try(main)
