Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 176.61 KB | None | 0 0
  1.   doors = {
  2.  
  3.     -- 1 "Medical Storage Room (r100) -> West Wing Inner Stairway"
  4.     {
  5.         stage = 0x01,
  6.         room = 0x01,
  7.         cut = 0x05,
  8.         position = {x = -185.5583343506,
  9.             y = 6e-06,
  10.             z = 0.2404969931},
  11.         angle = 0.0
  12.     },
  13.  
  14.     -- 2 "West Wing Inner Stairway (r101) -> Medical Storage Room"
  15.     {
  16.         stage = 0x01,
  17.         room = 0x00,
  18.         cut = 0x00,
  19.         position = {x = -96.1977462769,
  20.             y = 0.1177980006,
  21.             z = 187.2223358154},
  22.         angle = -3.3510301113
  23.     },
  24.  
  25.     -- 3 "West Wing Inner Stairway (r101) -> Small storeroom, Old Key / Lockpick"
  26.     {
  27.         stage = 0x01,
  28.         room = 0x02,
  29.         cut = 0x00,
  30.         position = {x = -74.2189254761,
  31.             y = 2.1868441105,
  32.             z = -189.6320648193},
  33.         angle = 0.4188790023
  34.     },
  35.  
  36.     -- 4 "West Wing Inner Stairway (r101) -> Northern Corridor / Tea Room, Armor Key"
  37.     {
  38.         stage = 0x01,
  39.         room = 0x03,
  40.         cut = 0x0e,
  41.         position = {x = -185.6222839355,
  42.             y = 400.2404174805,
  43.             z = -1141.5557861328},
  44.         angle = 1.5707960129
  45.     },
  46.  
  47.     -- 5 "West Wing Inner Stairway (r101) -> Dining Room 2F, Sword Key Maybe?"
  48.     {
  49.         stage = 0x02,
  50.         room = 0x02,
  51.         cut = 0x04,
  52.         position = {x = -687.2668457031,
  53.             y = 400.0,
  54.             z = -332.9822998047},
  55.         angle = 0.0
  56.     },
  57.  
  58.     -- 6 "West Wing Inner Stairway (r101) -> Outside Balcony, Old Key / Lockpick"
  59.     {
  60.         stage = 0x02,
  61.         room = 0x03,
  62.         cut = 0x00,
  63.         position = {x = -2048.4560546875,
  64.             y = 400.0,
  65.             z = -855.3596801758},
  66.         angle = -1.308997035
  67.     },
  68.  
  69.     -- 7 "West Wing Inner Stairway (r101) -> Mirror Corridor, One way door, unlock side"
  70.     {
  71.         stage = 0x02,
  72.         room = 0x14,
  73.         cut = 0x00,
  74.         position = {x = -298.105682373,
  75.             y = 1.2e-05,
  76.             z = -803.2221069336},
  77.         angle = 2.8797910213
  78.     },
  79.  
  80.     -- 8 "West Wing Inner Stairway (r101) -> Trophy Room, Helmet Key"
  81.     {
  82.         stage = 0x02,
  83.         room = 0x15,
  84.         cut = 0x00,
  85.         position = {x = 138.5852966309,
  86.             y = 1.3176790476,
  87.             z = 151.139251709},
  88.         angle = -1.9373149872
  89.     },
  90.  
  91.     -- 9 "Small Storeroom (r102) -> West Wing Inner Stairway"
  92.     {
  93.         stage = 0x01,
  94.         room = 0x01,
  95.         cut = 0x00,
  96.         position = {x = 198.3673400879,
  97.             y = 6e-06,
  98.             z = -630.1188354492},
  99.         angle = -8.901184082
  100.     },
  101.  
  102.     -- 10 "Northern Corridor / Tea Room (r103) -> Dining Room"
  103.     {
  104.         stage = 0x01,
  105.         room = 0x05,
  106.         cut = 0x03,
  107.         position = {x = -652.5380249023,
  108.             y = 6e-06,
  109.             z = -311.1383056641},
  110.         angle = 0.0
  111.     },
  112.  
  113.     -- 11 "Northern Corridor / Tea Room (r103) -> Tea Room, one-sided lock, unlocked this side"
  114.     {
  115.         stage = 0x01,
  116.         room = 0x03,
  117.         cut = 0x03,
  118.         position = {x = -170.9566650391,
  119.             y = 400.2404174805,
  120.             z = 59.285900116},
  121.         angle = -3.0368709564
  122.     },
  123.  
  124.     -- 12 "Northern Corridor / Tea Room (r103) -> Northern Corridor, one-sided lock, locked this side"
  125.     {
  126.         stage = 0x01,
  127.         room = 0x03,
  128.         cut = 0x02,
  129.         position = {x = -169.9614715576,
  130.             y = 400.2404174805,
  131.             z = 166.5815582275},
  132.         angle = 0.0
  133.     },
  134.  
  135.     -- 13 "Northern Corridor / Tea Room (r103) -> West Wing Inner Stairway, armor key?"
  136.     {
  137.         stage = 0x01,
  138.         room = 0x01,
  139.         cut = 0x00,
  140.         position = {x = 442.528137207,
  141.             y = 6e-06,
  142.             z = -677.1212768555},
  143.         angle = -1.5707960129
  144.     },
  145.  
  146.     -- 14 "Northern Corridor / Tea Room (r103) -> Greenhouse"
  147.     {
  148.         stage = 0x01,
  149.         room = 0x0c,
  150.         cut = 0x00,
  151.         position = {x = 270.7933654785,
  152.             y = 6e-06,
  153.             z = -82.5343933105},
  154.         angle = -1.4137159586
  155.     },
  156.  
  157.     -- 15 "Northern Corridor / Tea Room (r103) -> Tiger Eye Room"
  158.     {
  159.         stage = 0x01,
  160.         room = 0x0d,
  161.         cut = 0x00,
  162.         position = {x = 85.4209899902,
  163.             y = 6e-06,
  164.             z = 89.567276001},
  165.         angle = -3.1415920258
  166.     },
  167.  
  168.     -- 16 "Northern Corridor / Tea Room (r103) -> Bar, Armor Mey"
  169.     {
  170.         stage = 0x01,
  171.         room = 0x0f,
  172.         cut = 0x00,
  173.         position = {x = 47.4700279236,
  174.             y = -0.3136320114,
  175.             z = 345.582244873},
  176.         angle = -2.6179940701
  177.     },
  178.  
  179.     -- 17 "Northern Corridor / Tea Room (r103) -> Kitchen, Sword Key"
  180.     {
  181.         stage = 0x02,
  182.         room = 0x1c,
  183.         cut = 0x00,
  184.         position = {x = -526.7700805664,
  185.             y = 6e-06,
  186.             z = -294.9191589355},
  187.         angle = -1.0471980572
  188.     },
  189.  
  190.     -- 18 "Northern Corridor / Tea Room (r103) -> Researcher's Bedroom"
  191.     {
  192.         stage = 0x01,
  193.         room = 0x0e,
  194.         cut = 0x00,
  195.         position = {x = 166.2600708008,
  196.             y = 0.1495209932,
  197.             z = -191.1789398193},
  198.         angle = -1.5707960129
  199.     },
  200.  
  201.     -- 19 "Northern Corridor / Tea Room (r103) -> West Wing Outer Stairway"
  202.     {
  203.         stage = 0x01,
  204.         room = 0x12,
  205.         cut = 0x00,
  206.         position = {x = 110.7677841187,
  207.             y = 6e-06,
  208.             z = 704.5316772461},
  209.         angle = -1.5707960129
  210.     },
  211.  
  212.     -- 20 "Dining Room (r105) -> Main Hall"
  213.     {
  214.         stage = 0x01,
  215.         room = 0x06,
  216.         cut = 0x05,
  217.         position = {x = -612.0,
  218.             y = 200.0,
  219.             z = 20.6274738312},
  220.         angle = 1.5707960129
  221.     },
  222.  
  223.     -- 21 "Dining Room (r105) -> Tea Room"
  224.     {
  225.         stage = 0x01,
  226.         room = 0x03,
  227.         cut = 0x00,
  228.         position = {x = -406.1900939941,
  229.             y = 400.2404174805,
  230.             z = 244.4331817627},
  231.         angle = 3.1415901184
  232.     },
  233.  
  234.     -- 22 "Main Hall (r106) -> Dining Room"
  235.     {
  236.         stage = 0x01,
  237.         room = 0x05,
  238.         cut = 0x00,
  239.         position = {x = 930.0,
  240.             y = 6e-06,
  241.             z = -4.9407119751},
  242.         angle = -7.8539910316
  243.     },
  244.  
  245.     -- 23 "Main Hall (r106) -> Art Room"
  246.     {
  247.         stage = 0x01,
  248.         room = 0x07,
  249.         cut = 0x00,
  250.         position = {x = -437.5476074219,
  251.             y = 1.5e-05,
  252.             z = -5.7398958206},
  253.         angle = 1.518435955
  254.     },
  255.  
  256.     -- 24 "Main Hall (r106) -> Dining Room 2F"
  257.     {
  258.         stage = 0x02,
  259.         room = 0x02,
  260.         cut = 0x00,
  261.         position = {x = 917.225769043,
  262.             y = 400.0,
  263.             z = 32.8967399597},
  264.         angle = -1.5707960129
  265.     },
  266.  
  267.     -- 25 "Main Hall (r106) -> C Corridor, Sword Key"
  268.     {
  269.         stage = 0x02,
  270.         room = 0x04,
  271.         cut = 0x00,
  272.         position = {x = -448.4219360352,
  273.             y = 6e-06,
  274.             z = 513.244934082},
  275.         angle = -4.7123880386
  276.     },
  277.  
  278.     -- 26 "Main Hall (r106) -> Outside Patio, Armor Key"
  279.     {
  280.         stage = 0x02,
  281.         room = 0x12,
  282.         cut = 0x00,
  283.         position = {x = -1306.474609375,
  284.             y = 400.0,
  285.             z = 181.2388763428},
  286.         angle = 2.4085528851
  287.     },
  288.  
  289.     -- 27 "Main Hall (r106) -> Large Art Room, Helmet Key"
  290.     {
  291.         stage = 0x01,
  292.         room = 0x11,
  293.         cut = 0x08,
  294.         position = {x = -426.33203125,
  295.             y = 6e-06,
  296.             z = -412.6229553223},
  297.         angle = 1.5707960129
  298.     },
  299.  
  300.     -- 28 "Main Hall (r106) -> Outside Balcony, locked on the other side"
  301.     {
  302.         stage = 0x02,
  303.         room = 0x03,
  304.         cut = 0x06,
  305.         position = {x = -64.3403244019,
  306.             y = 400.0,
  307.             z = 108.9743804932},
  308.         angle = -1.518435955
  309.     },
  310.  
  311.     -- 29 "Main Hall (r106) -> Stairway Passage, 2x Stone and Metal Object"
  312.     {
  313.         stage = 0x03,
  314.         room = 0x1a,
  315.         cut = 0x00,
  316.         position = {x = 0.5500000119,
  317.             y = 999.5826416016,
  318.             z = -438.8062438965},
  319.         angle = 0.0
  320.     },
  321.  
  322.     -- 30 "Main Hall (r106) -> Graveyard / Crypt"
  323.     {
  324.         stage = 0x01,
  325.         room = 0x0b,
  326.         cut = 0x00,
  327.         position = {x = -706.2979125977,
  328.             y = 1251.2373046875,
  329.             z = -742.0529174805},
  330.         angle = -2.6179940701
  331.     },
  332.  
  333.     -- 31 "Art Room (r107) -> Main Hall"
  334.     {
  335.         stage = 0x01,
  336.         room = 0x06,
  337.         cut = 0x00,
  338.         position = {x = 585.9025268555,
  339.             y = 203.0000152588,
  340.             z = 168.2563171387},
  341.         angle = -1.5184370279
  342.     },
  343.  
  344.     -- 32 "Art Room (r107) -> L Corridor"
  345.     {
  346.         stage = 0x01,
  347.         room = 0x08,
  348.         cut = 0x00,
  349.         position = {x = -759.0000610352,
  350.             y = 6e-06,
  351.             z = 474.449432373},
  352.         angle = 1.5707960129
  353.     },
  354.  
  355.     -- 33 "Art Room (r107) -> Hidden Wardrobe"
  356.     {
  357.         stage = 0x01,
  358.         room = 0x1c,
  359.         cut = 0x00,
  360.         position = {x = 911.9857788086,
  361.             y = 0.0,
  362.             z = -80.8844223022},
  363.         angle = 1.5707960129
  364.     },
  365.  
  366.     -- 34 "L Corridor (r108) -> Art Room"
  367.     {
  368.         stage = 0x01,
  369.         room = 0x07,
  370.         cut = 0x02,
  371.         position = {x = 342.5073547363,
  372.             y = 4.9e-05,
  373.             z = 169.4938201904},
  374.         angle = -1.518435955
  375.     },
  376.  
  377.     -- 35 "L Corridor (r108) -> Winding Corridor / Bathroom"
  378.     {
  379.         stage = 0x01,
  380.         room = 0x09,
  381.         cut = 0x00,
  382.         position = {x = 571.9721069336,
  383.             y = -1.8759429455,
  384.             z = 513.6264648438},
  385.         angle = -3.1939499378
  386.     },
  387.  
  388.     -- 36 "Winding Corridor / Bathroom (r109) -> Dark Corridor"
  389.     {
  390.         stage = 0x01,
  391.         room = 0x0a,
  392.         cut = 0x00,
  393.         position = {x = 399.0812988281,
  394.             y = 0.1118530035,
  395.             z = 25.5173053741},
  396.         angle = -1.3613510132
  397.     },
  398.  
  399.     -- 37 "Winding Corridor / Bathroom (r109) -> Winding Corridor"
  400.     {
  401.         stage = 0x01,
  402.         room = 0x09,
  403.         cut = 0x03,
  404.         position = {x = 242.7505645752,
  405.             y = -1.8759429455,
  406.             z = 254.7606964111},
  407.         angle = 0.0
  408.     },
  409.  
  410.     -- 38 "Winding Corridor / Bathroom (r109) -> L Corridor"
  411.     {
  412.         stage = 0x01,
  413.         room = 0x08,
  414.         cut = 0x04,
  415.         position = {x = 428.4866638184,
  416.             y = 6e-06,
  417.             z = -793.5447387695},
  418.         angle = 0.0
  419.     },
  420.  
  421.     -- 39 "Winding Corridor / Bathroom (r109) -> Bathroom, Old Key"
  422.     {
  423.         stage = 0x01,
  424.         room = 0x09,
  425.         cut = 0x0c,
  426.         position = {x = 246.4464416504,
  427.             y = -1.8759429455,
  428.             z = 136.302154541},
  429.         angle = 3.1939499378
  430.     },
  431.  
  432.     -- 40 "Winding Corridor / Bathroom (r109) -> Marble Room"
  433.     {
  434.         stage = 0x01,
  435.         room = 0x15,
  436.         cut = 0x01,
  437.         position = {x = -305.191192627,
  438.             y = 3.4e-05,
  439.             z = 140.3449554443},
  440.         angle = 1.5707960129
  441.     },
  442.  
  443.     -- 41 "Winding Corridor / Bathroom (r109) -> Outside Boiler, old key"
  444.     {
  445.         stage = 0x01,
  446.         room = 0x14,
  447.         cut = 0x00,
  448.         position = {x = 99.6279907227,
  449.             y = 6e-06,
  450.             z = 487.2494812012},
  451.         angle = 1.8325959444
  452.     },
  453.  
  454.     -- 42 "Dark Corridor (r10a) -> Large Gallery, Armor Key"
  455.     {
  456.         stage = 0x01,
  457.         room = 0x17,
  458.         cut = 0x06,
  459.         position = {x = -486.3245239258,
  460.             y = 3.9169070721,
  461.             z = -197.3612060547},
  462.         angle = -5.3930687904
  463.     },
  464.  
  465.     -- 43 "Dark Corridor (r10a) -> Courtyard Study, Spencer Key"
  466.     {
  467.         stage = 0x01,
  468.         room = 0x19,
  469.         cut = 0x00,
  470.         position = {x = 5.2347111702,
  471.             y = 6e-06,
  472.             z = 137.6816253662},
  473.         angle = -3.1121320724
  474.     },
  475.  
  476.     -- 44 "Dark Corridor (r10a) -> West Wing Stairway"
  477.     {
  478.         stage = 0x02,
  479.         room = 0x07,
  480.         cut = 0x00,
  481.         position = {x = -408.5354919434,
  482.             y = 0.001511,
  483.             z = -18.1749629974},
  484.         angle = -3.1415920258
  485.     },
  486.  
  487.     -- 45 "Dark Corridor (r10a) -> Winding Corridor / Bathroom"
  488.     {
  489.         stage = 0x01,
  490.         room = 0x09,
  491.         cut = 0x07,
  492.         position = {x = -607.212097168,
  493.             y = -1.8759429455,
  494.             z = 238.880569458},
  495.         angle = 1.5707960129
  496.     },
  497.  
  498.     -- 46 "Dark Corridor (r10a) -> Roofed Passage"
  499.     {
  500.         stage = 0x01,
  501.         room = 0x1a,
  502.         cut = 0x00,
  503.         position = {x = 72.3234329224,
  504.             y = 6e-06,
  505.             z = 657.1101074219},
  506.         angle = -1.4660760164
  507.     },
  508.  
  509.     -- 47 "Graveyard/crypt (r10b) -> Main Hall"
  510.     {
  511.         stage = 0x01,
  512.         room = 0x06,
  513.         cut = 0x09,
  514.         position = {x = 0.1000000015,
  515.             y = 450.0,
  516.             z = -659.760925293},
  517.         angle = 0.0
  518.     },
  519.  
  520.     -- 48 "Graveyard/crypt (r10b) -> Large Gallery, one-sided old key/lockpick door, wrong side"
  521.     {
  522.         stage = 0x01,
  523.         room = 0x17,
  524.         cut = 0x09,
  525.         position = {x = -877.2861328125,
  526.             y = 3.9168150425,
  527.             z = -208.923248291},
  528.         angle = 0.0
  529.     },
  530.  
  531.     -- 49 "Greenhouse (r10c) -> Northern Corridor / Tea Room"
  532.     {
  533.         stage = 0x01,
  534.         room = 0x03,
  535.         cut = 0x11,
  536.         position = {x = 1139.4262695313,
  537.             y = 400.2404174805,
  538.             z = -833.77734375},
  539.         angle = -3.9269878864
  540.     },
  541.  
  542.     -- 50 "Tiger Statue Room (r10d) -> Northern Corridor / Tea Room"
  543.     {
  544.         stage = 0x01,
  545.         room = 0x03,
  546.         cut = 0x0d,
  547.         position = {x = 103.8483657837,
  548.             y = 400.2404174805,
  549.             z = -549.188659668},
  550.         angle = -0.4188790023
  551.     },
  552.  
  553.     -- 51 "Researcher's Bedroom (r10e) -> Northern Corridor / Tea Room"
  554.     {
  555.         stage = 0x01,
  556.         room = 0x03,
  557.         cut = 0x0b,
  558.         position = {x = -200.597366333,
  559.             y = 400.2404174805,
  560.             z = -414.4830627441},
  561.         angle = 1.5707960129
  562.     },
  563.  
  564.     -- 52 "Bar (r10f) -> Northern Corridor / Tea Room, Armor Key"
  565.     {
  566.         stage = 0x01,
  567.         room = 0x03,
  568.         cut = 0x09,
  569.         position = {x = 714.5492553711,
  570.             y = 400.2404174805,
  571.             z = 171.8247070313},
  572.         angle = 0.2617990077
  573.     },
  574.  
  575.     -- 53 "Large Art Room / Mirror Room (r111) -> Main Entry Hall"
  576.     {
  577.         stage = 0x01,
  578.         room = 0x06,
  579.         cut = 0x01,
  580.         position = {x = 618.6096801758,
  581.             y = 200.0,
  582.             z = -259.2869873047},
  583.         angle = -0.628319025
  584.     },
  585.  
  586.     -- 54 "Large Art Room / Mirror Room (r111) -> Mirror Room Door, the one the hunter breaks"
  587.     {
  588.         stage = 0x01,
  589.         room = 0x11,
  590.         cut = 0x09,
  591.         position = {x = 901.9495239258,
  592.             y = 6e-06,
  593.             z = -737.9866943359},
  594.         angle = 1.5707960129
  595.     },
  596.  
  597.     -- 55 "Large Art Room / Mirror Room (r111) -> Mirror Room Door, hunter breaks, don't know which side"
  598.     {
  599.         stage = 0x01,
  600.         room = 0x11,
  601.         cut = 0x0a,
  602.         position = {x = 777.2460327148,
  603.             y = 0.0,
  604.             z = -760.0307006836},
  605.         angle = -1.5707960129
  606.     },
  607.  
  608.     -- 56 "West Wing Outer Stairway (r112) -> Northern Corridor / Tea Room"
  609.     {
  610.         stage = 0x01,
  611.         room = 0x03,
  612.         cut = 0x0a,
  613.         position = {x = -1263.9593505859,
  614.             y = 400.2404174805,
  615.             z = -73.2716293335},
  616.         angle = 1.5707960129
  617.     },
  618.  
  619.     -- 57 "West Wing Outer Stairway (r112) -> Mirror Corridor"
  620.     {
  621.         stage = 0x02,
  622.         room = 0x14,
  623.         cut = 0x07,
  624.         position = {x = -566.3161621094,
  625.             y = 6e-06,
  626.             z = -1092.2418212891},
  627.         angle = 1.5707960129
  628.     },
  629.  
  630.     -- 58 "Outside Boiler (r114) -> Winding Corridor / Bathroom, Old Key / Lockpick"
  631.     {
  632.         stage = 0x01,
  633.         room = 0x09,
  634.         cut = 0x01,
  635.         position = {x = 607.067199707,
  636.             y = -1.8759429455,
  637.             z = 290.0223999023},
  638.         angle = -1.6231559515
  639.     },
  640.  
  641.     -- 59 "Marble Room (r115) -> Winding Corridor / Bathroom"
  642.     {
  643.         stage = 0x01,
  644.         room = 0x09,
  645.         cut = 0x06,
  646.         position = {x = -419.0566101074,
  647.             y = -1.8759429455,
  648.             z = 142.9251403809},
  649.         angle = -1.4660760164
  650.     },
  651.  
  652.     -- 60 "Marble Room (r115) -> Living Room"
  653.     {
  654.         stage = 0x01,
  655.         room = 0x16,
  656.         cut = 0x00,
  657.         position = {x = 104.8816680908,
  658.             y = 0.0,
  659.             z = 260.5829772949},
  660.         angle = 0.2617990077
  661.     },
  662.  
  663.     -- 61 "Living Room (r116) -> Marble Room"
  664.     {
  665.         stage = 0x01,
  666.         room = 0x15,
  667.         cut = 0x02,
  668.         position = {x = -128.5425109863,
  669.             y = 3.4e-05,
  670.             z = 314.3682250977},
  671.         angle = -2.3561930656
  672.     },
  673.  
  674.     -- 62 "Large Gallery (r117) -> Dark Corridor, Armor Key"
  675.     {
  676.         stage = 0x01,
  677.         room = 0x0a,
  678.         cut = 0x02,
  679.         position = {x = -344.1050415039,
  680.             y = 0.1118530035,
  681.             z = 111.3978042603},
  682.         angle = 3.1939499378
  683.     },
  684.  
  685.     -- 63 "Large Gallery (r117) -> Graveyard / Crypt, Old Key / lockpick, one way, this side"
  686.     {
  687.         stage = 0x01,
  688.         room = 0x0b,
  689.         cut = 0x05,
  690.         position = {x = -293.0751953125,
  691.             y = 1000.0,
  692.             z = -1284.2982177734},
  693.         angle = -3.1415920258
  694.     },
  695.  
  696.     -- 64 "West Wing Storeroom (r118) -> West Wing Stairway"
  697.     {
  698.         stage = 0x02,
  699.         room = 0x07,
  700.         cut = 0x03,
  701.         position = {x = -140.0726165771,
  702.             y = 0.001486,
  703.             z = -405.8816833496},
  704.         angle = -2.0943949223
  705.     },
  706.  
  707.     -- 65 "Courtyard Study (r119) -> Dark Corridor, Spencer Key exit"
  708.     {
  709.         stage = 0x01,
  710.         room = 0x0a,
  711.         cut = 0x01,
  712.         position = {x = -121.2225494385,
  713.             y = 0.1118530035,
  714.             z = -52.8396072388},
  715.         angle = 0.5235990286
  716.     },
  717.  
  718.     -- 66 "Roofed Passage (r11a) -> Dark Corridor"
  719.     {
  720.         stage = 0x01,
  721.         room = 0x0a,
  722.         cut = 0x04,
  723.         position = {x = -384.6130371094,
  724.             y = 0.1118530035,
  725.             z = -377.1609191895},
  726.         angle = 1.1519169807
  727.     },
  728.  
  729.     -- 67 "Roofed Passage (r11a) -> Garden Shed"
  730.     {
  731.         stage = 0x01,
  732.         room = 0x1b,
  733.         cut = 0x00,
  734.         position = {x = -127.6962890625,
  735.             y = 100.0,
  736.             z = -28.9368724823},
  737.         angle = 1.6231559515
  738.     },
  739.  
  740.     -- 68 "Garden Shed (r11b) -> Roofed Passage"
  741.     {
  742.         stage = 0x01,
  743.         room = 0x1a,
  744.         cut = 0x04,
  745.         position = {x = 280.6715087891,
  746.             y = 6e-06,
  747.             z = -536.0977172852},
  748.         angle = -1.36135602
  749.     },
  750.  
  751.     -- 69 "Garden Shed (r11b) -> Muddy Path"
  752.     {
  753.         stage = 0x03,
  754.         room = 0x11,
  755.         cut = 0x00,
  756.         position = {x = -934.5357666016,
  757.             y = 950.0,
  758.             z = 631.8634643555},
  759.         angle = -0.1570799947
  760.     },
  761.  
  762.     -- 70 "Garden Shed (r11b) -> Main Garden"
  763.     {
  764.         stage = 0x03,
  765.         room = 0x00,
  766.         cut = 0x00,
  767.         position = {x = 304.59375,
  768.             y = 100.0,
  769.             z = 773.5745239258},
  770.         angle = 3.1415920258
  771.     },
  772.  
  773.     -- 71 "Hidden Wardrobe (r11c) -> Art Room, Closet Key"
  774.     {
  775.         stage = 0x01,
  776.         room = 0x07,
  777.         cut = 0x04,
  778.         position = {x = 749.0062866211,
  779.             y = 6e-06,
  780.             z = -87.8611679077},
  781.         angle = -1.4137159586
  782.     },
  783.  
  784.     -- 72 "Kitchen Elevator (r200) -> Kitchen"
  785.     {
  786.         stage = 0x02,
  787.         room = 0x1c,
  788.         cut = 0x06,
  789.         position = {x = 506.0699768066,
  790.             y = 6e-06,
  791.             z = -85.8927688599},
  792.         angle = 0.5759590268
  793.     },
  794.  
  795.     -- 73 "Kitchen Elevator (r200) -> Elevator Corridor"
  796.     {
  797.         stage = 0x02,
  798.         room = 0x13,
  799.         cut = 0x03,
  800.         position = {x = 242.4876708984,
  801.             y = 6e-06,
  802.             z = -113.5315322876},
  803.         angle = 2.4085528851
  804.     },
  805.  
  806.     -- 74 "Dining Room 2f (r202) -> Main Entry Hall"
  807.     {
  808.         stage = 0x01,
  809.         room = 0x06,
  810.         cut = 0x0b,
  811.         position = {x = -618.7197875977,
  812.             y = 650.0,
  813.             z = 15.0547399521},
  814.         angle = 1.308997035
  815.     },
  816.  
  817.     -- 75 "Dining Room 2f (r202) -> West Wing Inner Stairway"
  818.     {
  819.         stage = 0x01,
  820.         room = 0x01,
  821.         cut = 0x0d,
  822.         position = {x = 333.1380615234,
  823.             y = 399.679901123,
  824.             z = 721.8102416992},
  825.         angle = -2.6703519821
  826.     },
  827.  
  828.     -- 76 "Dining Room 2f (r202) -> Mirror Corridor"
  829.     {
  830.         stage = 0x02,
  831.         room = 0x14,
  832.         cut = 0x05,
  833.         position = {x = 316.8857116699,
  834.             y = 6e-06,
  835.             z = 583.9533691406},
  836.         angle = -3.1415920258
  837.     },
  838.  
  839.     -- 77 "Outside Balcony (r203) -> West Wing Inner Stairway"
  840.     {
  841.         stage = 0x01,
  842.         room = 0x01,
  843.         cut = 0x0c,
  844.         position = {x = 102.9670410156,
  845.             y = 399.679901123,
  846.             z = 678.4649047852},
  847.         angle = 1.5707960129
  848.     },
  849.  
  850.     -- 78 "Outside Balcony (r203) -> Main Entry Hall"
  851.     {
  852.         stage = 0x01,
  853.         room = 0x06,
  854.         cut = 0x0b,
  855.         position = {x = -598.3297119141,
  856.             y = 700.0,
  857.             z = 420.6443481445},
  858.         angle = 2.1467540264
  859.     },
  860.  
  861.     -- 79 "C Corridor (r204) -> Pillar Room"
  862.     {
  863.         stage = 0x02,
  864.         room = 0x0d,
  865.         cut = 0x00,
  866.         position = {x = -102.6438140869,
  867.             y = 2.0694460869,
  868.             z = -460.0968322754},
  869.         angle = 0.0523700006
  870.     },
  871.  
  872.     -- 80 "C Corridor (r204) -> West Wing Stairway"
  873.     {
  874.         stage = 0x02,
  875.         room = 0x07,
  876.         cut = 0x09,
  877.         position = {x = -393.7518615723,
  878.             y = 350.1434631348,
  879.             z = 168.1954193115},
  880.         angle = 3.1415901184
  881.     },
  882.  
  883.     -- 81 "C Corridor (r204) -> Small Library"
  884.     {
  885.         stage = 0x02,
  886.         room = 0x06,
  887.         cut = 0x00,
  888.         position = {x = -179.5275115967,
  889.             y = 1.3638579845,
  890.             z = 341.2149047852},
  891.         angle = 3.1415920258
  892.     },
  893.  
  894.     -- 82 "C Corridor (r204) -> Main Entry Hall"
  895.     {
  896.         stage = 0x01,
  897.         room = 0x06,
  898.         cut = 0x0e,
  899.         position = {x = 585.1510009766,
  900.             y = 650.0,
  901.             z = -355.7881774902},
  902.         angle = -1.2042779922
  903.     },
  904.  
  905.     -- 83 "C Corridor (r204) -> Armor Room"
  906.     {
  907.         stage = 0x02,
  908.         room = 0x05,
  909.         cut = 0x00,
  910.         position = {x = 467.7005310059,
  911.             y = 9e-06,
  912.             z = -32.8008003235},
  913.         angle = -1.466070056
  914.     },
  915.  
  916.     -- 84 "Armor Room (r205) -> C Corridor"
  917.     {
  918.         stage = 0x02,
  919.         room = 0x04,
  920.         cut = 0x03,
  921.         position = {x = 486.9184570313,
  922.             y = 6e-06,
  923.             z = 53.1332511902},
  924.         angle = 1.5707960129
  925.     },
  926.  
  927.     -- 85 "Small Library (r206) -> C Corridor"
  928.     {
  929.         stage = 0x02,
  930.         room = 0x04,
  931.         cut = 0x06,
  932.         position = {x = -395.520690918,
  933.             y = 6e-06,
  934.             z = -436.7153930664},
  935.         angle = 0.0
  936.     },
  937.  
  938.     -- 86 "Small Library (r206) -> West Wing Stairway"
  939.     {
  940.         stage = 0x02,
  941.         room = 0x07,
  942.         cut = 0x08,
  943.         position = {x = -406.278717041,
  944.             y = 350.1434020996,
  945.             z = -349.7399902344},
  946.         angle = -11.2050056458
  947.     },
  948.  
  949.     -- 87 "West Wing Stairway (r207) -> Deer Room"
  950.     {
  951.         stage = 0x02,
  952.         room = 0x08,
  953.         cut = 0x01,
  954.         position = {x = -6.0195660591,
  955.             y = 6e-06,
  956.             z = -104.0159454346},
  957.         angle = 0.0
  958.     },
  959.  
  960.     -- 88 "West Wing Stairway (r207) -> Resting Room"
  961.     {
  962.         stage = 0x02,
  963.         room = 0x0b,
  964.         cut = 0x00,
  965.         position = {x = 239.9546356201,
  966.             y = 6e-06,
  967.             z = -159.8778839111},
  968.         angle = -0.1570799947
  969.     },
  970.  
  971.     -- 89 "West Wing Stairway (r207) -> West Wing Storeroom"
  972.     {
  973.         stage = 0x01,
  974.         room = 0x18,
  975.         cut = 0x01,
  976.         position = {x = 40.2122764587,
  977.             y = 6e-06,
  978.             z = -192.4102935791},
  979.         angle = 0.0
  980.     },
  981.  
  982.     -- 90 "West Wing Stairway (r207) -> C Corridor"
  983.     {
  984.         stage = 0x02,
  985.         room = 0x04,
  986.         cut = 0x05,
  987.         position = {x = 129.1171875,
  988.             y = 6e-06,
  989.             z = -433.0739440918},
  990.         angle = 0.2094399929
  991.     },
  992.  
  993.     -- 91 "West Wing Stairway (r207) -> Dark Corridor"
  994.     {
  995.         stage = 0x01,
  996.         room = 0x0a,
  997.         cut = 0x00,
  998.         position = {x = 163.2590637207,
  999.             y = 0.1118530035,
  1000.             z = -58.9627342224},
  1001.         angle = 0.0
  1002.     },
  1003.  
  1004.     -- 92 "Deer Room (r208) -> West Wing Stairway"
  1005.     {
  1006.         stage = 0x02,
  1007.         room = 0x07,
  1008.         cut = 0x06,
  1009.         position = {x = 458.3749084473,
  1010.             y = 350.1434631348,
  1011.             z = -256.9912109375},
  1012.         angle = -2.8797929287
  1013.     },
  1014.  
  1015.     -- 93 "Deer Room (r208) -> Bedroom"
  1016.     {
  1017.         stage = 0x02,
  1018.         room = 0x09,
  1019.         cut = 0x00,
  1020.         position = {x = 198.0014953613,
  1021.             y = 6e-06,
  1022.             z = -65.4023513794},
  1023.         angle = -0.8377580047
  1024.     },
  1025.  
  1026.     -- 94 "Deer Room (r208) -> Fish Tank Room"
  1027.     {
  1028.         stage = 0x02,
  1029.         room = 0x0a,
  1030.         cut = 0x00,
  1031.         position = {x = 55.0412902832,
  1032.             y = 6e-06,
  1033.             z = -215.1664581299},
  1034.         angle = 1.4137159586
  1035.     },
  1036.  
  1037.     -- 95 "Bedroom (r209) -> Deer Room"
  1038.     {
  1039.         stage = 0x02,
  1040.         room = 0x08,
  1041.         cut = 0x00,
  1042.         position = {x = -213.0435028076,
  1043.             y = 6e-06,
  1044.             z = -56.8232841492},
  1045.         angle = 1.2566469908
  1046.     },
  1047.  
  1048.     -- 96 "Attic (r210) -> Attic Entry"
  1049.     {
  1050.         stage = 0x02,
  1051.         room = 0x0e,
  1052.         cut = 0x02,
  1053.         position = {x = 207.4303741455,
  1054.             y = 99.563369751,
  1055.             z = 202.6935882568},
  1056.         angle = -1.5707960129
  1057.     },
  1058.  
  1059.     -- 97 "Outside Patio (r212) -> Main Entry Hall"
  1060.     {
  1061.         stage = 0x01,
  1062.         room = 0x06,
  1063.         cut = 0x0d,
  1064.         position = {x = 606.3908081055,
  1065.             y = 700.0,
  1066.             z = 460.4546813965},
  1067.         angle = -2.1467540264
  1068.     },
  1069.  
  1070.     -- 98 "Elevator Corridor (r213) -> Mirror Corridor"
  1071.     {
  1072.         stage = 0x02,
  1073.         room = 0x14,
  1074.         cut = 0x05,
  1075.         position = {x = 449.1204223633,
  1076.             y = 1.8e-05,
  1077.             z = 416.2937011719},
  1078.         angle = -1.7802350521
  1079.     },
  1080.  
  1081.     -- 99 "Elevator Corridor (r213) -> Materials Room"
  1082.     {
  1083.         stage = 0x02,
  1084.         room = 0x19,
  1085.         cut = 0x00,
  1086.         position = {x = -311.9727783203,
  1087.             y = 0.5082150102,
  1088.             z = 88.4860687256},
  1089.         angle = -1.518435955
  1090.     },
  1091.  
  1092.     -- 100 "Elevator Corridor (r213) -> Kitchen Elevator"
  1093.     {
  1094.         stage = 0x02,
  1095.         room = 0x00,
  1096.         cut = 0x00,
  1097.         position = {x = 113.5634155273,
  1098.             y = -0.1422449946,
  1099.             z = -104.9616012573},
  1100.         angle = 1.308997035
  1101.     },
  1102.  
  1103.     -- 101 "Mirror Corridor (r214) -> Elevator Corridor"
  1104.     {
  1105.         stage = 0x02,
  1106.         room = 0x13,
  1107.         cut = 0x00,
  1108.         position = {x = -609.3511352539,
  1109.             y = 6e-06,
  1110.             z = -129.6498718262},
  1111.         angle = 1.518435955
  1112.     },
  1113.  
  1114.     -- 102 "Mirror Corridor (r214) -> West Wing Inner Stairway"
  1115.     {
  1116.         stage = 0x01,
  1117.         room = 0x01,
  1118.         cut = 0x0a,
  1119.         position = {x = 142.5346221924,
  1120.             y = 399.679901123,
  1121.             z = -608.7462768555},
  1122.         angle = 12.4616355896
  1123.     },
  1124.  
  1125.     -- 103 "Mirror Corridor (r214) -> Dining Room 2F"
  1126.     {
  1127.         stage = 0x02,
  1128.         room = 0x02,
  1129.         cut = 0x04,
  1130.         position = {x = -248.7741699219,
  1131.             y = 400.0,
  1132.             z = -332.3481140137},
  1133.         angle = 0.0
  1134.     },
  1135.  
  1136.     -- 104 "Mirror Corridor (r214) -> West Wing Outer Stairway"
  1137.     {
  1138.         stage = 0x01,
  1139.         room = 0x12,
  1140.         cut = 0x06,
  1141.         position = {x = 490.2495727539,
  1142.             y = 400.0,
  1143.             z = -680.1591186523},
  1144.         angle = -1.8325959444
  1145.     },
  1146.  
  1147.     -- 105 "Mirror Corridor (r214) -> Death Passage"
  1148.     {
  1149.         stage = 0x02,
  1150.         room = 0x17,
  1151.         cut = 0x00,
  1152.         position = {x = -820.0,
  1153.             y = 6e-06,
  1154.             z = -698.6881103516},
  1155.         angle = 1.5707960129
  1156.     },
  1157.  
  1158.     -- 106 "Trophy Room (r215) -> West Wing Inner Stairway"
  1159.     {
  1160.         stage = 0x01,
  1161.         room = 0x01,
  1162.         cut = 0x09,
  1163.         position = {x = 101.0109405518,
  1164.             y = 399.679901123,
  1165.             z = -120.1020431519},
  1166.         angle = 1.5707960129
  1167.     },
  1168.  
  1169.     -- 107 "Library (r216) -> Death Passage"
  1170.     {
  1171.         stage = 0x02,
  1172.         room = 0x17,
  1173.         cut = 0x07,
  1174.         position = {x = 361.843170166,
  1175.             y = 400.0,
  1176.             z = 662.0624389648},
  1177.         angle = 1.5707960129
  1178.     },
  1179.  
  1180.     -- 108 "Death Passage (r217) -> Mirror Corridor"
  1181.     {
  1182.         stage = 0x02,
  1183.         room = 0x14,
  1184.         cut = 0x08,
  1185.         position = {x = 25.4368648529,
  1186.             y = 2.4e-05,
  1187.             z = -1109.5932617188},
  1188.         angle = -1.5707960129
  1189.     },
  1190.  
  1191.     -- 109 "Death Passage (r217) -> Library"
  1192.     {
  1193.         stage = 0x02,
  1194.         room = 0x16,
  1195.         cut = 0x00,
  1196.         position = {x = 537.285949707,
  1197.             y = 400.0,
  1198.             z = 359.5268249512},
  1199.         angle = -1.5707960129
  1200.     },
  1201.  
  1202.     -- 110 "Materials Room (r219) -> Elevator Corridor"
  1203.     {
  1204.         stage = 0x02,
  1205.         room = 0x13,
  1206.         cut = 0x01,
  1207.         position = {x = -172.5206756592,
  1208.             y = 7e-05,
  1209.             z = 85.5953445435},
  1210.         angle = 1.5707960129
  1211.     },
  1212.  
  1213.     -- 111 "Fish Tank Room (r20a) -> Deer Room"
  1214.     {
  1215.         stage = 0x02,
  1216.         room = 0x08,
  1217.         cut = 0x01,
  1218.         position = {x = 214.7413787842,
  1219.             y = 6e-06,
  1220.             z = 26.0847358704},
  1221.         angle = -1.2339179516
  1222.     },
  1223.  
  1224.     -- 112 "Resting Room (r20b) -> West Wing Stairway"
  1225.     {
  1226.         stage = 0x02,
  1227.         room = 0x07,
  1228.         cut = 0x07,
  1229.         position = {x = 1201.3074951172,
  1230.             y = 350.0,
  1231.             z = 73.8472213745},
  1232.         angle = 3.1939499378
  1233.     },
  1234.  
  1235.     -- 113 "Resting Room (r20b) -> Sliding Trap Room / Secret Passage"
  1236.     {
  1237.         stage = 0x02,
  1238.         room = 0x0c,
  1239.         cut = 0x03,
  1240.         position = {x = 1648.0009765625,
  1241.             y = 400.0,
  1242.             z = -1251.8393554688},
  1243.         angle = -1.5707960129
  1244.     },
  1245.  
  1246.     -- 114 "Sliding Trap Room / Secret Passage (r20c) -> Concrete Passage 1"
  1247.     {
  1248.         stage = 0x02,
  1249.         room = 0x1a,
  1250.         cut = 0x00,
  1251.         position = {x = 675.2470092773,
  1252.             y = 6e-06,
  1253.             z = -377.096496582},
  1254.         angle = 0.0
  1255.     },
  1256.  
  1257.     -- 115 "Sliding Trap Room / Secret Passage (r20c) -> Resting Room"
  1258.     {
  1259.         stage = 0x02,
  1260.         room = 0x0b,
  1261.         cut = 0x01,
  1262.         position = {x = -220.1827392578,
  1263.             y = 6e-06,
  1264.             z = -114.8075714111},
  1265.         angle = -4.7123889923
  1266.     },
  1267.  
  1268.     -- 116 "Pillar Room (r20d) -> C Corridor"
  1269.     {
  1270.         stage = 0x02,
  1271.         room = 0x04,
  1272.         cut = 0x02,
  1273.         position = {x = 204.4764099121,
  1274.             y = 6e-06,
  1275.             z = 580.3431396484},
  1276.         angle = -9.6342182159
  1277.     },
  1278.  
  1279.     -- 117 "Pillar Room (r20d) -> Attic Entry"
  1280.     {
  1281.         stage = 0x02,
  1282.         room = 0x0e,
  1283.         cut = 0x00,
  1284.         position = {x = -238.2030029297,
  1285.             y = 6e-06,
  1286.             z = 203.30859375},
  1287.         angle = -4.5553078651
  1288.     },
  1289.  
  1290.     -- 118 "Attic Entry (r20e) -> Pillar Room"
  1291.     {
  1292.         stage = 0x02,
  1293.         room = 0x0d,
  1294.         cut = 0x03,
  1295.         position = {x = 429.8143005371,
  1296.             y = 2.069437027,
  1297.             z = 111.7691268921},
  1298.         angle = -1.6755100489
  1299.     },
  1300.  
  1301.     -- 119 "Attic Entry (r20e) -> Attic"
  1302.     {
  1303.         stage = 0x02,
  1304.         room = 0x10,
  1305.         cut = 0x00,
  1306.         position = {x = -110.1372299194,
  1307.             y = 1.2026400566,
  1308.             z = 611.9430541992},
  1309.         angle = 2.3561940193
  1310.     },
  1311.  
  1312.     -- 120 "Attic Entry (r20e) -> Small Dining Room"
  1313.     {
  1314.         stage = 0x02,
  1315.         room = 0x0f,
  1316.         cut = 0x00,
  1317.         position = {x = 125.122428894,
  1318.             y = -1.0360230207,
  1319.             z = -165.5233154297},
  1320.         angle = -0.5235990286
  1321.     },
  1322.  
  1323.     -- 121 "Small Dining Room (r20f) -> Attic Entry"
  1324.     {
  1325.         stage = 0x02,
  1326.         room = 0x0e,
  1327.         cut = 0x03,
  1328.         position = {x = -80.0172119141,
  1329.             y = 6e-06,
  1330.             z = -378.514251709},
  1331.         angle = 1.308997035
  1332.     },
  1333.  
  1334.     -- 122 "Concrete Passage 1 (r21a) -> Concrete Passage 2"
  1335.     {
  1336.         stage = 0x02,
  1337.         room = 0x1b,
  1338.         cut = 0x00,
  1339.         position = {x = -754.8417358398,
  1340.             y = 15.6630649567,
  1341.             z = 407.9189453125},
  1342.         angle = -1.5707960129
  1343.     },
  1344.  
  1345.     -- 123 "Concrete Passage 1 (r21a) -> Sliding Trap Room / Secret Passage"
  1346.     {
  1347.         stage = 0x02,
  1348.         room = 0x0c,
  1349.         cut = 0x02,
  1350.         position = {x = 737.2627563477,
  1351.             y = 0.0,
  1352.             z = -367.8359680176},
  1353.         angle = 1.4137170315
  1354.     },
  1355.  
  1356.     -- 124 "Concrete Passage 2 (r21b) -> Kitchen"
  1357.     {
  1358.         stage = 0x02,
  1359.         room = 0x1c,
  1360.         cut = 0x05,
  1361.         position = {x = -586.0974731445,
  1362.             y = 6e-06,
  1363.             z = 253.9827423096},
  1364.         angle = 2.5656321049
  1365.     },
  1366.  
  1367.     -- 125 "Concrete Passage 2 (r21b) -> Concrete Passage 1"
  1368.     {
  1369.         stage = 0x02,
  1370.         room = 0x1a,
  1371.         cut = 0x07,
  1372.         position = {x = -642.4590454102,
  1373.             y = 6e-06,
  1374.             z = 392.6764831543},
  1375.         angle = 1.4137159586
  1376.     },
  1377.  
  1378.     -- 126 "Kitchen (r21c) -> Northern Corridor / Tea Room"
  1379.     {
  1380.         stage = 0x01,
  1381.         room = 0x03,
  1382.         cut = 0x07,
  1383.         position = {x = 286.595489502,
  1384.             y = -12.4836091995,
  1385.             z = -207.2953643799},
  1386.         angle = -4.6600279808
  1387.     },
  1388.  
  1389.     -- 127 "Kitchen (r21c) -> Concrete Passage 2"
  1390.     {
  1391.         stage = 0x02,
  1392.         room = 0x1b,
  1393.         cut = 0x07,
  1394.         position = {x = -2516.7712402344,
  1395.             y = 15.6630649567,
  1396.             z = -75.7966003418},
  1397.         angle = 0.1570799947
  1398.     },
  1399.  
  1400.     -- 128 "Kitchen (r21c) -> Kitchen Elevator"
  1401.     {
  1402.         stage = 0x02,
  1403.         room = 0x00,
  1404.         cut = 0x00,
  1405.         position = {x = 108.3613204956,
  1406.             y = 0.0,
  1407.             z = -111.5230026245},
  1408.         angle = 1.6755150557
  1409.     },
  1410.  
  1411.     -- 129 "Main Garden (r300) -> Garden Shed"
  1412.     {
  1413.         stage = 0x01,
  1414.         room = 0x1b,
  1415.         cut = 0x01,
  1416.         position = {x = 226.4482879639,
  1417.             y = 100.0,
  1418.             z = -36.1562919617},
  1419.         angle = -1.36135602
  1420.     },
  1421.  
  1422.     -- 130 "Main Garden (r300) -> Water Pool"
  1423.     {
  1424.         stage = 0x03,
  1425.         room = 0x01,
  1426.         cut = 0x00,
  1427.         position = {x = 1704.6666259766,
  1428.             y = 500.0,
  1429.             z = -333.6502380371},
  1430.         angle = -3.0892319679
  1431.     },
  1432.  
  1433.     -- 131 "Main Garden (r300) -> Falls Area"
  1434.     {
  1435.         stage = 0x03,
  1436.         room = 0x02,
  1437.         cut = 0x04,
  1438.         position = {x = 394.0133972168,
  1439.             y = 0.0,
  1440.             z = 788.167175293},
  1441.         angle = -1.5707960129
  1442.     },
  1443.  
  1444.     -- 132 "Water Pool (r301) -> Main Garden"
  1445.     {
  1446.         stage = 0x03,
  1447.         room = 0x00,
  1448.         cut = 0x03,
  1449.         position = {x = 109.1275787354,
  1450.             y = 200.0,
  1451.             z = -729.9171142578},
  1452.         angle = 0.3665190041
  1453.     },
  1454.  
  1455.     -- 133 "Water Pool (r301) -> Falls Area"
  1456.     {
  1457.         stage = 0x03,
  1458.         room = 0x02,
  1459.         cut = 0x00,
  1460.         position = {x = 628.2157592773,
  1461.             y = 50.0,
  1462.             z = -475.5644226074},
  1463.         angle = 0.0
  1464.     },
  1465.  
  1466.     -- 134 "Falls Area (r302) -> Zig Zag Path"
  1467.     {
  1468.         stage = 0x03,
  1469.         room = 0x04,
  1470.         cut = 0x00,
  1471.         position = {x = 668.3807983398,
  1472.             y = 0.0,
  1473.             z = 1323.5379638672},
  1474.         angle = -1.36135602
  1475.     },
  1476.  
  1477.     -- 135 "Falls Area (r302) -> Main Garden"
  1478.     {
  1479.         stage = 0x03,
  1480.         room = 0x00,
  1481.         cut = 0x07,
  1482.         position = {x = -1113.6605224609,
  1483.             y = 100.0,
  1484.             z = 342.4292907715},
  1485.         angle = 1.308997035
  1486.     },
  1487.  
  1488.     -- 136 "Falls Area (r302) -> Water Pool"
  1489.     {
  1490.         stage = 0x03,
  1491.         room = 0x01,
  1492.         cut = 0x06,
  1493.         position = {x = 553.0590209961,
  1494.             y = 520.0,
  1495.             z = -595.4725952148},
  1496.         angle = 3.1415920258
  1497.     },
  1498.  
  1499.     -- 137 "Falls Area (r302) -> Entrance Passage"
  1500.     {
  1501.         stage = 0x03,
  1502.         room = 0x07,
  1503.         cut = 0x00,
  1504.         position = {x = 92.4212036133,
  1505.             y = -0.9999690056,
  1506.             z = -69.3253707886},
  1507.         angle = 2.8797929287
  1508.     },
  1509.  
  1510.     -- 138 "Zig Zag Path (r304) -> Falls Area"
  1511.     {
  1512.         stage = 0x03,
  1513.         room = 0x02,
  1514.         cut = 0x05,
  1515.         position = {x = -744.348449707,
  1516.             y = 50.0,
  1517.             z = -143.196105957},
  1518.         angle = 1.5707960129
  1519.     },
  1520.  
  1521.     -- 139 "Zig Zag Path (r304) -> Entry Corridor"
  1522.     {
  1523.         stage = 0x04,
  1524.         room = 0x00,
  1525.         cut = 0x06,
  1526.         position = {x = -663.2604370117,
  1527.             y = 6e-06,
  1528.             z = 229.0602111816},
  1529.         angle = 2.9845108986
  1530.     },
  1531.  
  1532.     -- 140 "Fountain (r305) -> Jessica's Tomb"
  1533.     {
  1534.         stage = 0x03,
  1535.         room = 0x15,
  1536.         cut = 0x09,
  1537.         position = {x = -1588.5123291016,
  1538.             y = 321.6906433105,
  1539.             z = -2675.0903320313},
  1540.         angle = 0.0
  1541.     },
  1542.  
  1543.     -- 141 "Fountain (r305) -> Laboratory Entrance, both medals"
  1544.     {
  1545.         stage = 0x05,
  1546.         room = 0x00,
  1547.         cut = 0x00,
  1548.         position = {x = 212.1905822754,
  1549.             y = 3.6947050095,
  1550.             z = 252.5200195313},
  1551.         angle = 3.1415920258
  1552.     },
  1553.  
  1554.     -- 142 "Underground Statue Room (r306) -> Boulder Passage 2"
  1555.     {
  1556.         stage = 0x03,
  1557.         room = 0x0f,
  1558.         cut = 0x04,
  1559.         position = {x = -171.9689178467,
  1560.             y = -1.2030849457,
  1561.             z = 267.6651611328},
  1562.         angle = 1.5707960129
  1563.     },
  1564.  
  1565.     -- 143 "Entrance Passage (r307) -> Forked Passage"
  1566.     {
  1567.         stage = 0x03,
  1568.         room = 0x08,
  1569.         cut = 0x00,
  1570.         position = {x = 64.1281738281,
  1571.             y = 100.0,
  1572.             z = -246.9028778076},
  1573.         angle = 1.5707960129
  1574.     },
  1575.  
  1576.     -- 144 "Entrance Passage (r307) -> Falls Area"
  1577.     {
  1578.         stage = 0x03,
  1579.         room = 0x02,
  1580.         cut = 0x06,
  1581.         position = {x = 0.0500000007,
  1582.             y = 50.0,
  1583.             z = -1370.5328369141},
  1584.         angle = 0.0
  1585.     },
  1586.  
  1587.     -- 145 "Entrance Passage (r307) -> Boulder Passage 1"
  1588.     {
  1589.         stage = 0x03,
  1590.         room = 0x0b,
  1591.         cut = 0x00,
  1592.         position = {x = -125.1431884766,
  1593.             y = 0.0,
  1594.             z = -227.4771728516},
  1595.         angle = 0.0
  1596.     },
  1597.  
  1598.     -- 146 "Forked Passage (r308) -> Entrance Passage"
  1599.     {
  1600.         stage = 0x03,
  1601.         room = 0x07,
  1602.         cut = 0x00,
  1603.         position = {x = 202.6758117676,
  1604.             y = 0.0,
  1605.             z = -101.4931945801},
  1606.         angle = -1.8325959444
  1607.     },
  1608.  
  1609.     -- 147 "Forked Passage (r308) -> Generator Room"
  1610.     {
  1611.         stage = 0x03,
  1612.         room = 0x09,
  1613.         cut = 0x00,
  1614.         position = {x = -439.6511230469,
  1615.             y = 6e-06,
  1616.             z = -387.8256225586},
  1617.         angle = 1.5707960129
  1618.     },
  1619.  
  1620.     -- 148 "Generator Room (r309) -> Enrico Room"
  1621.     {
  1622.         stage = 0x03,
  1623.         room = 0x0a,
  1624.         cut = 0x00,
  1625.         position = {x = 114.4433746338,
  1626.             y = 6e-06,
  1627.             z = 71.6767807007},
  1628.         angle = -0.0523599982
  1629.     },
  1630.  
  1631.     -- 149 "Generator Room (r309) -> Garbage Compactor Room"
  1632.     {
  1633.         stage = 0x03,
  1634.         room = 0x16,
  1635.         cut = 0x00,
  1636.         position = {x = -72.2886810303,
  1637.             y = 700.0,
  1638.             z = 0.1185669973},
  1639.         angle = -3.1415920258
  1640.     },
  1641.  
  1642.     -- 150 "Generator Room (r309) -> Forked Passage"
  1643.     {
  1644.         stage = 0x03,
  1645.         room = 0x08,
  1646.         cut = 0x03,
  1647.         position = {x = 867.8339233398,
  1648.             y = 6.2181401253,
  1649.             z = -992.7672729492},
  1650.         angle = -1.5707960129
  1651.     },
  1652.  
  1653.     -- 151 "Muddy Path (r311) -> Garden Shed"
  1654.     {
  1655.         stage = 0x01,
  1656.         room = 0x1b,
  1657.         cut = 0x03,
  1658.         position = {x = 160.4388275146,
  1659.             y = 6e-06,
  1660.             z = 133.6637268066},
  1661.         angle = -2.0943939686
  1662.     },
  1663.  
  1664.     -- 152 "Muddy Path (r311) -> Small Headstone Area"
  1665.     {
  1666.         stage = 0x03,
  1667.         room = 0x12,
  1668.         cut = 0x00,
  1669.         position = {x = -780.123840332,
  1670.             y = 6e-06,
  1671.             z = -905.0071411133},
  1672.         angle = 1.5707960129
  1673.     },
  1674.  
  1675.     -- 153 "Small Headstone Area (r312) -> Forest Pathway"
  1676.     {
  1677.         stage = 0x03,
  1678.         room = 0x13,
  1679.         cut = 0x08,
  1680.         position = {x = 1549.5738525391,
  1681.             y = 0.0,
  1682.             z = 2801.0883789063},
  1683.         angle = 1.5707960129
  1684.     },
  1685.  
  1686.     -- 154 "Small Headstone Area (r312) -> Muddy Path"
  1687.     {
  1688.         stage = 0x03,
  1689.         room = 0x11,
  1690.         cut = 0x07,
  1691.         position = {x = 751.0126342773,
  1692.             y = 0.0,
  1693.             z = -1223.7590332031},
  1694.         angle = -1.5707960129
  1695.     },
  1696.  
  1697.     -- 155 "Forest Pathway (r313) -> Cabin"
  1698.     {
  1699.         stage = 0x03,
  1700.         room = 0x14,
  1701.         cut = 0x0c,
  1702.         position = {x = 456.8004455566,
  1703.             y = 6e-06,
  1704.             z = -38.2266197205},
  1705.         angle = -1.4660760164
  1706.     },
  1707.  
  1708.     -- 156 "Forest Pathway (r313) -> Small Headstone Area"
  1709.     {
  1710.         stage = 0x03,
  1711.         room = 0x12,
  1712.         cut = 0x04,
  1713.         position = {x = 724.2401733398,
  1714.             y = 6e-06,
  1715.             z = -915.2016601563},
  1716.         angle = -1.5707960129
  1717.     },
  1718.  
  1719.     -- 157 "Cabin (r314) -> Forest Pathway"
  1720.     {
  1721.         stage = 0x03,
  1722.         room = 0x13,
  1723.         cut = 0x07,
  1724.         position = {x = 582.1119384766,
  1725.             y = 930.1566772461,
  1726.             z = -57.8140068054},
  1727.         angle = 1.7278749943
  1728.     },
  1729.  
  1730.     -- 158 "Cabin (r314) -> Lisa's Room"
  1731.     {
  1732.         stage = 0x03,
  1733.         room = 0x19,
  1734.         cut = 0x12,
  1735.         position = {x = -308.7571716309,
  1736.             y = 450.0368347168,
  1737.             z = -2309.8464355469},
  1738.         angle = 0.0
  1739.     },
  1740.  
  1741.     -- 159 "Jessica's Tomb (r315) -> Stairway Passage"
  1742.     {
  1743.         stage = 0x03,
  1744.         room = 0x1a,
  1745.         cut = 0x09,
  1746.         position = {x = -1389.6484375,
  1747.             y = 112.0518722534,
  1748.             z = 251.2805023193},
  1749.         angle = -4.5553078651
  1750.     },
  1751.  
  1752.     -- 160 "Jessica's Tomb (r315) -> Fountain"
  1753.     {
  1754.         stage = 0x03,
  1755.         room = 0x05,
  1756.         cut = 0x00,
  1757.         position = {x = -940.9517822266,
  1758.             y = 403.1759338379,
  1759.             z = 258.2190856934},
  1760.         angle = 3.1415920258
  1761.     },
  1762.  
  1763.     -- 161 "Garbage Compactor Room (r316) -> Winding Underground Passage"
  1764.     {
  1765.         stage = 0x03,
  1766.         room = 0x17,
  1767.         cut = 0x00,
  1768.         position = {x = -1463.3045654297,
  1769.             y = 0.0,
  1770.             z = 499.5374145508},
  1771.         angle = -4.6600279808
  1772.     },
  1773.  
  1774.     -- 162 "Garbage Compactor Room (r316) -> Generator Room"
  1775.     {
  1776.         stage = 0x03,
  1777.         room = 0x09,
  1778.         cut = 0x08,
  1779.         position = {x = -95.4759750366,
  1780.             y = 6e-06,
  1781.             z = -24.2706184387},
  1782.         angle = -3.1415920258
  1783.     },
  1784.  
  1785.     -- 163 "Winding Underground Passage (r317) -> Garbage Compactor Room"
  1786.     {
  1787.         stage = 0x03,
  1788.         room = 0x16,
  1789.         cut = 0x02,
  1790.         position = {x = 534.5900268555,
  1791.             y = 700.0,
  1792.             z = -274.1187438965},
  1793.         angle = -1.5707960129
  1794.     },
  1795.  
  1796.     -- 164 "Winding Underground Passage (r317) -> Lisa's Room"
  1797.     {
  1798.         stage = 0x03,
  1799.         room = 0x19,
  1800.         cut = 0x00,
  1801.         position = {x = -604.7788696289,
  1802.             y = 240.7518615723,
  1803.             z = -814.758972168},
  1804.         angle = -3.1415901184
  1805.     },
  1806.  
  1807.     -- 165 "Winding Underground Passage (r317) -> Underground Storage"
  1808.     {
  1809.         stage = 0x03,
  1810.         room = 0x18,
  1811.         cut = 0x00,
  1812.         position = {x = 1141.2956542969,
  1813.             y = 200.0,
  1814.             z = -90.3095092773},
  1815.         angle = 1.5707960129
  1816.     },
  1817.  
  1818.     -- 166 "Underground Storage Room (r318) -> Winding Underground Passage"
  1819.     {
  1820.         stage = 0x03,
  1821.         room = 0x17,
  1822.         cut = 0x0c,
  1823.         position = {x = 936.2931518555,
  1824.             y = 300.0,
  1825.             z = -107.9650192261},
  1826.         angle = -1.5707960129
  1827.     },
  1828.  
  1829.     -- 167 "Lisa's Room (r319) -> Winding Underground Passage"
  1830.     {
  1831.         stage = 0x03,
  1832.         room = 0x17,
  1833.         cut = 0x0b,
  1834.         position = {x = -596.0100097656,
  1835.             y = 50.0000114441,
  1836.             z = -618.9417724609},
  1837.         angle = 0.2617990077
  1838.     },
  1839.  
  1840.     -- 168 "Lisa's Room (r319) -> Cabin"
  1841.     {
  1842.         stage = 0x03,
  1843.         room = 0x14,
  1844.         cut = 0x08,
  1845.         position = {x = -400.1150512695,
  1846.             y = 6e-06,
  1847.             z = -162.9528961182},
  1848.         angle = 0.0
  1849.     },
  1850.  
  1851.     -- 169 "Enrico Room (r30a) -> Generator Room"
  1852.     {
  1853.         stage = 0x03,
  1854.         room = 0x09,
  1855.         cut = 0x03,
  1856.         position = {x = 336.6762390137,
  1857.             y = 6e-06,
  1858.             z = 1217.6868896484},
  1859.         angle = -3.1415920258
  1860.     },
  1861.  
  1862.     -- 170 "Boulder Passage 1 (r30b) -> Spider Room"
  1863.     {
  1864.         stage = 0x03,
  1865.         room = 0x0c,
  1866.         cut = 0x00,
  1867.         position = {x = -10.6054859161,
  1868.             y = -1.1508669853,
  1869.             z = -327.7843017578},
  1870.         angle = 0.1047199965
  1871.     },
  1872.  
  1873.     -- 171 "Boulder Passage 1 (r30b) -> Entrance Passage"
  1874.     {
  1875.         stage = 0x03,
  1876.         room = 0x07,
  1877.         cut = 0x07,
  1878.         position = {x = -405.7911987305,
  1879.             y = -1.0000369549,
  1880.             z = -62.783203125},
  1881.         angle = -3.1415920258
  1882.     },
  1883.  
  1884.     -- 172 "Spider Room (r30c) -> Boulder Passage 1"
  1885.     {
  1886.         stage = 0x03,
  1887.         room = 0x0b,
  1888.         cut = 0x04,
  1889.         position = {x = 169.9793548584,
  1890.             y = 6e-06,
  1891.             z = 543.5004272461},
  1892.         angle = 3.1939499378
  1893.     },
  1894.  
  1895.     -- 173 "Spider Room (r30c) -> Straight Passage"
  1896.     {
  1897.         stage = 0x03,
  1898.         room = 0x0d,
  1899.         cut = 0x01,
  1900.         position = {x = -388.133392334,
  1901.             y = 0.0,
  1902.             z = 1716.3186035156},
  1903.         angle = 0.0
  1904.     },
  1905.  
  1906.     -- 174 "Straight Passage (r30d) -> Spider Room"
  1907.     {
  1908.         stage = 0x03,
  1909.         room = 0x0c,
  1910.         cut = 0x01,
  1911.         position = {x = -9.2071914673,
  1912.             y = -1.1508669853,
  1913.             z = 335.5399780273},
  1914.         angle = -2.8797929287
  1915.     },
  1916.  
  1917.     -- 175 "Straight Passage (r30d) -> Boulder Passage 2"
  1918.     {
  1919.         stage = 0x03,
  1920.         room = 0x0f,
  1921.         cut = 0x00,
  1922.         position = {x = 631.0404663086,
  1923.             y = -0.5684450269,
  1924.             z = 420.9599609375},
  1925.         angle = -1.5707960129
  1926.     },
  1927.  
  1928.     -- 176 "Boulder Passage 2 (r30f) -> Straight Passage"
  1929.     {
  1930.         stage = 0x03,
  1931.         room = 0x0d,
  1932.         cut = 0x02,
  1933.         position = {x = -1119.322265625,
  1934.             y = 11.9726228714,
  1935.             z = 1781.1353759766},
  1936.         angle = 1.5707960129
  1937.     },
  1938.  
  1939.     -- 177 "Boulder Passage 2 (r30f) -> Underground Statue Room"
  1940.     {
  1941.         stage = 0x03,
  1942.         room = 0x06,
  1943.         cut = 0x00,
  1944.         position = {x = 218.8859405518,
  1945.             y = 0.7308989763,
  1946.             z = -254.2398529053},
  1947.         angle = -1.308997035
  1948.     },
  1949.  
  1950.     -- 178 "Stairway Passage (r31a) -> Jessica's Tomb"
  1951.     {
  1952.         stage = 0x03,
  1953.         room = 0x15,
  1954.         cut = 0x00,
  1955.         position = {x = -1466.1312255859,
  1956.             y = 1063.5227050781,
  1957.             z = 223.7356719971},
  1958.         angle = -1.9896739721
  1959.     },
  1960.  
  1961.     -- 179 "Stairway Passage (r31a) -> Main Entry Hall"
  1962.     {
  1963.         stage = 0x01,
  1964.         room = 0x06,
  1965.         cut = 0x03,
  1966.         position = {x = -6.0516347885,
  1967.             y = 6e-06,
  1968.             z = -518.9965209961},
  1969.         angle = -2.9845108986
  1970.     },
  1971.  
  1972.     -- 180 "Entry Corridor (r400) -> Zig Zag Path"
  1973.     {
  1974.         stage = 0x03,
  1975.         room = 0x04,
  1976.         cut = 0x07,
  1977.         position = {x = -754.987487793,
  1978.             y = 212.6770477295,
  1979.             z = -1176.2572021484},
  1980.         angle = -0.0523599982
  1981.     },
  1982.  
  1983.     -- 181 "Entry Corridor (r400) -> Room 001"
  1984.     {
  1985.         stage = 0x04,
  1986.         room = 0x01,
  1987.         cut = 0x00,
  1988.         position = {x = -322.9058532715,
  1989.             y = -0.2494689971,
  1990.             z = 129.9886932373},
  1991.         angle = 1.6231559515
  1992.     },
  1993.  
  1994.     -- 182 "Entry Corridor (r400) -> Central Corridor"
  1995.     {
  1996.         stage = 0x04,
  1997.         room = 0x05,
  1998.         cut = 0x00,
  1999.         position = {x = 191.086227417,
  2000.             y = 1.8225489855,
  2001.             z = 66.9290390015},
  2002.         angle = 0.5235990286
  2003.     },
  2004.  
  2005.     -- 183 "Entry Corridor (r400) -> Rec Room"
  2006.     {
  2007.         stage = 0x04,
  2008.         room = 0x04,
  2009.         cut = 0x00,
  2010.         position = {x = -1773.7200927734,
  2011.             y = 150.0000305176,
  2012.             z = -354.8208312988},
  2013.         angle = -5.0265479088
  2014.     },
  2015.  
  2016.     -- 184 "Entry Corridor (r400) -> Residence Storeroom"
  2017.     {
  2018.         stage = 0x04,
  2019.         room = 0x03,
  2020.         cut = 0x00,
  2021.         position = {x = -160.5947113037,
  2022.             y = 6e-06,
  2023.             z = 57.2813224792},
  2024.         angle = 0.0
  2025.     },
  2026.  
  2027.     -- 185 "Room 001 (r401) -> Entry Corridor"
  2028.     {
  2029.         stage = 0x04,
  2030.         room = 0x00,
  2031.         cut = 0x03,
  2032.         position = {x = -54.873714447,
  2033.             y = 6e-06,
  2034.             z = -191.4211425781},
  2035.         angle = -0.3141590059
  2036.     },
  2037.  
  2038.     -- 186 "Room 001 (r401) -> Room 001 Bathroom"
  2039.     {
  2040.         stage = 0x04,
  2041.         room = 0x02,
  2042.         cut = 0x00,
  2043.         position = {x = -94.1278076172,
  2044.             y = 1.7142000198,
  2045.             z = 88.0371017456},
  2046.         angle = -3.3510301113
  2047.     },
  2048.  
  2049.     -- 187 "Room 001 Bathroom (r402) -> Room 001"
  2050.     {
  2051.         stage = 0x04,
  2052.         room = 0x01,
  2053.         cut = 0x00,
  2054.         position = {x = -258.2230834961,
  2055.             y = -0.2493900061,
  2056.             z = 86.2342147827},
  2057.         angle = 0.5235990286
  2058.     },
  2059.  
  2060.     -- 188 "Residence Storeroom (r403) -> Entry Corridor"
  2061.     {
  2062.         stage = 0x04,
  2063.         room = 0x00,
  2064.         cut = 0x03,
  2065.         position = {x = -137.3125,
  2066.             y = 4e-05,
  2067.             z = -64.8859786987},
  2068.         angle = 2.3561940193
  2069.     },
  2070.  
  2071.     -- 189 "Rec Room (r404) -> Entry Corridor"
  2072.     {
  2073.         stage = 0x04,
  2074.         room = 0x00,
  2075.         cut = 0x03,
  2076.         position = {x = 480.6706237793,
  2077.             y = 6e-06,
  2078.             z = -110.7821655273},
  2079.         angle = -1.7278749943
  2080.     },
  2081.  
  2082.     -- 190 "Central Corridor (r405) -> Entry Corridor"
  2083.     {
  2084.         stage = 0x04,
  2085.         room = 0x00,
  2086.         cut = 0x05,
  2087.         position = {x = 125.5960693359,
  2088.             y = 6e-06,
  2089.             z = 422.2578735352},
  2090.         angle = 3.0368709564
  2091.     },
  2092.  
  2093.     -- 191 "Central Corridor (r405) -> Gallery"
  2094.     {
  2095.         stage = 0x04,
  2096.         room = 0x08,
  2097.         cut = 0x00,
  2098.         position = {x = -732.4996948242,
  2099.             y = 1.2500150204,
  2100.             z = 383.761932373},
  2101.         angle = 1.518435955
  2102.     },
  2103.  
  2104.     -- 192 "Central Corridor (r405) -> Room 002"
  2105.     {
  2106.         stage = 0x04,
  2107.         room = 0x06,
  2108.         cut = 0x00,
  2109.         position = {x = -332.6062927246,
  2110.             y = 0.0469820015,
  2111.             z = 86.5652160645},
  2112.         angle = 1.518435955
  2113.     },
  2114.  
  2115.     -- 193 "Room 002 (r406) -> Central Corridor"
  2116.     {
  2117.         stage = 0x04,
  2118.         room = 0x05,
  2119.         cut = 0x05,
  2120.         position = {x = 1278.5931396484,
  2121.             y = 1.8224760294,
  2122.             z = -843.0131225586},
  2123.         angle = 4.7647480965
  2124.     },
  2125.  
  2126.     -- 194 "Room 002 (r406) -> Aqua Ring Entry"
  2127.     {
  2128.         stage = 0x04,
  2129.         room = 0x0d,
  2130.         cut = 0x00,
  2131.         position = {x = -2352.4685058594,
  2132.             y = 900.0,
  2133.             z = -503.1647033691},
  2134.         angle = -3.1415920258
  2135.     },
  2136.  
  2137.     -- 195 "Room 002 (r406) -> Room 002 Bathroom"
  2138.     {
  2139.         stage = 0x04,
  2140.         room = 0x07,
  2141.         cut = 0x00,
  2142.         position = {x = -297.7878417969,
  2143.             y = 0.0,
  2144.             z = -46.0636367798},
  2145.         angle = -3.1415920258
  2146.     },
  2147.  
  2148.     -- 196 "Room 002 Bathroom (r407) -> Room 002"
  2149.     {
  2150.         stage = 0x04,
  2151.         room = 0x06,
  2152.         cut = 0x00,
  2153.         position = {x = -293.4056091309,
  2154.             y = 0.0111570004,
  2155.             z = 66.6900405884},
  2156.         angle = 0.0
  2157.     },
  2158.  
  2159.     -- 197 "Gallery (r408) -> Central Corridor"
  2160.     {
  2161.         stage = 0x04,
  2162.         room = 0x05,
  2163.         cut = 0x04,
  2164.         position = {x = 1172.2312011719,
  2165.             y = 0.0,
  2166.             z = -186.5845031738},
  2167.         angle = -1.36135602
  2168.     },
  2169.  
  2170.     -- 198 "Gallery (r408) -> Residence Medical Room"
  2171.     {
  2172.         stage = 0x04,
  2173.         room = 0x09,
  2174.         cut = 0x00,
  2175.         position = {x = 175.2208099365,
  2176.             y = -0.7198820114,
  2177.             z = 45.5897865295},
  2178.         angle = -1.7278749943
  2179.     },
  2180.  
  2181.     -- 199 "Gallery (r408) -> Room 003"
  2182.     {
  2183.         stage = 0x04,
  2184.         room = 0x0a,
  2185.         cut = 0x00,
  2186.         position = {x = -324.0556945801,
  2187.             y = -2.1527860165,
  2188.             z = 110.3729476929},
  2189.         angle = 1.518435955
  2190.     },
  2191.  
  2192.     -- 200 "Gallery (r408) -> Plant 42 Room"
  2193.     {
  2194.         stage = 0x04,
  2195.         room = 0x0c,
  2196.         cut = 0x08,
  2197.         position = {x = -412.6532897949,
  2198.             y = 6e-06,
  2199.             z = -4.6547021866},
  2200.         angle = 1.308997035
  2201.     },
  2202.  
  2203.     -- 201 "Residence Medical Room (r409) -> Gallery"
  2204.     {
  2205.         stage = 0x04,
  2206.         room = 0x08,
  2207.         cut = 0x03,
  2208.         position = {x = -247.53465271,
  2209.             y = 6e-06,
  2210.             z = 67.5455627441},
  2211.         angle = 1.518435955
  2212.     },
  2213.  
  2214.     -- 202 "Aqua Ring Storage (r410) -> Aqua Ring Water Tank"
  2215.     {
  2216.         stage = 0x04,
  2217.         room = 0x12,
  2218.         cut = 0x00,
  2219.         position = {x = -292.832611084,
  2220.             y = 200.0,
  2221.             z = -850.4987182617},
  2222.         angle = -4.45058918
  2223.     },
  2224.  
  2225.     -- 203 "Aqua Ring Storage (r410) -> Control Room"
  2226.     {
  2227.         stage = 0x04,
  2228.         room = 0x11,
  2229.         cut = 0x09,
  2230.         position = {x = -921.2290039063,
  2231.             y = 203.2237701416,
  2232.             z = -708.9613647461},
  2233.         angle = -0.5235990286
  2234.     },
  2235.  
  2236.     -- 204 "Aqua Ring Storage (r410) -> Aqua Ring Entry"
  2237.     {
  2238.         stage = 0x04,
  2239.         room = 0x0d,
  2240.         cut = 0x08,
  2241.         position = {x = -1179.9945068359,
  2242.             y = 200.0,
  2243.             z = -1214.4415283203},
  2244.         angle = -2.3561940193
  2245.     },
  2246.  
  2247.     -- 205 "Control Room (r411) -> Aqua Ring Storage"
  2248.     {
  2249.         stage = 0x04,
  2250.         room = 0x10,
  2251.         cut = 0x02,
  2252.         position = {x = -851.9661254883,
  2253.             y = 200.0,
  2254.             z = -794.0439453125},
  2255.         angle = 2.3561940193
  2256.     },
  2257.  
  2258.     -- 206 "Control Room (r411) -> Aqua Ring Walkway"
  2259.     {
  2260.         stage = 0x04,
  2261.         room = 0x0e,
  2262.         cut = 0x05,
  2263.         position = {x = -682.032409668,
  2264.             y = 850.0,
  2265.             z = 703.3986206055},
  2266.         angle = 0.7853980064
  2267.     },
  2268.  
  2269.     -- 207 "Aqua Ring Water Tank (r412) -> Aqua Ring Storage"
  2270.     {
  2271.         stage = 0x04,
  2272.         room = 0x10,
  2273.         cut = 0x00,
  2274.         position = {x = -383.2861328125,
  2275.             y = 200.0,
  2276.             z = -776.6830444336},
  2277.         angle = -1.0471980572
  2278.     },
  2279.  
  2280.     -- 208 "Room 003 (r40a) -> Gallery"
  2281.     {
  2282.         stage = 0x04,
  2283.         room = 0x08,
  2284.         cut = 0x04,
  2285.         position = {x = 293.4875183105,
  2286.             y = 6e-06,
  2287.             z = 223.032989502},
  2288.         angle = -1.5707960129
  2289.     },
  2290.  
  2291.     -- 209 "Room 003 (r40a) -> Room 003 Bathroom"
  2292.     {
  2293.         stage = 0x04,
  2294.         room = 0x0b,
  2295.         cut = 0x00,
  2296.         position = {x = -79.3694534302,
  2297.             y = 1.7142119408,
  2298.             z = 85.9415740967},
  2299.         angle = 3.0368709564
  2300.     },
  2301.  
  2302.     -- 210 "Room 003 (r40a) -> Plant 42 Room"
  2303.     {
  2304.         stage = 0x04,
  2305.         room = 0x0c,
  2306.         cut = 0x00,
  2307.         position = {x = -422.7147521973,
  2308.             y = 6e-06,
  2309.             z = -482.3779296875},
  2310.         angle = -4.8694682121
  2311.     },
  2312.  
  2313.     -- 211 "Room 003 Bathroom (r40b) -> Room 003"
  2314.     {
  2315.         stage = 0x04,
  2316.         room = 0x0a,
  2317.         cut = 0x00,
  2318.         position = {x = -295.9844665527,
  2319.             y = 6e-06,
  2320.             z = 65.4081039429},
  2321.         angle = 1.5707960129
  2322.     },
  2323.  
  2324.     -- 212 "Plant 42 Room (r40c) -> Gallery"
  2325.     {
  2326.         stage = 0x04,
  2327.         room = 0x08,
  2328.         cut = 0x02,
  2329.         position = {x = 1082.7567138672,
  2330.             y = 6e-06,
  2331.             z = 449.9315490723},
  2332.         angle = -1.518435955
  2333.     },
  2334.  
  2335.     -- 213 "Plant 42 Room (r40c) -> Room 003"
  2336.     {
  2337.         stage = 0x04,
  2338.         room = 0x0a,
  2339.         cut = 0x02,
  2340.         position = {x = 352.5828857422,
  2341.             y = -2.1527860165,
  2342.             z = -131.2747039795},
  2343.         angle = -1.4137159586
  2344.     },
  2345.  
  2346.     -- 214 "Aqua Ring Entry (r40d) -> Aqua Ring Walkway"
  2347.     {
  2348.         stage = 0x04,
  2349.         room = 0x0e,
  2350.         cut = 0x00,
  2351.         position = {x = -13.4816961288,
  2352.             y = 800.0,
  2353.             z = -1182.3659667969},
  2354.         angle = -6.0737500191
  2355.     },
  2356.  
  2357.     -- 215 "Aqua Ring Entry (r40d) -> Room 002"
  2358.     {
  2359.         stage = 0x04,
  2360.         room = 0x06,
  2361.         cut = 0x04,
  2362.         position = {x = 213.8012695313,
  2363.             y = 6e-06,
  2364.             z = -214.0320129395},
  2365.         angle = -0.2617990077
  2366.     },
  2367.  
  2368.     -- 216 "Aqua Ring Entry (r40d) -> Aqua Ring Storage"
  2369.     {
  2370.         stage = 0x04,
  2371.         room = 0x10,
  2372.         cut = 0x02,
  2373.         position = {x = -1051.9969482422,
  2374.             y = 200.0,
  2375.             z = -1106.4276123047},
  2376.         angle = 0.8377580047
  2377.     },
  2378.  
  2379.     -- 217 "Aqua Ring Walkway (r40e) -> Aqua Ring Entry"
  2380.     {
  2381.         stage = 0x04,
  2382.         room = 0x0d,
  2383.         cut = 0x07,
  2384.         position = {x = -30.5274600983,
  2385.             y = 800.0,
  2386.             z = -1353.3863525391},
  2387.         angle = 3.2986700535
  2388.     },
  2389.  
  2390.     -- 218 "Aqua Ring Walkway (r40e) -> Control Room"
  2391.     {
  2392.         stage = 0x04,
  2393.         room = 0x11,
  2394.         cut = 0x00,
  2395.         position = {x = -742.1312866211,
  2396.             y = 900.0,
  2397.             z = 612.8060302734},
  2398.         angle = -2.3561940193
  2399.     },
  2400.  
  2401.     -- 219 "Aqua Ring Walkway (r40e) -> Guard Room"
  2402.     {
  2403.         stage = 0x04,
  2404.         room = 0x0f,
  2405.         cut = 0x02,
  2406.         position = {x = 174.3446807861,
  2407.             y = 6e-06,
  2408.             z = 294.3712463379},
  2409.         angle = -1.5707960129
  2410.     },
  2411.  
  2412.     -- 220 "Guard Room (r40f) -> Aqua Ring Walkway"
  2413.     {
  2414.         stage = 0x04,
  2415.         room = 0x0e,
  2416.         cut = 0x08,
  2417.         position = {x = -684.2849731445,
  2418.             y = 800.0,
  2419.             z = 40.4894218445},
  2420.         angle = 0.7853980064
  2421.     },
  2422.  
  2423.     -- 221 "X-ray Room B (r50a) -> Pass Code Corridor"
  2424.     {
  2425.         stage = 0x05,
  2426.         room = 0x08,
  2427.         cut = 0x02,
  2428.         position = {x = 6.545114994,
  2429.             y = 6e-06,
  2430.             z = -40.8079338074},
  2431.         angle = 0.1047199965
  2432.     },
  2433.  
  2434.     -- 222 "Cell Entrance (r50b) -> Pass Code Corridor"
  2435.     {
  2436.         stage = 0x05,
  2437.         room = 0x08,
  2438.         cut = 0x03,
  2439.         position = {x = -447.1234436035,
  2440.             y = 6e-06,
  2441.             z = 35.6934585571},
  2442.         angle = 1.6755150557
  2443.     },
  2444.  
  2445.     -- 223 "Cell Entrance (r50b) -> Cell"
  2446.     {
  2447.         stage = 0x05,
  2448.         room = 0x12,
  2449.         cut = 0x00,
  2450.         position = {x = -1.1369509697,
  2451.             y = 6e-06,
  2452.             z = -194.1025238037},
  2453.         angle = 0.1047199965
  2454.     },
  2455.  
  2456.     -- 224 "Elevator Entry (r50c) -> O Room"
  2457.     {
  2458.         stage = 0x05,
  2459.         room = 0x05,
  2460.         cut = 0x04,
  2461.         position = {x = 937.5010986328,
  2462.             y = 6e-06,
  2463.             z = 1167.0555419922},
  2464.         angle = -1.518435955
  2465.     },
  2466.  
  2467.     -- 225 "Elevator Entry (r50c) -> Power Maze A"
  2468.     {
  2469.         stage = 0x05,
  2470.         room = 0x0f,
  2471.         cut = 0x00,
  2472.         position = {x = -39.0842437744,
  2473.             y = 3.4e-05,
  2474.             z = -760.6155395508},
  2475.         angle = 0.5235990286
  2476.     },
  2477.  
  2478.     -- 226 "Elevator Entry (r50c) -> Laboratory Elevator"
  2479.     {
  2480.         stage = 0x05,
  2481.         room = 0x15,
  2482.         cut = 0x00,
  2483.         position = {x = -13.3474884033,
  2484.             y = 1.8507080078,
  2485.             z = 32.7837905884},
  2486.         angle = -1.5707960129
  2487.     },
  2488.  
  2489.     -- 227 "Elevator Entry (r50c) -> Lab Lounge"
  2490.     {
  2491.         stage = 0x05,
  2492.         room = 0x0e,
  2493.         cut = 0x00,
  2494.         position = {x = -150.8444976807,
  2495.             y = 6e-06,
  2496.             z = 33.3854484558},
  2497.         angle = 1.5707960129
  2498.     },
  2499.  
  2500.     -- 228 "Elevator To Helipad (r50d) -> Helipad"
  2501.     {
  2502.         stage = 0x03,
  2503.         room = 0x03,
  2504.         cut = 0x00,
  2505.         position = {x = -643.9918823242,
  2506.             y = 6e-06,
  2507.             z = -515.9078979492},
  2508.         angle = -0.2617990077
  2509.     },
  2510.  
  2511.     -- 229 "Elevator To Helipad (r50d) -> Passage To Heliport"
  2512.     {
  2513.         stage = 0x05,
  2514.         room = 0x01,
  2515.         cut = 0x07,
  2516.         position = {x = -1143.8966064453,
  2517.             y = 0.0,
  2518.             z = -493.5090332031},
  2519.         angle = 0.0
  2520.     },
  2521.  
  2522.     -- 230 "Laboratory Lounge Room (r50e) -> Elevator Entry"
  2523.     {
  2524.         stage = 0x05,
  2525.         room = 0x0c,
  2526.         cut = 0x01,
  2527.         position = {x = 97.7062988281,
  2528.             y = 100.0,
  2529.             z = 25.5776882172},
  2530.         angle = -1.5707960129
  2531.     },
  2532.  
  2533.     -- 231 "Power Maze A (r50f) -> Elevator Entry"
  2534.     {
  2535.         stage = 0x05,
  2536.         room = 0x0c,
  2537.         cut = 0x03,
  2538.         position = {x = 39.2602500916,
  2539.             y = 0.0,
  2540.             z = 872.421875},
  2541.         angle = -3.0892310143
  2542.     },
  2543.  
  2544.     -- 232 "Power Maze A (r50f) -> Power Maze B"
  2545.     {
  2546.         stage = 0x05,
  2547.         room = 0x10,
  2548.         cut = 0x00,
  2549.         position = {x = 394.5549621582,
  2550.             y = 0.0,
  2551.             z = 88.7163162231},
  2552.         angle = 0.0
  2553.     },
  2554.  
  2555.     -- 233 "Laboratory Entrance (r500) -> Passage to Heliport"
  2556.     {
  2557.         stage = 0x05,
  2558.         room = 0x01,
  2559.         cut = 0x00,
  2560.         position = {x = 1137.6868896484,
  2561.             y = 0.0,
  2562.             z = 756.40234375},
  2563.         angle = -1.5707960129
  2564.     },
  2565.  
  2566.     -- 234 "Laboratory Entrance (r500) -> Item Box Room"
  2567.     {
  2568.         stage = 0x05,
  2569.         room = 0x02,
  2570.         cut = 0x00,
  2571.         position = {x = 408.672454834,
  2572.             y = 0.0,
  2573.             z = 95.6275405884},
  2574.         angle = 0.0
  2575.     },
  2576.  
  2577.     -- 235 "Laboratory Entrance (r500) -> Fountain"
  2578.     {
  2579.         stage = 0x03,
  2580.         room = 0x05,
  2581.         cut = 0x08,
  2582.         position = {x = -23.5004634857,
  2583.             y = 0.7404879928,
  2584.             z = 15.8166456223},
  2585.         angle = -1.5707960129
  2586.     },
  2587.  
  2588.     -- 236 "Passage To Heliport (r501) -> Laboratory Entrance"
  2589.     {
  2590.         stage = 0x05,
  2591.         room = 0x00,
  2592.         cut = 0x04,
  2593.         position = {x = -155.3941497803,
  2594.             y = 3.6947050095,
  2595.             z = -60.4015274048},
  2596.         angle = 1.5707960129
  2597.     },
  2598.  
  2599.     -- 237 "Passage To Heliport (r501) -> Elevator To Helipad"
  2600.     {
  2601.         stage = 0x05,
  2602.         room = 0x0d,
  2603.         cut = 0x00,
  2604.         position = {x = -0.893362999,
  2605.             y = 1.8507080078,
  2606.             z = -18.1584014893},
  2607.         angle = 0.1570799947
  2608.     },
  2609.  
  2610.     -- 238 "Item Box Room (r502) -> Laboratory Stairway"
  2611.     {
  2612.         stage = 0x05,
  2613.         room = 0x03,
  2614.         cut = 0x00,
  2615.         position = {x = 891.4254150391,
  2616.             y = 500.0,
  2617.             z = -126.1241836548},
  2618.         angle = -0.5235990286
  2619.     },
  2620.  
  2621.     -- 239 "Item Box Room (r502) -> Laboratory Entrance"
  2622.     {
  2623.         stage = 0x05,
  2624.         room = 0x00,
  2625.         cut = 0x05,
  2626.         position = {x = -137.9636535645,
  2627.             y = 3.6947050095,
  2628.             z = 107.1470489502},
  2629.         angle = -3.1415920258
  2630.     },
  2631.  
  2632.     -- 240 "Laboratory Stairway (r503) -> Item Box Room"
  2633.     {
  2634.         stage = 0x05,
  2635.         room = 0x02,
  2636.         cut = 0x01,
  2637.         position = {x = 382.2682800293,
  2638.             y = 6e-06,
  2639.             z = 533.5703735352},
  2640.         angle = -3.1415920258
  2641.     },
  2642.  
  2643.     -- 241 "Laboratory Stairway (r503) -> O Room"
  2644.     {
  2645.         stage = 0x05,
  2646.         room = 0x05,
  2647.         cut = 0x00,
  2648.         position = {x = -114.9330215454,
  2649.             y = 6e-06,
  2650.             z = 147.4684295654},
  2651.         angle = 0.0
  2652.     },
  2653.  
  2654.     -- 242 "Laboratory Stairway (r503) -> Visual Data Room"
  2655.     {
  2656.         stage = 0x05,
  2657.         room = 0x04,
  2658.         cut = 0x00,
  2659.         position = {x = -1243.8609619141,
  2660.             y = 500.0,
  2661.             z = 185.3620452881},
  2662.         angle = 0.0
  2663.     },
  2664.  
  2665.     -- 243 "Visual Data Room (r504) -> Laboratory Stairway"
  2666.     {
  2667.         stage = 0x05,
  2668.         room = 0x03,
  2669.         cut = 0x04,
  2670.         position = {x = -763.2736206055,
  2671.             y = 500.0,
  2672.             z = -929.6864624023},
  2673.         angle = 1.5707960129
  2674.     },
  2675.  
  2676.     -- 244 "O Room (r505) -> Laboratory Stairway"
  2677.     {
  2678.         stage = 0x05,
  2679.         room = 0x03,
  2680.         cut = 0x07,
  2681.         position = {x = -122.7207565308,
  2682.             y = 6e-06,
  2683.             z = 41.2941856384},
  2684.         angle = -3.1415920258
  2685.     },
  2686.  
  2687.     -- 245 "O Room (r505) -> Pass Code Corridor"
  2688.     {
  2689.         stage = 0x05,
  2690.         room = 0x08,
  2691.         cut = 0x00,
  2692.         position = {x = 463.774017334,
  2693.             y = 6e-06,
  2694.             z = 18.2403011322},
  2695.         angle = -1.5707960129
  2696.     },
  2697.  
  2698.     -- 246 "O Room (r505) -> Elevator Entry"
  2699.     {
  2700.         stage = 0x05,
  2701.         room = 0x0c,
  2702.         cut = 0x00,
  2703.         position = {x = -623.4996948242,
  2704.             y = 100.0,
  2705.             z = 25.9176940918},
  2706.         angle = 1.5707960129
  2707.     },
  2708.  
  2709.     -- 247 "O Room (r505) -> Operating Room"
  2710.     {
  2711.         stage = 0x05,
  2712.         room = 0x06,
  2713.         cut = 0x00,
  2714.         position = {x = 431.8703308105,
  2715.             y = 6e-06,
  2716.             z = 166.5142059326},
  2717.         angle = -3.1415920258
  2718.     },
  2719.  
  2720.     -- 248 "O Room (r505) -> Morgue"
  2721.     {
  2722.         stage = 0x05,
  2723.         room = 0x07,
  2724.         cut = 0x0a,
  2725.         position = {x = -238.4392852783,
  2726.             y = 6e-06,
  2727.             z = 248.3564300537},
  2728.         angle = -3.1415920258
  2729.     },
  2730.  
  2731.     -- 249 "Operating Room (r506) -> O Room"
  2732.     {
  2733.         stage = 0x05,
  2734.         room = 0x05,
  2735.         cut = 0x06,
  2736.         position = {x = 868.3103637695,
  2737.             y = 6e-06,
  2738.             z = 175.4645233154},
  2739.         angle = 0.0
  2740.     },
  2741.  
  2742.     -- 250 "Morgue (r507) -> O Room"
  2743.     {
  2744.         stage = 0x05,
  2745.         room = 0x05,
  2746.         cut = 0x04,
  2747.         position = {x = 610.0217895508,
  2748.             y = 6e-06,
  2749.             z = 1113.4796142578},
  2750.         angle = 0.0
  2751.     },
  2752.  
  2753.     -- 251 "Pass Code Corridor (r508) -> O Room"
  2754.     {
  2755.         stage = 0x05,
  2756.         room = 0x05,
  2757.         cut = 0x00,
  2758.         position = {x = -189.1475219727,
  2759.             y = 6e-06,
  2760.             z = 284.1280822754},
  2761.         angle = 1.4660760164
  2762.     },
  2763.  
  2764.     -- 252 "Pass Code Corridor (r508) -> Cell Entrance"
  2765.     {
  2766.         stage = 0x05,
  2767.         room = 0x0b,
  2768.         cut = 0x00,
  2769.         position = {x = -219.2983398438,
  2770.             y = 599.9999389648,
  2771.             z = 836.5977783203},
  2772.         angle = -7.8539910316
  2773.     },
  2774.  
  2775.     -- 253 "Pass Code Corridor (r508) -> X-Ray Room B"
  2776.     {
  2777.         stage = 0x05,
  2778.         room = 0x0a,
  2779.         cut = 0x00,
  2780.         position = {x = -183.4309234619,
  2781.             y = 6e-06,
  2782.             z = 252.3326721191},
  2783.         angle = 3.0892310143
  2784.     },
  2785.  
  2786.     -- 254 "Pass Code Corridor (r508) -> X-Ray Room A"
  2787.     {
  2788.         stage = 0x05,
  2789.         room = 0x09,
  2790.         cut = 0x00,
  2791.         position = {x = 236.6350097656,
  2792.             y = 6e-06,
  2793.             z = -227.3342285156},
  2794.         angle = 0.0
  2795.     },
  2796.  
  2797.     -- 255 "X-ray Room A (r509) -> Pass Code Corridor"
  2798.     {
  2799.         stage = 0x05,
  2800.         room = 0x08,
  2801.         cut = 0x00,
  2802.         position = {x = 461.6167907715,
  2803.             y = 6e-06,
  2804.             z = 100.0478439331},
  2805.         angle = -2.0943949223
  2806.     },
  2807.  
  2808.     -- 256 "Power Maze B (r510) -> Power Maze A"
  2809.     {
  2810.         stage = 0x05,
  2811.         room = 0x0f,
  2812.         cut = 0x07,
  2813.         position = {x = 397.6477050781,
  2814.             y = 4e-05,
  2815.             z = -42.9963378906},
  2816.         angle = -3.1415920258
  2817.     },
  2818.  
  2819.     -- 257 "Power Maze B (r510) -> Power Control Room"
  2820.     {
  2821.         stage = 0x05,
  2822.         room = 0x11,
  2823.         cut = 0x00,
  2824.         position = {x = 21.0812511444,
  2825.             y = 6e-06,
  2826.             z = -331.1499938965},
  2827.         angle = 0.0
  2828.     },
  2829.  
  2830.     -- 258 "Power Control Room (r511) -> Power Maze B"
  2831.     {
  2832.         stage = 0x05,
  2833.         room = 0x10,
  2834.         cut = 0x05,
  2835.         position = {x = -105.5565185547,
  2836.             y = 0.0,
  2837.             z = 767.8262939453},
  2838.         angle = -1.5707960129
  2839.     },
  2840.  
  2841.     -- 259 "Cell (r512) -> Cell Entrance"
  2842.     {
  2843.         stage = 0x05,
  2844.         room = 0x0b,
  2845.         cut = 0x05,
  2846.         position = {x = 421.3593444824,
  2847.             y = 0.0,
  2848.             z = -370.2806091309},
  2849.         angle = 3.1939499378
  2850.     },
  2851.  
  2852.     -- 260 "Main Laboratory (r513) -> Main Laboratory Entrance"
  2853.     {
  2854.         stage = 0x05,
  2855.         room = 0x14,
  2856.         cut = 0x02,
  2857.         position = {x = -176.3963928223,
  2858.             y = 1.1304140091,
  2859.             z = 299.7105407715},
  2860.         angle = -3.1415901184
  2861.     },
  2862.  
  2863.     -- 261 "Main Laboratory Entrance (r514) -> Main Laboratory"
  2864.     {
  2865.         stage = 0x05,
  2866.         room = 0x13,
  2867.         cut = 0x00,
  2868.         position = {x = -479.986907959,
  2869.             y = 6e-06,
  2870.             z = -499.830078125},
  2871.         angle = 0.0523599982
  2872.     },
  2873.  
  2874.     -- 262 "Main Laboratory Entrance (r514) -> Laboratory Elevator"
  2875.     {
  2876.         stage = 0x05,
  2877.         room = 0x15,
  2878.         cut = 0x00,
  2879.         position = {x = -8.5835466385,
  2880.             y = 1.8507080078,
  2881.             z = 35.4435806274},
  2882.         angle = -1.5707960129
  2883.     },
  2884.  
  2885.     -- 263 "Laboratory Elevator (r515) -> Elevator Entry"
  2886.     {
  2887.         stage = 0x05,
  2888.         room = 0x0c,
  2889.         cut = 0x04,
  2890.         position = {x = 226.6270751953,
  2891.             y = 100.0,
  2892.             z = -525.1701049805},
  2893.         angle = -1.5707960129
  2894.     },
  2895.  
  2896.     -- 264 "Laboratory Elevator (r515) -> Main Laboratory Entrance"
  2897.     {
  2898.         stage = 0x05,
  2899.         room = 0x14,
  2900.         cut = 0x00,
  2901.         position = {x = 370.9196472168,
  2902.             y = 1.1304169893,
  2903.             z = -103.1900558472},
  2904.         angle = -1.5707960129
  2905.     },
  2906. }
  2907.  
  2908. canrandomize = true
  2909. enemyrando = false
  2910. doorrando = false
  2911. lockrando = false
  2912. waitingforchoice = true
  2913. spawningcrimson = false
  2914.  
  2915. form_show(UDF1)
  2916.  
  2917. playingas = "chris"
  2918. difficulty = "normal"
  2919.  
  2920. room = 6
  2921. stage = 1
  2922.  
  2923. -- see if the file exists
  2924. function file_exists(file)
  2925.   local f = io.open(file, "rb")
  2926.   if f then f:close() end
  2927.   return f ~= nil
  2928. end
  2929.  
  2930. -- get all lines from a file, returns an empty
  2931. -- list/table if the file does not exist
  2932. function lines_from(file)
  2933.   if not file_exists(file) then return {} end
  2934.   lines = {}
  2935.   for line in io.lines(file) do
  2936.     lines[#lines + 1] = line
  2937.   end
  2938.   return lines
  2939. end
  2940.  
  2941. function setDoorByID(pos)
  2942.  
  2943. num = tonumber(pos)
  2944.  
  2945. num = num + 1 --lua is fun, off by one
  2946.  
  2947. --print('SETTING DOOR:' .. num)
  2948.  
  2949. stagetarget = EDX+0x40
  2950. roomtarget = EDX+0x41
  2951. cuttarget = EDX+0x42
  2952. posxtarget = EDX+0x30
  2953. posytarget = EDX+0x34
  2954. posztarget = EDX+0x38
  2955. angletarget = EDX+0x48
  2956.  
  2957. writeBytes(stagetarget, doors[num].stage)
  2958. writeBytes(roomtarget, doors[num].room)
  2959. writeBytes(cuttarget, doors[num].cut)
  2960. writeFloat(posxtarget, doors[num].position.x)
  2961. writeFloat(posytarget, doors[num].position.y)
  2962. writeFloat(posztarget, doors[num].position.z)
  2963. writeFloat(angletarget, doors[num].angle)
  2964.  
  2965. end
  2966.  
  2967. function setLockByID(pos, reverse)
  2968.  
  2969.     keytarget = EDX+0x43
  2970.  
  2971.     --print('set lock:' .. pos)
  2972.  
  2973.     if (pos == "0") then
  2974.         writeBytes(keytarget, 0x84) --armor key
  2975.     end
  2976.  
  2977.     if (pos == "1") then
  2978.         writeBytes(keytarget, 0x0D) --control room key
  2979.     end
  2980.  
  2981.     if (pos == "2") then
  2982.         writeBytes(keytarget, 0x8C) --spencer key
  2983.     end
  2984.  
  2985.     if (pos == "3") then
  2986.         writeBytes(keytarget, 0x14) --gallery key
  2987.     end
  2988.  
  2989.     if (pos == "4") then
  2990.         writeBytes(keytarget, 0x86) --helmet key
  2991.     end
  2992.  
  2993.     if (pos == "5") then
  2994.         writeBytes(keytarget, 0x81) --lockpick / old key
  2995.     end
  2996.  
  2997.     if (pos == "6") then
  2998.  
  2999.         if (reverse == true) then
  3000.             writeBytes(keytarget, 0x16) --one way, locked side
  3001.         else
  3002.             writeBytes(keytarget, 0x15) --one way, unlocked
  3003.         end
  3004.  
  3005.     end
  3006.  
  3007.     if (pos == "7") then
  3008.  
  3009.         if (reverse == true) then
  3010.             writeBytes(keytarget, 0x15) --one way, unlocked
  3011.         else
  3012.             writeBytes(keytarget, 0x16) --one way, locked side
  3013.         end
  3014.  
  3015.     end
  3016.  
  3017.     if (pos == "8") then
  3018.  
  3019.         if (reverse == true) then
  3020.             writeBytes(keytarget, 0x16) --one way, locked side
  3021.         else
  3022.             writeBytes(keytarget, 0x01) --one way, lockpick
  3023.         end
  3024.  
  3025.     end
  3026.  
  3027.     if (pos == "9") then
  3028.  
  3029.         if (reverse == true) then
  3030.             writeBytes(keytarget, 0x01) --one way, lockpick
  3031.         else
  3032.             writeBytes(keytarget, 0x16) --one way, locked side
  3033.         end
  3034.  
  3035.     end
  3036.  
  3037.     if (pos == "10") then
  3038.         writeBytes(keytarget, 0x09) --power area key
  3039.     end
  3040.  
  3041.     if (pos == "11") then
  3042.         writeBytes(keytarget, 0x87) --room 001 key
  3043.     end
  3044.  
  3045.     if (pos == "12") then
  3046.         writeBytes(keytarget, 0x88) --room 003 key
  3047.     end
  3048.  
  3049.     if (pos == "13") then
  3050.         writeBytes(keytarget, 0x85) --shield key
  3051.     end
  3052.  
  3053.     if (pos == "14") then
  3054.         writeBytes(keytarget, 0x83) --sword key
  3055.     end
  3056.  
  3057.     if (pos == "15") then
  3058.         writeBytes(keytarget, 0x00) --unlocked
  3059.     end
  3060.  
  3061. end
  3062.  
  3063. function getEnemyByID(pos)
  3064.  
  3065.   if (pos == "1") then
  3066.     return 0x0F --hunter
  3067.   end
  3068.  
  3069.   if (pos == "2") then
  3070.     return 0x10 --chimera
  3071.   end
  3072.  
  3073.   if (pos == "3") then
  3074.     return 0x12 --tyrant
  3075.   end
  3076.  
  3077.   if (pos == "4") then
  3078.     return 0x09 --dog
  3079.   end
  3080.  
  3081.   if (pos == "5") then
  3082.     return 0x1B --shark
  3083.   end
  3084.  
  3085.   if (pos == "6") then
  3086.     return 0x14 --zombie
  3087.   end
  3088.  
  3089.   if (pos == "7") then
  3090.     return 0x1A --yawn
  3091.   end
  3092.  
  3093.   if (pos == "8") then
  3094.     return 0x18 --spider
  3095.   end
  3096.  
  3097.   if (pos == "9") then
  3098.     return 0x0C --bee
  3099.   end
  3100.  
  3101.   if (pos == "10") then
  3102.     return 0x13 --lisa
  3103.   end
  3104.  
  3105.   if (pos == "11") then
  3106.     return 0x31 --slow tyrant
  3107.   end
  3108.  
  3109.   if (pos == "12") then
  3110.      --print("SPAWNINGCRIMSONTRUESET")
  3111.     spawningcrimson = true
  3112.     return 0x22 --elder crimson head
  3113.   end
  3114.  
  3115. end
  3116.  
  3117. function getItemByID(pos)
  3118.  
  3119.   --print('requesting ItembyID:' .. pos)
  3120.  
  3121.   if (pos == "0") then
  3122.  
  3123.     if (playingas == "chris") then
  3124.       return 0x0003000F --jill handgun
  3125.     else
  3126.       return 0x004D0001 --lighter
  3127.     end
  3128.  
  3129.   end
  3130.  
  3131.   if (pos == "1" or pos == "12" or pos == "22" or pos == "27" or pos == "86" or pos == "111" or pos == "135" or pos == "156" or pos == "175") then
  3132.     return 0x00440003 --ink ribbon
  3133.   end
  3134.  
  3135.   if (pos == "2") then
  3136.     return 0x00490001 --blue gemstone
  3137.   end
  3138.  
  3139.   if (pos == "3") then
  3140.     return 0x002F0001 --shield key
  3141.   end
  3142.  
  3143.   if (pos == "4" or pos == "8" or pos == "21" or pos == "39" or pos == "52" or pos == "72" or pos == "73" or pos == "83" or pos == "98" or pos == "113" or pos == "115" or pos == "127" or pos == "138" or pos == "146") then
  3144.     return 0x0011000F --handgun magazine
  3145.   end
  3146.  
  3147.   if (pos == "5" or pos == "6" or pos == "25" or pos == "29" or pos == "30" or pos == "50" or pos == "53" or pos == "54" or pos == "64" or pos == "65" or pos == "68" or pos == "69" or pos == "70" or pos == "71" or pos == "81" or pos == "87" or pos == "108" or pos == "112" or pos == "124" or pos == "131" or pos == "140" or pos == "141" or pos == "151" or pos == "157" or pos == "158") then
  3148.     return 0x00220001 --green herb
  3149.   end
  3150.  
  3151.   if (pos == "7" or pos == "10" or pos == "35" or pos == "42" or pos == "44" or pos == "58" or pos == "75" or pos == "128" or pos == "136" or pos == "171" or pos == "173" or pos == "179") then
  3152.  
  3153.     if (playingas == "chris") then
  3154.       return 0x00710001 --flash grenade
  3155.     else
  3156.  
  3157.       if (pos == "75") then --all are batteries except this one
  3158.         return 0x00500001 --empty bottle #2
  3159.       else
  3160.         return 0x00720001 --battery pack
  3161.       end
  3162.  
  3163.     end
  3164.   end
  3165.  
  3166.   if (pos == "9" or pos == "32" or pos == "37" or pos == "85" or pos == "94") then
  3167.  
  3168.     if (playingas == "chris") then
  3169.       return 0x002C0001 --old key
  3170.     else
  3171.  
  3172.       if (pos == "9") then
  3173.         return 0x00720001 --battery pack
  3174.       end
  3175.  
  3176.       if (pos == "32") then
  3177.         return 0x00700001 --dagger
  3178.       end
  3179.  
  3180.       if (pos == "37") then
  3181.         return 0x00070006 --grenade launcher
  3182.       end
  3183.  
  3184.       if (pos == "85") then
  3185.         return 0x00500001 -- empty bottle #4
  3186.       end
  3187.  
  3188.       if (pos == "94") then
  3189.         return 0x00500001 --empty bottle #1
  3190.       end
  3191.  
  3192.     end
  3193.  
  3194.   end
  3195.  
  3196.   if (pos == "11") then
  3197.     return 0x004B0001 --broken shotgun
  3198.   end
  3199.  
  3200.   if (pos == "13" or pos == "17" or pos == "33" or pos == "40" or pos == "41" or pos == "46" or pos == "56" or pos == "57" or pos == "60" or pos == "76" or pos == "99" or pos == "101" or pos == "117" or pos == "144" or pos == "153" or pos == "162" or pos == "174" or pos == "177") then
  3201.  
  3202.     if (difficulty == "hard") then --shotgunshells / grenade shells replaced in hard mode
  3203.  
  3204.       if (pos == "46") then
  3205.         return 0x00700001 --dagger
  3206.       end
  3207.  
  3208.       if (pos == "57" or pos == "153") then
  3209.         return 0x00190006 --magnum rounds
  3210.       end
  3211.  
  3212.       if (pos == "60" or pos == "101" or pos == "117") then
  3213.         return 0x0011000F --handgun magazine
  3214.       end
  3215.  
  3216.       if (playingas == "jill" and pos == "177") then
  3217.         return 0x00140006 --incendiary shells
  3218.       end
  3219.  
  3220.     end
  3221.  
  3222.     if (playingas == "chris") then
  3223.       return 0x00120006 --shotgun shells
  3224.     else
  3225.  
  3226.       if (pos == "40") then
  3227.         return 0x00140006 --incendiary shells
  3228.       elseif (pos == "46" or pos == "60" or pos == "177") then
  3229.         return 0x00100006 --grenade shells
  3230.       elseif (pos == "57") then
  3231.         return 0x00130006 --acid shells
  3232.       elseif (pos == "76") then
  3233.         return 0x00500001 --empty bottle #3
  3234.       else
  3235.         return 0x00120006 --shotgun shells
  3236.       end
  3237.  
  3238.     end
  3239.  
  3240.   end
  3241.  
  3242.   if (pos == "14") then
  3243.     return 0x005D0001 --MO Disk 1
  3244.   end
  3245.  
  3246.   if (pos == "15") then
  3247.     return 0x00200001 --Missing Music
  3248.   end
  3249.  
  3250.   if (pos == "16") then
  3251.     return 0x007E0001 --Mask without eyes
  3252.   end
  3253.  
  3254.   if (pos == "18") then
  3255.     return 0x00800001 --Mask without mouth
  3256.   end
  3257.  
  3258.   if (pos == "19" or pos == "20" or pos == "23" or pos == "26" or pos == "49" or pos == "63" or pos == "67" or pos == "80" or pos == "93" or pos == "97" or pos == "169") then
  3259.     return 0x00700001 -- dagger
  3260.   end
  3261.  
  3262.   if (pos == "24") then
  3263.     return 0x00660001 --Jewelry Box / Spencer Key (needs red gemstone to open!)
  3264.   end
  3265.  
  3266.   if (pos == "28") then
  3267.     return 0x004C0001 --herbicide
  3268.   end
  3269.  
  3270.   if (pos == "31" or pos == "55" or pos == "88" or pos == "95" or pos == "110" or pos == "125" or pos == "149") then
  3271.  
  3272.     if (difficulty == "hard" and pos == "125") then
  3273.       return 0x00220001 --green herb
  3274.     end
  3275.  
  3276.     return 0x00230001 --red herb
  3277.  
  3278.   end
  3279.  
  3280.   if (pos == "34") then
  3281.     return 0x00410001 --metal object
  3282.   end
  3283.  
  3284.   if (pos == "36") then
  3285.     return 0x001B0000 --fuel canteen
  3286.   end
  3287.  
  3288.   if (pos == "38" or pos == "43" or pos == "45" or pos == "160" or pos == "176") then
  3289.  
  3290.     if (difficulty == "hard" and pos == "45") then --change this particular spray into shotgun shells in hard mode
  3291.       return 0x00120006 --shotgun shells
  3292.     else
  3293.       return 0x00210001 --first aid spray
  3294.     end
  3295.  
  3296.   end
  3297.  
  3298.   if (pos == "47") then
  3299.     return 0x005B0001 --Last book vol 1 containing Medal of Eagle
  3300.   end
  3301.  
  3302.   if (pos == "48") then
  3303.     return 0x00180001 --collar / imitation key / armor key access
  3304.   end
  3305.  
  3306.   if (pos == "51") then
  3307.     return 0x00150001 --arrowhead
  3308.   end
  3309.  
  3310.   if (pos == "59") then
  3311.     return 0x00430001 --battery
  3312.   end
  3313.  
  3314.   if (pos == "61") then
  3315.     return 0x00480001 --red gemstone
  3316.   end
  3317.  
  3318.   if (pos == "62") then
  3319.     return 0x004A0001 --yellow gemstone
  3320.   end
  3321.  
  3322.   if (pos == "66") then
  3323.     return 0x005C0001 -- last book vol 2 containing Medal of Wolf
  3324.   end
  3325.  
  3326.   if (pos == "74") then
  3327.     return 0x00810001 -- Music, mid pages
  3328.   end
  3329.  
  3330.   if (pos == "77") then
  3331.     return 0x007F0001 -- Mask without nose
  3332.   end
  3333.  
  3334.   if (pos == "78") then
  3335.     return 0x006C0001 -- wooden mount
  3336.   end
  3337.  
  3338.   if (pos == "79") then
  3339.     return 0x00670001 -- jewelry box containing Mask without all
  3340.   end
  3341.  
  3342.   if (pos == "82") then
  3343.     return 0x00600001 -- dog whistle
  3344.   end
  3345.  
  3346.   if (pos == "84" or pos == "121") then
  3347.     return 0x00650001 -- first aid box containing first aid spray
  3348.   end
  3349.  
  3350.   if (pos == "89") then
  3351.     return 0x00750001 -- fish hook
  3352.   end
  3353.  
  3354.   if (pos == "90") then
  3355.     --REMOVED FOR NOW DUE TO BUG return 0x00730001 -- bee specimen
  3356.   end
  3357.  
  3358.   if (pos == "91") then
  3359.     --REMOVED FOR NOW DUE TO BUG return 0x00740001 -- lure without hook
  3360.   end
  3361.  
  3362.   if (pos == "92") then
  3363.     return 0x00390001 -- wind crest
  3364.   end
  3365.  
  3366.   if (pos == "96" or pos == "109" or pos == "119" or pos == "120" or pos == "130" or pos == "132" or pos == "133" or pos == "134") then
  3367.     return 0x00240001 -- blue herb
  3368.   end
  3369.  
  3370.   if (pos == "100") then
  3371.     return 0x00160001 -- book of curses containing sword key
  3372.   end
  3373.  
  3374.   if (pos == "102") then
  3375.     return 0x00350001 -- stone & metal object
  3376.   end
  3377.  
  3378.   if (pos == "103") then
  3379.     return 0x003B0001 -- moon crest
  3380.   end
  3381.  
  3382.   if (pos == "104") then
  3383.     return 0x00380001 -- star crest
  3384.   end
  3385.  
  3386.   if (pos == "105") then
  3387.     return 0x003A0001 -- sun crest
  3388.   end
  3389.  
  3390.   if (pos == "106") then
  3391.     return 0x000B0006 -- magnum revolver
  3392.   end
  3393.  
  3394.   if (pos == "107") then
  3395.     return 0x003C0001 -- square crank
  3396.   end
  3397.  
  3398.   if (pos == "114") then
  3399.     --REMOVED FOR NOW DUE TO BUG return 0x007A0001 -- shaft
  3400.   end
  3401.  
  3402.   if (pos == "116") then
  3403.     return 0x003D0001 -- hexagonal crank
  3404.   end
  3405.  
  3406.   if (pos == "118") then
  3407.     return 0x00020001 -- survival knife
  3408.   end
  3409.  
  3410.   if (pos == "122") then
  3411.     return 0x007B0001 -- cylinder
  3412.   end
  3413.  
  3414.   if (pos == "123") then
  3415.     --removed as this needs to be in specific area return 0x006B0001 -- broken flamethrower
  3416.   end
  3417.  
  3418.   if (pos == "126" or pos == "155" or pos == "165" or pos == "170") then
  3419.  
  3420.     if (difficulty == "hard" and pos == "165") then
  3421.       return 0x0011000F --handgun magazine
  3422.     end
  3423.  
  3424.     if (playingas == "chris") then
  3425.       return 0x00190006 -- magnum rounds
  3426.     else
  3427.  
  3428.       if (pos == "165") then
  3429.         return 0x00140006 --incendiary rounds
  3430.       else
  3431.         return 0x00190006 -- magnum rounds
  3432.       end
  3433.  
  3434.     end
  3435.  
  3436.   end
  3437.  
  3438.   if (pos == "129") then
  3439.     return 0x00630001 -- jewelry box / stone ring
  3440.   end
  3441.  
  3442.   if (pos == "137") then
  3443.     return 0x00040001 -- self defense gun
  3444.   end
  3445.  
  3446.   if (pos == "139") then
  3447.     return 0x006E0001 -- control room key
  3448.   end
  3449.  
  3450.   if (pos == "142") then
  3451.     return 0x005A0001 -- unprinted book
  3452.   end
  3453.  
  3454.   if (pos == "143") then
  3455.     return 0x00830001 -- first aid box with mixed g and b herbs
  3456.   end
  3457.  
  3458.   if (pos == "145") then
  3459.     return 0x00310001 -- room 001 key
  3460.   end
  3461.  
  3462.   if (pos == "147") then
  3463.     return 0x00640001 -- insecticide spray
  3464.   end
  3465.  
  3466.   if (pos == "148") then
  3467.     return 0x00320001 -- room 003 key
  3468.   end
  3469.  
  3470.   if (pos == "150") then
  3471.     return 0x00300004 -- helmet key
  3472.   end
  3473.  
  3474.   if (pos == "152" or pos == "164") then
  3475.  
  3476.     if (difficulty == "hard" and pos == "164") then
  3477.       return 0x00680001 --first aid box with 1 green herb
  3478.     end
  3479.  
  3480.     return 0x00840001 -- first aid box with mixed g and g herbs
  3481.  
  3482.   end
  3483.  
  3484.   if (pos == "154") then
  3485.     return 0x001E0001 -- gallery key
  3486.   end
  3487.  
  3488.   if (pos == "159") then
  3489.     return 0x005E0001 -- MO Disk 2
  3490.   end
  3491.  
  3492.   if (pos == "161") then
  3493.     return 0x005F0001 -- MO Disk 3
  3494.   end
  3495.  
  3496.   if (pos == "163") then
  3497.     return 0x00360002 -- Power area key
  3498.   end
  3499.  
  3500.   if (pos == "166") then
  3501.     return 0x006D0001 -- slide filter
  3502.   end
  3503.  
  3504.   if (pos == "167") then
  3505.     return 0x00770001 -- clark xray
  3506.   end
  3507.  
  3508.   if (pos == "168") then
  3509.     return 0x00780001 -- gail xray
  3510.   end
  3511.  
  3512.   if (pos == "172") then
  3513.     return 0x00680001 -- first aid box with 1 green herb
  3514.   end
  3515.  
  3516.   if (pos == "178") then
  3517.     return 0x006F0001 -- empty fuel supply capsule
  3518.   end
  3519.  
  3520.   if (pos == "180") then
  3521.     return 0x001F0001 -- full fuel supply capsule
  3522.   end
  3523.  
  3524.   if (pos == "181") then
  3525.     return 0x00060006 -- shotgun
  3526.   end
  3527.  
  3528.   return 0x000E0001 -- the "you fucked up" rocket launcher
  3529.  
  3530. end
  3531.  
  3532. function debugger_onBreakpoint()
  3533.  
  3534.   local add=EIP
  3535.   local value=EAX
  3536.  
  3537.   if (canrandomize == false) then
  3538.     debug_continueFromBreakpoint(co_run)
  3539.     return true
  3540.   end
  3541.  
  3542.   if (add == 0x0041DAC4) then --door rando, changed from 0x0041DAB4
  3543.  
  3544.     local doorID = EBX;
  3545.  
  3546.     if (doorrando == true) then
  3547.  
  3548.         --print("DOOR RANDO DOOR RANDO YEAH")
  3549.  
  3550.         --print("room: " .. room)
  3551.         --print("stage: " .. stage)
  3552.         --print("door: " .. EBX)
  3553.  
  3554.         if (stage == 1) then
  3555.  
  3556.           if (room == 0) then --medical storage room
  3557.             setDoorByID(lines[236]) -- ->west wing inner stairway
  3558.           end
  3559.  
  3560.           if (room == 1) then --west wing inner stairway
  3561.  
  3562.             if (doorID == 0) then -- ->medical storage room
  3563.                 setDoorByID(lines[237])
  3564.             end
  3565.  
  3566.             if (doorID == 1) then -- ->small storeroom
  3567.                 setDoorByID(lines[238])
  3568.             end
  3569.  
  3570.             if (doorID == 2) then -- ->northern corridor
  3571.                 setDoorByID(lines[239])
  3572.             end
  3573.  
  3574.             if (doorID == 3) then -- ->dining room 2f
  3575.                 setDoorByID(lines[240])
  3576.             end
  3577.  
  3578.             if (doorID == 4) then -- ->outside balcony
  3579.                 setDoorByID(lines[241])
  3580.             end
  3581.  
  3582.             if (doorID == 5) then -- ->mirror corridor
  3583.                 setDoorByID(lines[242])
  3584.             end
  3585.  
  3586.             if (doorID == 6) then -- ->trophy room
  3587.                 setDoorByID(lines[243])
  3588.             end
  3589.  
  3590.           end
  3591.  
  3592.           if (room == 2) then --small storeroom
  3593.             setDoorByID(lines[244]) -- ->west wing inner stairway
  3594.           end
  3595.  
  3596.           if (room == 3) then --northern corridor / tea room
  3597.            
  3598.             if (doorID == 0) then -- ->dining room
  3599.                 setDoorByID(lines[245])
  3600.             end
  3601.  
  3602.             if (doorID == 1) then -- ->tea room
  3603.                 setDoorByID(lines[246])
  3604.             end
  3605.  
  3606.             if (doorID == 2) then -- ->northern corridor
  3607.                 setDoorByID(lines[247])
  3608.             end
  3609.  
  3610.             if (doorID == 3) then -- ->west wing inner stairway
  3611.                 setDoorByID(lines[248])
  3612.             end
  3613.  
  3614.             if (doorID == 4) then -- ->greenhouse
  3615.                 setDoorByID(lines[249])
  3616.             end
  3617.  
  3618.             if (doorID == 5) then -- ->tiger eye room
  3619.                 setDoorByID(lines[250])
  3620.             end
  3621.  
  3622.             if (doorID == 6) then -- ->bar
  3623.                 setDoorByID(lines[251])
  3624.             end
  3625.  
  3626.             if (doorID == 7) then -- ->kitchen
  3627.                 setDoorByID(lines[252])
  3628.             end
  3629.  
  3630.             if (doorID == 8) then -- ->researcher's bedroom
  3631.                 setDoorByID(lines[253])
  3632.             end
  3633.  
  3634.             if (doorID == 9) then -- ->west wing outer stairway
  3635.                 setDoorByID(lines[254])
  3636.             end
  3637.  
  3638.           end
  3639.  
  3640.           if (room == 5) then --dining room
  3641.  
  3642.             if (doorID == 0) then -- ->main hall
  3643.                 setDoorByID(lines[255])
  3644.             end
  3645.  
  3646.             if (doorID == 1) then -- ->tea room
  3647.                 setDoorByID(lines[256])
  3648.             end
  3649.  
  3650.           end
  3651.  
  3652.           if (room == 6) then --main hall
  3653.  
  3654.             if (doorID == 0) then -- ->Dining Room
  3655.                 setDoorByID(lines[257])
  3656.             end
  3657.  
  3658.             if (doorID == 1) then -- ->Art Room
  3659.                 setDoorByID(lines[258])
  3660.             end
  3661.  
  3662.             if (doorID == 2) then -- ->Dining Room 2F
  3663.                 setDoorByID(lines[259])
  3664.             end
  3665.  
  3666.             if (doorID == 3) then -- ->C Corridor
  3667.                 setDoorByID(lines[260])
  3668.             end
  3669.  
  3670.             if (doorID == 4) then -- ->Outside Patio
  3671.                 setDoorByID(lines[261])
  3672.             end
  3673.  
  3674.             if (doorID == 5) then -- ->Large Art Room
  3675.                 setDoorByID(lines[262])
  3676.             end
  3677.  
  3678.             if (doorID == 6) then -- ->Outside Balcony
  3679.                 setDoorByID(lines[263])
  3680.             end
  3681.  
  3682.             if (doorID == 7) then -- ->Stairway Passage
  3683.                 setDoorByID(lines[264])
  3684.             end
  3685.  
  3686.             if (doorID == 8) then -- ->Graveyard / Crypt
  3687.                 setDoorByID(lines[265])
  3688.             end
  3689.  
  3690.           end
  3691.  
  3692.           if (room == 7) then --art room
  3693.  
  3694.             if (doorID == 0) then -- ->Main Hall
  3695.                 setDoorByID(lines[266])
  3696.             end
  3697.  
  3698.             if (doorID == 1) then -- ->L Corridor
  3699.                 setDoorByID(lines[267])
  3700.             end
  3701.  
  3702.             if (doorID == 2) then -- ->Hidden Wardrobe
  3703.                 setDoorByID(lines[268])
  3704.             end
  3705.  
  3706.           end
  3707.  
  3708.           if (room == 8) then --L Corridor
  3709.  
  3710.             if (doorID == 0) then -- ->Art Room
  3711.                 setDoorByID(lines[269])
  3712.             end
  3713.  
  3714.             if (doorID == 1) then -- ->Winding Corridor
  3715.                 setDoorByID(lines[270])
  3716.             end
  3717.  
  3718.           end
  3719.  
  3720.           if (room == 9) then --winding corridor / bathroom
  3721.  
  3722.             if (doorID == 0) then -- ->Dark Corridor
  3723.                 setDoorByID(lines[271])
  3724.             end
  3725.  
  3726.             if (doorID == 1) then -- ->Winding Corridor
  3727.                 setDoorByID(lines[272])
  3728.             end
  3729.  
  3730.             if (doorID == 2) then -- ->L Corridor
  3731.                 setDoorByID(lines[273])
  3732.             end
  3733.  
  3734.             if (doorID == 3) then -- ->Bathroom
  3735.                 setDoorByID(lines[274])
  3736.             end
  3737.  
  3738.             if (doorID == 4) then -- ->Marble Room
  3739.                 setDoorByID(lines[275])
  3740.             end
  3741.  
  3742.             if (doorID == 5) then -- ->Outside Boiler
  3743.                 setDoorByID(lines[276])
  3744.             end
  3745.  
  3746.           end
  3747.  
  3748.           if (room == 10) then --dark corridor
  3749.  
  3750.             if (doorID == 0) then -- ->Large Gallery
  3751.                 setDoorByID(lines[277])
  3752.             end
  3753.  
  3754.             if (doorID == 1) then -- ->Courtyard Study
  3755.                 setDoorByID(lines[278])
  3756.             end
  3757.  
  3758.             if (doorID == 2) then -- ->East Wing Stairway
  3759.                 setDoorByID(lines[279])
  3760.             end
  3761.  
  3762.             if (doorID == 3) then -- ->Winding Corridor
  3763.                 setDoorByID(lines[280])
  3764.             end
  3765.  
  3766.             if (doorID == 4) then -- ->Roofed Passage
  3767.                 setDoorByID(lines[281])
  3768.             end
  3769.  
  3770.           end
  3771.  
  3772.           if (room == 11) then --graveyard/crypt
  3773.  
  3774.             if (doorID == 0) then -- ->Main Hall
  3775.                 setDoorByID(lines[282])
  3776.             end
  3777.  
  3778.             if (doorID == 1) then -- ->Large Gallery
  3779.                 setDoorByID(lines[283])
  3780.             end
  3781.  
  3782.           end
  3783.  
  3784.           if (room == 12) then --greenhouse
  3785.             setDoorByID(lines[284]) -- -> Northern Corridor / Tea Room
  3786.           end
  3787.  
  3788.           if (room == 13) then --tiger statue room
  3789.             setDoorByID(lines[285]) -- -> Northern Corridor / Tea Room
  3790.           end
  3791.  
  3792.           if (room == 14) then --researcher's bedroom
  3793.  
  3794.             if (doorID == 1) then -- ->Northern Corridor / Tea Room
  3795.                 setDoorByID(lines[286])
  3796.             end
  3797.  
  3798.           end
  3799.  
  3800.           if (room == 15) then --bar
  3801.             setDoorByID(lines[287]) -- -> Northern Corridor / Tea Room
  3802.           end
  3803.  
  3804.           if (room == 17) then --Large Art Room / Mirror Room
  3805.  
  3806.             if (doorID == 1) then -- ->Main Hall
  3807.                 setDoorByID(lines[288])
  3808.             end
  3809.  
  3810.             if (doorID == 2) then -- ->Large Art Room / Mirror Room
  3811.                 setDoorByID(lines[289])
  3812.             end
  3813.  
  3814.             if (doorID == 3) then -- ->Large Art Room / Mirror Room
  3815.                 setDoorByID(lines[290])
  3816.             end
  3817.  
  3818.           end
  3819.  
  3820.           if (room == 18) then --west wing outer stairway
  3821.  
  3822.             if (doorID == 0) then -- ->Northern Corridor / Tea Room
  3823.                 setDoorByID(lines[291])
  3824.             end
  3825.  
  3826.             if (doorID == 1) then -- ->Mirror Corridor
  3827.                 setDoorByID(lines[292])
  3828.             end
  3829.  
  3830.           end
  3831.  
  3832.           if (room == 20) then --outside boiler
  3833.             setDoorByID(lines[293]) -- ->Winding Corridor
  3834.           end
  3835.  
  3836.           if (room == 21) then --marble room
  3837.          
  3838.             if (doorID == 0) then -- ->Winding Corridor
  3839.                 setDoorByID(lines[294])
  3840.             end
  3841.  
  3842.             if (doorID == 1) then -- ->Living Room
  3843.                 setDoorByID(lines[295])
  3844.             end
  3845.  
  3846.           end
  3847.  
  3848.           if (room == 22) then --living room
  3849.             setDoorByID(lines[296]) -- ->Marble Room
  3850.           end
  3851.  
  3852.           if (room == 23) then --large gallery
  3853.          
  3854.             if (doorID == 0) then -- ->Dark Corridor
  3855.                 setDoorByID(lines[297])
  3856.             end
  3857.  
  3858.             if (doorID == 1) then -- ->Graveyard / Crypt
  3859.                 setDoorByID(lines[298])
  3860.             end
  3861.  
  3862.           end
  3863.  
  3864.           if (room == 24) then --east wing storeroom
  3865.  
  3866.             if (doorID == 1) then -- ->East Wing Stairway
  3867.                 setDoorByID(lines[299])
  3868.             end
  3869.  
  3870.           end
  3871.  
  3872.           if (room == 25) then --courtyard study
  3873.             setDoorByID(lines[300]) -- ->Dark Corridor
  3874.           end
  3875.  
  3876.           if (room == 26) then --roofed passage
  3877.          
  3878.             if (doorID == 0) then -- ->Dark Corridor
  3879.                 setDoorByID(lines[301])
  3880.             end
  3881.  
  3882.             if (doorID == 1) then -- ->Garden Shed
  3883.                 setDoorByID(lines[302])
  3884.             end
  3885.  
  3886.           end
  3887.  
  3888.           if (room == 27) then --garden shed
  3889.  
  3890.             if (doorID == 0) then -- ->Roofed Passage
  3891.                 setDoorByID(lines[303])
  3892.             end
  3893.  
  3894.             if (doorID == 1) then -- ->Muddy Path
  3895.                 setDoorByID(lines[304])
  3896.             end
  3897.  
  3898.             if (doorID == 2) then -- ->Main Garden
  3899.                 setDoorByID(lines[305])
  3900.             end
  3901.  
  3902.           end
  3903.  
  3904.           if (room == 28) then --hidden wardrobe
  3905.             setDoorByID(lines[306])
  3906.           end
  3907.  
  3908.         end
  3909.  
  3910.         if (stage == 2) then
  3911.  
  3912.             if (room == 0) then --kitchen elevator
  3913.  
  3914.                 if (doorID == 0) then -- ->Kitchen
  3915.                     setDoorByID(lines[307])
  3916.                 end
  3917.  
  3918.                 if (doorID == 1) then -- ->Elevator Corridor
  3919.                     setDoorByID(lines[308])
  3920.                 end
  3921.  
  3922.             end
  3923.  
  3924.             if (room == 2) then --dining room 2f
  3925.  
  3926.                 if (doorID == 0) then -- ->Main Hall
  3927.                     setDoorByID(lines[309])
  3928.                 end
  3929.  
  3930.                 if (doorID == 1) then -- ->West Wing Inner Stairway
  3931.                     setDoorByID(lines[310])
  3932.                 end
  3933.  
  3934.                 if (doorID == 2) then -- ->Mirror Corridor
  3935.                     setDoorByID(lines[311])
  3936.                 end
  3937.  
  3938.             end
  3939.  
  3940.             if (room == 3) then --outside balcony
  3941.  
  3942.                 if (doorID == 0) then -- ->West Wing Inner Stairway
  3943.                     setDoorByID(lines[312])
  3944.                 end
  3945.  
  3946.                 if (doorID == 1) then -- ->Main Hall
  3947.                     setDoorByID(lines[313])
  3948.                 end
  3949.  
  3950.             end
  3951.  
  3952.             if (room == 4) then --c corridor
  3953.  
  3954.                 if (doorID == 0) then -- ->Pillar Room
  3955.                     setDoorByID(lines[314])
  3956.                 end
  3957.  
  3958.                 if (doorID == 1) then -- ->East Wing Stairway
  3959.                     setDoorByID(lines[315])
  3960.                 end
  3961.  
  3962.                 if (doorID == 2) then -- ->Small Library
  3963.                     setDoorByID(lines[316])
  3964.                 end
  3965.  
  3966.                 if (doorID == 3) then -- ->Main Hall
  3967.                     setDoorByID(lines[317])
  3968.                 end
  3969.  
  3970.                 if (doorID == 4) then -- ->Armor Room
  3971.                     setDoorByID(lines[318])
  3972.                 end
  3973.  
  3974.             end
  3975.  
  3976.             if (room == 5) then --armor room
  3977.                 setDoorByID(lines[319])
  3978.             end
  3979.  
  3980.             if (room == 6) then --small library
  3981.  
  3982.                 if (doorID == 0) then -- ->C Corridor
  3983.                     setDoorByID(lines[320])
  3984.                 end
  3985.  
  3986.                 if (doorID == 1) then -- ->East Wing Stairway
  3987.                     setDoorByID(lines[321])
  3988.                 end
  3989.  
  3990.             end
  3991.  
  3992.             if (room == 7) then --east wing stairway
  3993.  
  3994.                 if (doorID == 0) then -- ->Deer Room
  3995.                     setDoorByID(lines[322])
  3996.                 end
  3997.  
  3998.                 if (doorID == 1) then -- ->Resting Room
  3999.                     setDoorByID(lines[323])
  4000.                 end
  4001.  
  4002.                 if (doorID == 2) then -- ->East Wing Storeroom
  4003.                     setDoorByID(lines[324])
  4004.                 end
  4005.  
  4006.                 if (doorID == 3) then -- ->C Corridor
  4007.                     setDoorByID(lines[325])
  4008.                 end
  4009.  
  4010.                 if (doorID == 6) then -- ->Dark Corridor
  4011.                     setDoorByID(lines[326])
  4012.                 end
  4013.  
  4014.             end
  4015.  
  4016.             if (room == 8) then --deer room
  4017.  
  4018.                 if (doorID == 0) then -- ->East Wing Stairway
  4019.                     setDoorByID(lines[327])
  4020.                 end
  4021.  
  4022.                 if (doorID == 1) then -- ->Bedroom
  4023.                     setDoorByID(lines[328])
  4024.                 end
  4025.  
  4026.                 if (doorID == 2) then -- ->Fish Tank Room
  4027.                     setDoorByID(lines[329])
  4028.                 end
  4029.  
  4030.             end
  4031.  
  4032.             if (room == 9) then --bedroom
  4033.                 setDoorByID(lines[330])
  4034.             end
  4035.  
  4036.             if (room == 10) then --fish tank room
  4037.                 setDoorByID(lines[346])
  4038.             end
  4039.  
  4040.             if (room == 11) then --resting room
  4041.  
  4042.                 if (doorID == 0) then -- ->East Wing Stairway
  4043.                     setDoorByID(lines[347])
  4044.                 end
  4045.  
  4046.                 if (doorID == 1) then -- ->Sliding Trap Room / Secret Passage
  4047.                     setDoorByID(lines[348])
  4048.                 end
  4049.  
  4050.             end
  4051.  
  4052.             if (room == 12) then --sliding trap room
  4053.  
  4054.                 if (doorID == 1) then -- ->Concrete Passage 1
  4055.                     setDoorByID(lines[349])
  4056.                 end
  4057.  
  4058.                 if (doorID == 2) then -- ->Resting Room
  4059.                     setDoorByID(lines[350])
  4060.                 end
  4061.  
  4062.             end
  4063.  
  4064.             if (room == 13) then --pillar room
  4065.  
  4066.                 if (doorID == 0) then -- ->C Corridor
  4067.                     setDoorByID(lines[351])
  4068.                 end
  4069.  
  4070.                 if (doorID == 1) then -- ->Attic Entry
  4071.                     setDoorByID(lines[352])
  4072.                 end
  4073.  
  4074.             end
  4075.  
  4076.             if (room == 14) then --attic entry
  4077.  
  4078.                 if (doorID == 0) then -- ->Pillar Room
  4079.                     setDoorByID(lines[353])
  4080.                 end
  4081.  
  4082.                 if (doorID == 1) then -- ->Attic
  4083.                     setDoorByID(lines[354])
  4084.                 end
  4085.  
  4086.                 if (doorID == 2) then -- ->Small Dining Room
  4087.                     setDoorByID(lines[355])
  4088.                 end
  4089.  
  4090.             end
  4091.  
  4092.             if (room == 15) then --small dining room
  4093.                 setDoorByID(lines[356]) -- -> Attic Entry
  4094.             end
  4095.  
  4096.             if (room == 16) then --attic
  4097.                 setDoorByID(lines[331])
  4098.             end
  4099.  
  4100.             if (room == 18) then --outside patio
  4101.                 setDoorByID(lines[332]) -- ->Main Hall
  4102.             end
  4103.  
  4104.             if (room == 19) then --elevator corridor
  4105.  
  4106.                 if (doorID == 1) then -- ->Mirror Corridor
  4107.                     setDoorByID(lines[333])
  4108.                 end
  4109.  
  4110.                 if (doorID == 3) then -- ->Materials Room
  4111.                     setDoorByID(lines[334])
  4112.                 end
  4113.  
  4114.                 if (doorID == 4) then -- ->Kitchen Elevator
  4115.                     setDoorByID(lines[335])
  4116.                 end
  4117.  
  4118.             end
  4119.  
  4120.             if (room == 20) then --mirror corridor
  4121.  
  4122.                 if (doorID == 0) then -- ->Elevator Corridor
  4123.                     setDoorByID(lines[336])
  4124.                 end
  4125.  
  4126.                 if (doorID == 1) then -- ->West Wing Inner Stairway
  4127.                     setDoorByID(lines[337])
  4128.                 end
  4129.  
  4130.                 if (doorID == 2) then -- ->Dining Room 2F
  4131.                     setDoorByID(lines[338])
  4132.                 end
  4133.  
  4134.                 if (doorID == 3) then -- ->West Wing Outer Stairway
  4135.                     setDoorByID(lines[339])
  4136.                 end
  4137.  
  4138.                 if (doorID == 4) then -- ->Death Passage
  4139.                     setDoorByID(lines[340])
  4140.                 end
  4141.  
  4142.             end
  4143.  
  4144.             if (room == 21) then --trophy room
  4145.                 setDoorByID(lines[341])
  4146.             end
  4147.  
  4148.             if (room == 22) then --Library
  4149.  
  4150.                 if (doorID == 1) then -- ->Death Passage
  4151.                     setDoorByID(lines[342])
  4152.                 end
  4153.  
  4154.             end
  4155.  
  4156.             if (room == 23) then --Death Passage
  4157.  
  4158.                 if (doorID == 0) then -- ->Mirror Corridor
  4159.                     setDoorByID(lines[343])
  4160.                 end
  4161.  
  4162.                 if (doorID == 1) then -- ->Library
  4163.                     setDoorByID(lines[344])
  4164.                 end
  4165.  
  4166.             end
  4167.  
  4168.             if (room == 25) then --materials room
  4169.                 setDoorByID(lines[345])
  4170.             end
  4171.  
  4172.             if (room == 26) then --Concrete Passage 1
  4173.  
  4174.                 if (doorID == 0) then -- ->Mirror Corridor
  4175.                     setDoorByID(lines[357])
  4176.                 end
  4177.  
  4178.                 if (doorID == 1) then -- ->Library
  4179.                     setDoorByID(lines[358])
  4180.                 end
  4181.  
  4182.             end
  4183.  
  4184.             if (room == 27) then --Concrete Passage 2
  4185.  
  4186.                 if (doorID == 1) then -- ->Kitchen
  4187.                     setDoorByID(lines[359])
  4188.                 end
  4189.  
  4190.                 if (doorID == 2) then -- ->Concrete Passage 1
  4191.                     setDoorByID(lines[360])
  4192.                 end
  4193.  
  4194.             end
  4195.  
  4196.             if (room == 28) then --Kitchen
  4197.  
  4198.                 if (doorID == 0) then -- ->Tea Room
  4199.                     setDoorByID(lines[361])
  4200.                 end
  4201.  
  4202.                 if (doorID == 1) then -- ->Concrete Passage 2
  4203.                     setDoorByID(lines[362])
  4204.                 end
  4205.  
  4206.                 if (doorID == 2) then -- ->Kitchen Elevator
  4207.                     setDoorByID(lines[363])
  4208.                 end
  4209.  
  4210.             end
  4211.  
  4212.         end
  4213.  
  4214.         if (stage == 3) then
  4215.  
  4216.             if (room == 0) then --Main Garden
  4217.  
  4218.                 if (doorID == 0) then -- ->Garden Shed
  4219.                     setDoorByID(lines[364])
  4220.                 end
  4221.  
  4222.                 if (doorID == 1) then -- ->Water Pool
  4223.                     setDoorByID(lines[365])
  4224.                 end
  4225.  
  4226.                 if (doorID == 2) then -- ->Falls Area
  4227.                     setDoorByID(lines[366])
  4228.                 end
  4229.  
  4230.             end
  4231.  
  4232.             if (room == 1) then --Water Pool
  4233.  
  4234.                 if (doorID == 0) then -- ->Main Garden
  4235.                     setDoorByID(lines[367])
  4236.                 end
  4237.  
  4238.                 if (doorID == 1) then -- ->Falls Area
  4239.                     setDoorByID(lines[368])
  4240.                 end
  4241.  
  4242.             end
  4243.  
  4244.             if (room == 2) then --Falls Area
  4245.  
  4246.                 if (doorID == 0) then -- ->Zig Zag Path
  4247.                     setDoorByID(lines[369])
  4248.                 end
  4249.  
  4250.                 if (doorID == 1) then -- ->Main Garden
  4251.                     setDoorByID(lines[370])
  4252.                 end
  4253.  
  4254.                 if (doorID == 2) then -- ->Water Pool
  4255.                     setDoorByID(lines[371])
  4256.                 end
  4257.  
  4258.                 if (doorID == 3) then -- ->Entrance Passage
  4259.                     setDoorByID(lines[372])
  4260.                 end
  4261.  
  4262.             end
  4263.  
  4264.             if (room == 4) then --Zig Zag Path
  4265.  
  4266.                 if (doorID == 0) then -- ->Falls Area
  4267.                     setDoorByID(lines[373])
  4268.                 end
  4269.  
  4270.                 if (doorID == 1) then -- ->Entry Corridor
  4271.                     setDoorByID(lines[374])
  4272.                 end
  4273.  
  4274.             end
  4275.  
  4276.             if (room == 5) then --Fountain
  4277.  
  4278.                 if (doorID == 0) then -- ->Jessica's Tomb
  4279.                     setDoorByID(lines[375])
  4280.                 end
  4281.  
  4282.                 if (doorID == 1) then -- ->Laboratory Entrance
  4283.                     setDoorByID(lines[376])
  4284.                 end
  4285.  
  4286.             end
  4287.  
  4288.             if (room == 6) then --Underground Statue Room
  4289.                 setDoorByID(lines[377])
  4290.             end
  4291.  
  4292.             if (room == 7) then --Entrance Passage
  4293.  
  4294.                 if (doorID == 0) then -- ->Forked Passage
  4295.                     setDoorByID(lines[378])
  4296.                 end
  4297.  
  4298.                 if (doorID == 1) then -- ->Falls Area
  4299.                     setDoorByID(lines[379])
  4300.                 end
  4301.  
  4302.                 if (doorID == 2) then -- ->Boulder Passage 1
  4303.                     setDoorByID(lines[380])
  4304.                 end
  4305.  
  4306.             end
  4307.  
  4308.             if (room == 8) then --Forked Passage
  4309.  
  4310.                 if (doorID == 0) then -- ->Entrance Passage
  4311.                     setDoorByID(lines[381])
  4312.                 end
  4313.  
  4314.                 if (doorID == 1) then -- ->Generator Room
  4315.                     setDoorByID(lines[382])
  4316.                 end
  4317.  
  4318.             end
  4319.  
  4320.             if (room == 9) then --Generator Room
  4321.  
  4322.                 if (doorID == 0) then -- ->Enrico Room
  4323.                     setDoorByID(lines[383])
  4324.                 end
  4325.  
  4326.                 if (doorID == 1) then -- ->Garbage Compactor Room
  4327.                     setDoorByID(lines[384])
  4328.                 end
  4329.  
  4330.                 if (doorID == 2) then -- ->Forked Passage
  4331.                     setDoorByID(lines[385])
  4332.                 end          
  4333.  
  4334.             end
  4335.  
  4336.             if (room == 10) then --Enrico Room
  4337.                 setDoorByID(lines[404])
  4338.             end
  4339.  
  4340.             if (room == 11) then --Boulder Passage 1
  4341.  
  4342.                 if (doorID == 0) then -- ->Spider Room
  4343.                     setDoorByID(lines[405])
  4344.                 end
  4345.  
  4346.                 if (doorID == 1) then -- ->Entrance Passage
  4347.                     setDoorByID(lines[406])
  4348.                 end
  4349.  
  4350.             end
  4351.  
  4352.             if (room == 12) then --Spider Room
  4353.  
  4354.                 if (doorID == 0) then -- ->Boulder Passage 1
  4355.                     setDoorByID(lines[407])
  4356.                 end
  4357.  
  4358.                 if (doorID == 1) then -- ->Straight Passage
  4359.                     setDoorByID(lines[408])
  4360.                 end
  4361.  
  4362.             end
  4363.  
  4364.             if (room == 13) then --Straight Passage
  4365.  
  4366.                 if (doorID == 0) then -- ->Spider Room
  4367.                     setDoorByID(lines[409])
  4368.                 end
  4369.  
  4370.                 if (doorID == 1) then -- ->Boulder Passage 2
  4371.                     setDoorByID(lines[410])
  4372.                 end
  4373.  
  4374.             end
  4375.  
  4376.             if (room == 15) then --Boulder Passage 2
  4377.  
  4378.                 if (doorID == 0) then -- ->Straight Passage
  4379.                     setDoorByID(lines[411])
  4380.                 end
  4381.  
  4382.                 if (doorID == 1) then -- ->Underground Statue Room
  4383.                     setDoorByID(lines[412])
  4384.                 end
  4385.  
  4386.             end
  4387.  
  4388.             if (room == 17) then --Muddy Path
  4389.  
  4390.                 if (doorID == 0) then -- ->Entrance Passage
  4391.                     setDoorByID(lines[386])
  4392.                 end
  4393.  
  4394.                 if (doorID == 1) then -- ->Small Headstone Area
  4395.                     setDoorByID(lines[387])
  4396.                 end
  4397.  
  4398.             end
  4399.  
  4400.             if (room == 18) then --Small Headstone Area
  4401.  
  4402.                 if (doorID == 0) then -- ->Forest Pathway
  4403.                     setDoorByID(lines[388])
  4404.                 end
  4405.  
  4406.                 if (doorID == 1) then -- ->Muddy Path
  4407.                     setDoorByID(lines[389])
  4408.                 end
  4409.  
  4410.             end
  4411.  
  4412.             if (room == 19) then --Forest Pathway
  4413.  
  4414.                 if (doorID == 0) then -- ->Cabin
  4415.                     setDoorByID(lines[390])
  4416.                 end
  4417.  
  4418.                 if (doorID == 1) then -- ->Small Headstone Area
  4419.                     setDoorByID(lines[391])
  4420.                 end
  4421.  
  4422.             end
  4423.  
  4424.             if (room == 20) then --Cabin
  4425.  
  4426.                 if (doorID == 0) then -- ->Forest Path
  4427.                     setDoorByID(lines[392])
  4428.                 end
  4429.  
  4430.                 if (doorID == 1) then -- ->Lisa's Room
  4431.                     setDoorByID(lines[393])
  4432.                 end
  4433.  
  4434.             end
  4435.  
  4436.             if (room == 21) then --Jessica's Tomb
  4437.  
  4438.                 if (doorID == 0) then -- ->Stairway Passage
  4439.                     setDoorByID(lines[394])
  4440.                 end
  4441.  
  4442.                 if (doorID == 1) then -- ->Fountain
  4443.                     setDoorByID(lines[395])
  4444.                 end
  4445.  
  4446.             end
  4447.  
  4448.             if (room == 22) then --Garbage Compactor Room
  4449.  
  4450.                 if (doorID == 0) then -- ->Winding Underground Passage
  4451.                     setDoorByID(lines[396])
  4452.                 end
  4453.  
  4454.                 if (doorID == 1) then -- ->Generator Room
  4455.                     setDoorByID(lines[397])
  4456.                 end
  4457.  
  4458.             end
  4459.  
  4460.             if (room == 23) then --Winding Underground Passage
  4461.  
  4462.                 if (doorID == 0) then -- ->Garbage Compactor Room
  4463.                     setDoorByID(lines[398])
  4464.                 end
  4465.  
  4466.                 if (doorID == 1) then -- ->Lisa's Room
  4467.                     setDoorByID(lines[399])
  4468.                 end
  4469.  
  4470.                 if (doorID == 2) then -- ->Underground Storage
  4471.                     setDoorByID(lines[400])
  4472.                 end
  4473.  
  4474.             end
  4475.  
  4476.             if (room == 24) then --Underground Storage Room
  4477.                 setDoorByID(lines[401])
  4478.             end
  4479.  
  4480.             if (room == 25) then --Lisa's Room
  4481.  
  4482.                 if (doorID == 0) then -- ->Winding Underground Passage
  4483.                     setDoorByID(lines[402])
  4484.                 end
  4485.  
  4486.                 if (doorID == 1) then -- ->Cabin
  4487.                     setDoorByID(lines[403])
  4488.                 end
  4489.  
  4490.             end
  4491.  
  4492.             if (room == 26) then --Stairway Passage
  4493.  
  4494.                 if (doorID == 0) then -- ->Jessica's Tomb
  4495.                     setDoorByID(lines[413])
  4496.                 end
  4497.  
  4498.                 if (doorID == 1) then -- ->Main Hall
  4499.                     setDoorByID(lines[414])
  4500.                 end
  4501.  
  4502.             end
  4503.  
  4504.         end
  4505.  
  4506.         if (stage == 4) then
  4507.  
  4508.             if (room == 0) then --Entry Corridor
  4509.  
  4510.                 if (doorID == 0) then -- ->Zig Zag Path
  4511.                     setDoorByID(lines[415])
  4512.                 end
  4513.  
  4514.                 if (doorID == 1) then -- ->Room 001
  4515.                     setDoorByID(lines[416])
  4516.                 end
  4517.  
  4518.                 if (doorID == 2) then -- ->Central Corridor
  4519.                     setDoorByID(lines[417])
  4520.                 end
  4521.  
  4522.                 if (doorID == 3) then -- ->Rec Room
  4523.                     setDoorByID(lines[418])
  4524.                 end
  4525.  
  4526.                 if (doorID == 4) then -- ->Residence Storeroom
  4527.                     setDoorByID(lines[419])
  4528.                 end
  4529.  
  4530.             end
  4531.  
  4532.             if (room == 1) then --Room 001
  4533.  
  4534.                 if (doorID == 1) then -- ->Entry Corridor
  4535.                     setDoorByID(lines[420])
  4536.                 end
  4537.  
  4538.                 if (doorID == 2) then -- ->Room 001 Bathroom
  4539.                     setDoorByID(lines[421])
  4540.                 end
  4541.  
  4542.             end
  4543.  
  4544.             if (room == 2) then --Room 001 Bathroom
  4545.                 setDoorByID(lines[422]) -- -> Entry Corridor
  4546.             end
  4547.  
  4548.             if (room == 3) then --residence storeroom
  4549.                 setDoorByID(lines[423]) -- -> Entry Corridor
  4550.             end
  4551.  
  4552.             if (room == 4) then --Rec Room
  4553.                 setDoorByID(lines[424]) -- -> Entry Corridor
  4554.             end
  4555.  
  4556.             if (room == 5) then --Central Corridor
  4557.  
  4558.                 if (doorID == 0) then -- ->Entry Corridor
  4559.                     setDoorByID(lines[425])
  4560.                 end
  4561.  
  4562.                 if (doorID == 1) then -- ->Gallery
  4563.                     setDoorByID(lines[426])
  4564.                 end
  4565.  
  4566.                 if (doorID == 2) then -- ->Room 002
  4567.                     setDoorByID(lines[427])
  4568.                 end
  4569.  
  4570.             end
  4571.  
  4572.             if (room == 6) then --Room 002
  4573.  
  4574.                 if (doorID == 0) then -- ->Central Corridor
  4575.                     setDoorByID(lines[428])
  4576.                 end
  4577.  
  4578.                 if (doorID == 1) then -- ->Aqua Ring Entry
  4579.                     setDoorByID(lines[429])
  4580.                 end
  4581.  
  4582.                 if (doorID == 2) then -- ->Room 002 Bathroom
  4583.                     setDoorByID(lines[430])
  4584.                 end
  4585.  
  4586.             end
  4587.  
  4588.             if (room == 7) then --Room 002 Bathroom
  4589.                 setDoorByID(lines[431])
  4590.             end
  4591.  
  4592.             if (room == 8) then --Gallery
  4593.  
  4594.                 if (doorID == 0) then -- ->Central Corridor
  4595.                     setDoorByID(lines[432])
  4596.                 end
  4597.  
  4598.                 if (doorID == 1) then -- ->Residence Medical Room
  4599.                     setDoorByID(lines[433])
  4600.                 end
  4601.  
  4602.                 if (doorID == 2) then -- ->Room 003
  4603.                     setDoorByID(lines[434])
  4604.                 end
  4605.  
  4606.                 if (doorID == 3) then -- ->Plant 42 Room
  4607.                     setDoorByID(lines[435])
  4608.                 end
  4609.  
  4610.             end
  4611.  
  4612.             if (room == 9) then --Residence Medical Room
  4613.                 setDoorByID(lines[436]) -- ->Gallery
  4614.             end
  4615.  
  4616.             if (room == 10) then --Room 003
  4617.  
  4618.                 if (doorID == 1) then -- ->Gallery
  4619.                     setDoorByID(lines[443])
  4620.                 end
  4621.  
  4622.                 if (doorID == 2) then -- ->Room 003 Bathroom
  4623.                     setDoorByID(lines[444])
  4624.                 end
  4625.  
  4626.                 if (doorID == 3) then -- ->Plant 42 Room
  4627.                     setDoorByID(lines[445])
  4628.                 end
  4629.  
  4630.             end
  4631.  
  4632.             if (room == 11) then --Room 003 Bathroom
  4633.                 setDoorByID(lines[446])
  4634.             end
  4635.  
  4636.             if (room == 12) then --Plant 42 Room
  4637.  
  4638.                 if (doorID == 0) then -- ->Gallery
  4639.                     setDoorByID(lines[447])
  4640.                 end
  4641.  
  4642.                 if (doorID == 1) then -- ->Room 003
  4643.                     setDoorByID(lines[448])
  4644.                 end
  4645.  
  4646.             end
  4647.  
  4648.             if (room == 13) then --Aqua Ring Entry
  4649.  
  4650.                 if (doorID == 0) then -- ->Aqua Ring Walkway
  4651.                     setDoorByID(lines[449])
  4652.                 end
  4653.  
  4654.                 if (doorID == 1) then -- ->Room 002
  4655.                     setDoorByID(lines[450])
  4656.                 end
  4657.  
  4658.                 if (doorID == 2) then -- ->Aqua Ring Storage
  4659.                     setDoorByID(lines[451])
  4660.                 end
  4661.  
  4662.             end
  4663.  
  4664.             if (room == 14) then --Aqua Ring Walkway
  4665.  
  4666.                 if (doorID == 0) then -- ->Aqua Ring Entry
  4667.                     setDoorByID(lines[452])
  4668.                 end
  4669.  
  4670.                 if (doorID == 1) then -- ->Control Room
  4671.                     setDoorByID(lines[453])
  4672.                 end
  4673.  
  4674.                 if (doorID == 2) then -- ->Guard Room
  4675.                     setDoorByID(lines[454])
  4676.                 end
  4677.  
  4678.             end
  4679.  
  4680.             if (room == 15) then --Guard Room
  4681.                 setDoorByID(lines[455]) -- ->Aqua Ring Walkway
  4682.             end
  4683.  
  4684.             if (room == 16) then --Aqua Ring Storage
  4685.  
  4686.                 if (doorID == 0) then -- ->Aqua Ring Water Tank
  4687.                     setDoorByID(lines[437])
  4688.                 end
  4689.  
  4690.                 if (doorID == 1) then -- ->Control Room
  4691.                     setDoorByID(lines[438])
  4692.                 end
  4693.  
  4694.                 if (doorID == 2) then -- ->Aqua Ring Entry
  4695.                     setDoorByID(lines[439])
  4696.                 end
  4697.  
  4698.             end
  4699.  
  4700.             if (room == 17) then --Control Room
  4701.  
  4702.                 if (doorID == 0) then -- ->Aqua Ring Storage
  4703.                     setDoorByID(lines[440])
  4704.                 end
  4705.  
  4706.                 if (doorID == 1) then -- ->Aqua Ring Walkway
  4707.                     setDoorByID(lines[441])
  4708.                 end
  4709.  
  4710.             end
  4711.  
  4712.             if (room == 18) then --Aqua Ring Water Tank
  4713.                 setDoorByID(lines[442]) -- ->Aqua Ring Storage
  4714.             end
  4715.  
  4716.         end
  4717.  
  4718.         if (stage == 5) then
  4719.  
  4720.             if (room == 0) then --Laboratory Entrance
  4721.  
  4722.                 if (doorID == 1) then -- ->Item Box Room
  4723.                     setDoorByID(lines[469])
  4724.                 end
  4725.  
  4726.                 if (doorID == 2) then -- ->Fountain
  4727.                     setDoorByID(lines[470])
  4728.                 end
  4729.  
  4730.                 if (doorID == 3) then -- ->Passage to Heliport
  4731.                     setDoorByID(lines[468])
  4732.                 end
  4733.  
  4734.             end
  4735.  
  4736.             if (room == 1) then --Passage To Heliport
  4737.  
  4738.                 if (doorID == 0) then -- ->Laboratory Entrance
  4739.                     setDoorByID(lines[471])
  4740.                 end
  4741.  
  4742.                 if (doorID == 1) then -- ->Elevator To Helipad
  4743.                     setDoorByID(lines[472])
  4744.                 end
  4745.  
  4746.             end
  4747.  
  4748.             if (room == 2) then --Item Box Room
  4749.  
  4750.                 if (doorID == 1) then -- ->Laboratory Stairway
  4751.                     setDoorByID(lines[473])
  4752.                 end
  4753.  
  4754.                 if (doorID == 2) then -- ->Laboratory Entrance
  4755.                     setDoorByID(lines[474])
  4756.                 end
  4757.  
  4758.             end
  4759.  
  4760.             if (room == 3) then --Laboratory Stairway
  4761.  
  4762.                 if (doorID == 0) then -- ->Item Box Room
  4763.                     setDoorByID(lines[475])
  4764.                 end
  4765.  
  4766.                 if (doorID == 1) then -- ->O Room
  4767.                     setDoorByID(lines[476])
  4768.                 end
  4769.  
  4770.                 if (doorID == 2) then -- ->Visual Data Room
  4771.                     setDoorByID(lines[477])
  4772.                 end
  4773.  
  4774.             end
  4775.  
  4776.             if (room == 4) then --Visual Data Room
  4777.                 setDoorByID(lines[478]) -- ->Laboratory Stairway
  4778.             end
  4779.  
  4780.             if (room == 5) then --O Room
  4781.  
  4782.                 if (doorID == 0) then -- ->Laboratory Stairway
  4783.                     setDoorByID(lines[479])
  4784.                 end
  4785.  
  4786.                 if (doorID == 1) then -- ->Pass Code Corridor
  4787.                     setDoorByID(lines[480])
  4788.                 end
  4789.  
  4790.                 if (doorID == 2) then -- ->Elevator Entry
  4791.                     setDoorByID(lines[481])
  4792.                 end
  4793.  
  4794.                 if (doorID == 3) then -- ->Operating Room
  4795.                     setDoorByID(lines[482])
  4796.                 end
  4797.  
  4798.                 if (doorID == 4) then -- ->Morgue
  4799.                     setDoorByID(lines[483])
  4800.                 end
  4801.  
  4802.             end
  4803.  
  4804.             if (room == 6) then --Operating Room
  4805.                 setDoorByID(lines[484]) -- ->O Room
  4806.             end
  4807.  
  4808.             if (room == 7) then --morgue
  4809.  
  4810.                 if (doorID == 0) then -- ->O Room
  4811.                     setDoorByID(lines[485])
  4812.                 end
  4813.  
  4814.             end
  4815.  
  4816.             if (room == 8) then --Pass Code Corridor
  4817.  
  4818.                 if (doorID == 0) then -- ->O Room
  4819.                     setDoorByID(lines[486])
  4820.                 end
  4821.  
  4822.                 if (doorID == 1) then -- ->Cell Entrance
  4823.                     setDoorByID(lines[487])
  4824.                 end
  4825.  
  4826.                 if (doorID == 2) then -- ->X-Ray Room B
  4827.                     setDoorByID(lines[488])
  4828.                 end
  4829.  
  4830.                 if (doorID == 3) then -- ->X-Ray Room A
  4831.                     setDoorByID(lines[489])
  4832.                 end
  4833.  
  4834.             end
  4835.  
  4836.             if (room == 9) then --X-Ray Room A
  4837.                 setDoorByID(lines[490]) -- ->Pass Code Corridor
  4838.             end
  4839.  
  4840.             if (room == 10) then --xray room b
  4841.  
  4842.                 if (doorID == 1) then -- ->Aqua Ring Walkway
  4843.                     setDoorByID(lines[456])
  4844.                 end
  4845.  
  4846.             end
  4847.  
  4848.             if (room == 11) then --cell entrance
  4849.  
  4850.                 if (doorID == 0) then -- ->Pass Code Corridor
  4851.                     setDoorByID(lines[457])
  4852.                 end
  4853.  
  4854.                 if (doorID == 1) then -- ->Cell
  4855.                     setDoorByID(lines[458])
  4856.                 end
  4857.  
  4858.             end
  4859.  
  4860.             if (room == 12) then --elevator entry
  4861.  
  4862.                 if (doorID == 0) then -- ->O Room
  4863.                     setDoorByID(lines[459])
  4864.                 end
  4865.  
  4866.                 if (doorID == 1) then -- ->Power Maze A
  4867.                     setDoorByID(lines[460])
  4868.                 end
  4869.  
  4870.                 if (doorID == 2) then -- ->Laboratory Elevator
  4871.                     setDoorByID(lines[461])
  4872.                 end
  4873.  
  4874.                 if (doorID == 3) then -- ->Lab Lounge
  4875.                     setDoorByID(lines[462])
  4876.                 end
  4877.  
  4878.             end
  4879.  
  4880.             if (room == 13) then --elevator to helipad
  4881.  
  4882.                 if (doorID == 0) then -- ->Helipad
  4883.                     setDoorByID(lines[463])
  4884.                 end
  4885.  
  4886.                 if (doorID == 1) then -- ->Passage To Heliport
  4887.                     setDoorByID(lines[464])
  4888.                 end
  4889.  
  4890.             end
  4891.  
  4892.             if (room == 14) then --Laboratory Lounge Room
  4893.                 setDoorByID(lines[465]) -- ->Elevator Entry
  4894.             end
  4895.  
  4896.             if (room == 15) then --power maze A
  4897.  
  4898.                 if (doorID == 0) then -- ->Elevator Entry
  4899.                     setDoorByID(lines[466])
  4900.                 end
  4901.  
  4902.                 if (doorID == 1) then -- ->Power Maze B
  4903.                     setDoorByID(lines[467])
  4904.                 end
  4905.  
  4906.             end
  4907.  
  4908.             if (room == 16) then --power maze B
  4909.  
  4910.                 if (doorID == 0) then -- ->Power Maze A
  4911.                     setDoorByID(lines[491])
  4912.                 end
  4913.  
  4914.                 if (doorID == 1) then -- ->Power Control Room
  4915.                     setDoorByID(lines[492])
  4916.                 end
  4917.  
  4918.             end
  4919.  
  4920.             if (room == 17) then --Power Control Room
  4921.                 setDoorByID(lines[493]) -- ->Power Maze B
  4922.             end
  4923.  
  4924.             if (room == 18) then --Cell
  4925.                 setDoorByID(lines[494]) -- ->Cell Entrance
  4926.             end
  4927.  
  4928.             if (room == 19) then --Main Laboratory
  4929.                 setDoorByID(lines[495]) -- ->Main Laboratory Entrance
  4930.             end
  4931.  
  4932.             if (room == 20) then --Main Laboratory Entrance
  4933.  
  4934.                 if (doorID == 0) then -- ->Main Laboratory
  4935.                     setDoorByID(lines[496])
  4936.                 end
  4937.  
  4938.                 if (doorID == 1) then -- ->Laboratory Elevator
  4939.                     setDoorByID(lines[497])
  4940.                 end
  4941.  
  4942.             end
  4943.  
  4944.             if (room == 21) then -- Laboratory Elevator
  4945.  
  4946.                 if (doorID == 0) then -- ->Elevator Entry
  4947.                     setDoorByID(lines[498])
  4948.                 end
  4949.  
  4950.                 if (doorID == 1) then -- ->Main Laboratory Entrance
  4951.                     setDoorByID(lines[499])
  4952.                 end
  4953.  
  4954.             end
  4955.  
  4956.         end
  4957.  
  4958.         keytarget = EDX+0x43
  4959.         writeBytes(keytarget, 0x00);
  4960.  
  4961.     end
  4962.  
  4963.     if (lockrando == true) then
  4964.  
  4965.         pagetarget = EDX+0x44
  4966.  
  4967.         --print('stage:' .. stage)
  4968.         --print('room:' .. room)
  4969.         --print('door:' .. doorID)
  4970.         --print('page:' .. pagetarget)
  4971.  
  4972.         if (stage == 1) then
  4973.  
  4974.             if (room == 1) then --west wing inner stairway
  4975.  
  4976.                 if (doorID == 1) then -- ->small storeroom
  4977.                     setLockByID(lines[501], false)
  4978.                 end
  4979.  
  4980.                 if (doorID == 2) then -- ->northern corridor
  4981.                     setLockByID(lines[502], false)
  4982.                 end
  4983.  
  4984.                 if (doorID == 3) then -- ->dining room 2f
  4985.                     setLockByID(lines[503], false)
  4986.                     writeBytes(pagetarget, 0x1C);
  4987.                 end
  4988.  
  4989.                 if (doorID == 4) then -- ->outside balcony
  4990.                     setLockByID(lines[504], false)
  4991.                 end
  4992.  
  4993.                 if (doorID == 5) then -- ->mirror corridor
  4994.                     setLockByID(lines[505], false)
  4995.                 end
  4996.  
  4997.                 if (doorID == 6) then -- ->trophy room
  4998.                     setLockByID(lines[506], false)
  4999.                 end
  5000.  
  5001.             end
  5002.  
  5003.             if (room == 3) then --northern corridor / tea room
  5004.  
  5005.                 if (doorID == 1) then -- ->tea room, swapping with northern corridor
  5006.                     setLockByID(lines[507], false)
  5007.                 end
  5008.  
  5009.                 if (doorID == 2) then -- ->northern corridor, swappign with tea room
  5010.                     setLockByID(lines[507], true)
  5011.                 end
  5012.  
  5013.                 if (doorID == 3) then -- ->west wing inner stairway
  5014.                     setLockByID(lines[502], true)
  5015.                     writeBytes(pagetarget, 0x22);
  5016.                 end
  5017.  
  5018.                 if (doorID == 6) then -- ->bar
  5019.                     setLockByID(lines[508], false)
  5020.                 end
  5021.  
  5022.                 if (doorID == 7) then -- ->kitchen
  5023.                     setLockByID(lines[509], false)
  5024.                 end
  5025.  
  5026.                 if (doorID == 8) then -- ->researcher's bedroom
  5027.                     setLockByID(lines[510], false)
  5028.                 end
  5029.  
  5030.             end
  5031.  
  5032.             if (room == 6) then --main hall
  5033.  
  5034.                 if (doorID == 3) then -- ->C Corridor
  5035.                     setLockByID(lines[511], false)
  5036.                 end
  5037.  
  5038.                 if (doorID == 4) then -- ->Outside Patio
  5039.                     setLockByID(lines[512], false)
  5040.                 end
  5041.  
  5042.                 if (doorID == 5) then -- ->Large Art Room
  5043.                     setLockByID(lines[513], false)
  5044.                 end
  5045.  
  5046.                 if (doorID == 6) then -- ->Outside Balcony
  5047.                     setLockByID(lines[514], false)
  5048.                 end
  5049.  
  5050.             end
  5051.  
  5052.             if (room == 7) then --art room
  5053.  
  5054.                 if (doorID == 1) then -- ->L Corridor
  5055.                     setLockByID(lines[515], false)
  5056.                 end
  5057.  
  5058.             end
  5059.  
  5060.             if (room == 8) then --L Corridor
  5061.  
  5062.                 if (doorID == 0) then -- ->Art Room
  5063.                     setLockByID(lines[515], true)
  5064.                 end
  5065.  
  5066.             end
  5067.  
  5068.             if (room == 9) then --winding corridor / bathroom
  5069.  
  5070.                 if (doorID == 0) then -- ->Dark Corridor
  5071.                     setLockByID(lines[516], false)
  5072.                 end
  5073.  
  5074.                 if (doorID == 5) then -- ->Outside Boiler
  5075.                     setLockByID(lines[517], false)
  5076.                 end
  5077.  
  5078.             end
  5079.  
  5080.             if (room == 10) then --dark corridor
  5081.  
  5082.                 if (doorID == 0) then -- ->Large Gallery
  5083.                     setLockByID(lines[518], false)
  5084.                 end
  5085.  
  5086.                 if (doorID == 1) then -- ->Courtyard Study
  5087.                     setLockByID(lines[519], false)
  5088.                 end
  5089.  
  5090.                 if (doorID == 3) then -- ->Winding Corridor
  5091.                     setLockByID(lines[516], true)
  5092.                 end
  5093.  
  5094.             end
  5095.  
  5096.             if (room == 11) then --graveyard/crypt
  5097.  
  5098.                 if (doorID == 1) then -- ->Large Gallery
  5099.                     setLockByID(lines[520], false)
  5100.                 end
  5101.  
  5102.             end
  5103.  
  5104.             if (room == 23) then --large gallery
  5105.  
  5106.                 if (doorID == 1) then -- ->Graveyard / Crypt
  5107.                     setLockByID(lines[520], true)
  5108.                 end
  5109.  
  5110.               end
  5111.  
  5112.         end
  5113.  
  5114.         if (stage == 2) then
  5115.  
  5116.             if (room == 2) then --dining room 2f
  5117.  
  5118.                 if (doorID == 1) then -- ->West Wing Inner Stairway
  5119.                     setLockByID(lines[503], true)
  5120.                 end
  5121.  
  5122.                 if (doorID == 2) then -- ->Mirror Corridor
  5123.                     setLockByID(lines[521], false)
  5124.                 end
  5125.  
  5126.             end
  5127.  
  5128.             if (room == 3) then --outside balcony
  5129.  
  5130.                 if (doorID == 0) then -- ->West Wing Inner Stairway
  5131.                     setLockByID(lines[504], true)
  5132.                     writeBytes(pagetarget, 0x0D);
  5133.                 end
  5134.  
  5135.                 if (doorID == 1) then -- ->Main Hall
  5136.                      setLockByID(lines[514], true)
  5137.                 end
  5138.  
  5139.             end
  5140.  
  5141.             if (room == 4) then --c corridor
  5142.  
  5143.                 if (doorID == 0) then -- ->Pillar Room
  5144.                     setLockByID(lines[522], false)
  5145.                 end
  5146.  
  5147.                 if (doorID == 1) then -- ->East Wing Stairway
  5148.                     setLockByID(lines[523], false)
  5149.                 end
  5150.  
  5151.                 if (doorID == 3) then -- ->Main Hall
  5152.                     setLockByID(lines[511], true)
  5153.                 end
  5154.  
  5155.                 if (doorID == 4) then -- ->Armor Room
  5156.                     setLockByID(lines[524], false)
  5157.                 end
  5158.  
  5159.             end
  5160.  
  5161.             if (room == 7) then --east wing stairway
  5162.  
  5163.                 if (doorID == 0) then -- ->Deer Room
  5164.                     setLockByID(lines[525], false)
  5165.                 end
  5166.  
  5167.                 if (doorID == 3) then -- ->C Corridor
  5168.                     setLockByID(lines[523], true)
  5169.                 end
  5170.  
  5171.             end
  5172.  
  5173.             if (room == 8) then --deer room
  5174.  
  5175.                 if (doorID == 2) then -- ->Fish Tank Room
  5176.                     setLockByID(lines[526], false)
  5177.                 end
  5178.  
  5179.             end
  5180.  
  5181.             if (room == 11) then --resting room
  5182.  
  5183.                 if (doorID == 1) then -- ->Sliding Trap Room / Secret Passage
  5184.                     setLockByID(lines[529], false)
  5185.                 end
  5186.  
  5187.             end
  5188.  
  5189.             if (room == 14) then --attic entry
  5190.  
  5191.                 if (doorID == 1) then -- ->Attic
  5192.                     setLockByID(lines[530], false)
  5193.                 end
  5194.  
  5195.             end
  5196.  
  5197.             if (room == 19) then --elevator corridor
  5198.  
  5199.                 if (doorID == 1) then -- ->Mirror Corridor
  5200.                     setLockByID(lines[527], false)
  5201.                 end
  5202.  
  5203.             end
  5204.  
  5205.             if (room == 20) then --mirror corridor
  5206.  
  5207.                 if (doorID == 0) then -- ->Elevator Corridor
  5208.                     setLockByID(lines[527], true)
  5209.                 end
  5210.  
  5211.                 if (doorID == 1) then -- ->West Wing Inner Stairway
  5212.                     setLockByID(lines[505], true)
  5213.                 end
  5214.  
  5215.                 if (doorID == 2) then -- ->Dining Room 2F
  5216.                     setLockByID(lines[521], true)
  5217.                 end
  5218.  
  5219.             end
  5220.  
  5221.             if (room == 23) then --Death Passage
  5222.  
  5223.                 if (doorID == 1) then -- ->Library
  5224.                     setLockByID(lines[528], false)
  5225.                 end
  5226.  
  5227.             end
  5228.  
  5229.             if (room == 27) then --Concrete Passage 2
  5230.  
  5231.                 if (doorID == 1) then -- ->Kitchen
  5232.                     setLockByID(lines[531], false)
  5233.                 end
  5234.  
  5235.             end
  5236.  
  5237.             if (room == 28) then --Kitchen
  5238.  
  5239.                 if (doorID == 0) then -- ->Tea Room
  5240.                     setLockByID(lines[509], true)
  5241.                 end
  5242.  
  5243.                 if (doorID == 1) then -- ->Concrete Passage 2
  5244.                     setLockByID(lines[531], true)
  5245.                 end
  5246.  
  5247.             end
  5248.  
  5249.         end
  5250.  
  5251.         if (stage == 4) then
  5252.  
  5253.             if (room == 0) then --entry corridor
  5254.  
  5255.                 if (doorID == 1) then -- ->Room 001
  5256.                     setLockByID(lines[532], false)
  5257.                 end
  5258.  
  5259.             end
  5260.  
  5261.             if (room == 5) then --Central Corridor
  5262.  
  5263.                 if (doorID == 1) then -- ->Gallery
  5264.                     setLockByID(lines[533], false)
  5265.                 end
  5266.  
  5267.                 if (doorID == 2) then -- ->Room 002
  5268.                     setLockByID(lines[534], false)
  5269.                 end
  5270.  
  5271.             end
  5272.  
  5273.             if (room == 8) then --Gallery
  5274.  
  5275.                 if (doorID == 2) then -- ->Room 003
  5276.                     setLockByID(lines[535], false)
  5277.                 end
  5278.  
  5279.             end
  5280.  
  5281.             if (room == 14) then --Aqua Ring Walkway
  5282.  
  5283.                 if (doorID == 1) then -- ->Control Room
  5284.                     setLockByID(lines[536], false)
  5285.                 end
  5286.  
  5287.             end
  5288.  
  5289.         end
  5290.  
  5291.         if (stage == 5) then
  5292.  
  5293.             if (room == 5) then --O Room
  5294.  
  5295.                 if (doorID == 2) then -- ->Elevator Entry
  5296.                     setLockByID(lines[537], false)
  5297.                 end
  5298.  
  5299.                 if (doorID == 4) then -- ->Morgue
  5300.                     setLockByID(lines[538], false)
  5301.                 end
  5302.  
  5303.             end
  5304.  
  5305.         end
  5306.  
  5307.     end
  5308.  
  5309.   end
  5310.  
  5311.   if (add == 0x00420246) then --changed from 0x00420216
  5312.  
  5313.     local itemslot=EDX
  5314.  
  5315.     --print("Item place:" .. string.format("%x", value))
  5316.     --print("Item slot:" .. string.format("%x", itemslot))
  5317.  
  5318.      if (stage == 1) then
  5319.  
  5320.         if (room == 2) then --small storeroom
  5321.  
  5322.           if (itemslot == 0) then --broken shotgun
  5323.             EAX=getItemByID(lines[12])
  5324.           end
  5325.  
  5326.           if (itemslot == 2) then --ink ribbon
  5327.             EAX=getItemByID(lines[13])
  5328.           end
  5329.  
  5330.           if (itemslot == 1) then --flash grenade
  5331.             EAX=getItemByID(lines[11])
  5332.           end
  5333.  
  5334.         end
  5335.  
  5336.         if (room == 3) then --northern corridor
  5337.  
  5338.           if (itemslot == 1) then --flash grenade
  5339.             EAX=getItemByID(lines[8])
  5340.           end
  5341.  
  5342.         end
  5343.  
  5344.         if (room == 5) then --dining room
  5345.  
  5346.           if (itemslot == 4) then --ink ribbon
  5347.             EAX=getItemByID(lines[2])
  5348.           end
  5349.  
  5350.           if (itemslot == 0x0000000A) then --blue gemstone
  5351.             EAX=getItemByID(lines[3])
  5352.           end
  5353.  
  5354.           if (itemslot == 8) then --shield key
  5355.             EAX=getItemByID(lines[4])
  5356.           end
  5357.  
  5358.         end
  5359.  
  5360.         if (room == 6) then --main entry hall
  5361.  
  5362.           if (itemslot == 1) then --jill's handgun
  5363.             EAX=getItemByID(lines[1])
  5364.           end
  5365.  
  5366.         end
  5367.  
  5368.         if (room == 7) then --art room
  5369.  
  5370.           if (itemslot == 0) then --dagger
  5371.             EAX=getItemByID(lines[20])
  5372.           end
  5373.  
  5374.         end
  5375.  
  5376.         if (room == 8) then --L Corridor
  5377.  
  5378.           if (itemslot == 3) then --handgun magazine
  5379.             EAX=getItemByID(lines[22])
  5380.           end
  5381.  
  5382.           if (itemslot == 4) then --dagger
  5383.             EAX=getItemByID(lines[21])
  5384.           end
  5385.  
  5386.         end
  5387.  
  5388.         if (room == 9) then --bathroom
  5389.  
  5390.           if (itemslot == 8) then --old key
  5391.             EAX=getItemByID(lines[33])
  5392.           end
  5393.  
  5394.         end
  5395.  
  5396.         if (room == 11) then --graveyard/crypt
  5397.  
  5398.           if (itemslot == 4) then --book of curses/sword key
  5399.             EAX=getItemByID(lines[101])
  5400.           end
  5401.  
  5402.           if (itemslot == 0x0000001C) then --shotgun shells pre-masks
  5403.             EAX=getItemByID(lines[18])
  5404.           end
  5405.  
  5406.           if (itemslot == 0x0000001D) then --shotgun shells post-masks
  5407.             EAX=getItemByID(lines[102])
  5408.           end
  5409.  
  5410.           if (itemslot == 0x00000014) then --stone and metal object after dead crimson head man
  5411.             EAX=getItemByID(lines[103])
  5412.           end
  5413.  
  5414.         end
  5415.  
  5416.         if (room == 12) then --greenhouse
  5417.  
  5418.           if (itemslot == 8) then --mask without eyes
  5419.             EAX=getItemByID(lines[17])
  5420.           end
  5421.  
  5422.         end
  5423.  
  5424.         if (room == 13) then --tiger eye room
  5425.  
  5426.           if (itemslot == 7) then --MO Disk
  5427.             EAX=getItemByID(lines[15])
  5428.           end
  5429.  
  5430.           if (itemslot == 4) then --shotgun shells
  5431.             EAX=getItemByID(lines[14])
  5432.           end
  5433.  
  5434.         end
  5435.  
  5436.         if (room == 14) then --researcher's bedroom
  5437.  
  5438.           if (itemslot == 2) then --handgun magazine
  5439.             EAX=getItemByID(lines[9])
  5440.           end
  5441.  
  5442.           if (itemslot == 7) then --old key
  5443.             EAX=getItemByID(lines[10])
  5444.           end
  5445.  
  5446.         end
  5447.  
  5448.         if (room == 15) then --bar
  5449.  
  5450.           if (itemslot == 1) then --music with missing pages
  5451.             EAX=getItemByID(lines[16])
  5452.           end
  5453.  
  5454.         end
  5455.  
  5456.         if (room == 17) then --large art room / mirror room
  5457.  
  5458.           if (itemslot == 1) then --ink ribbon
  5459.             EAX=getItemByID(lines[23])
  5460.           end
  5461.  
  5462.           if (itemslot == 5) then --dagger
  5463.             EAX=getItemByID(lines[24])
  5464.           end
  5465.  
  5466.           if (itemslot == 0x0000000E) then --jewelry box / spencer key when mixed with red gemstone
  5467.             EAX=getItemByID(lines[25])
  5468.           end
  5469.  
  5470.           if (itemslot == 2) then --green herb
  5471.             EAX=getItemByID(lines[26])
  5472.           end
  5473.  
  5474.         end
  5475.  
  5476.         if (room == 18) then --west wing outer stairway
  5477.  
  5478.           if (itemslot == 1) then --handgun magazine
  5479.             EAX=getItemByID(lines[5])
  5480.           end
  5481.  
  5482.           if (itemslot == 2) then --green herb left
  5483.             EAX=getItemByID(lines[6])
  5484.           end
  5485.  
  5486.           if (itemslot == 3) then --green herb right
  5487.             EAX=getItemByID(lines[7])
  5488.           end
  5489.  
  5490.         end
  5491.  
  5492.         if (room == 20) then --outside boiler
  5493.  
  5494.           if (itemslot == 1) then --right green herb
  5495.             EAX=getItemByID(lines[30])
  5496.           end
  5497.  
  5498.           if (itemslot == 2) then --left green herb
  5499.             EAX=getItemByID(lines[31])
  5500.           end
  5501.  
  5502.           if (itemslot == 3) then --red herb
  5503.             EAX=getItemByID(lines[32])
  5504.           end
  5505.  
  5506.           if (itemslot == 0x0000000C) then --herbicide
  5507.             EAX=getItemByID(lines[29])
  5508.           end
  5509.  
  5510.         end
  5511.  
  5512.         if (room == 22) then --living room
  5513.  
  5514.           if (itemslot == 2) then --dagger
  5515.             EAX=getItemByID(lines[27])
  5516.           end
  5517.  
  5518.           if (itemslot == 8) then --ink ribbon
  5519.             EAX=getItemByID(lines[28])
  5520.           end
  5521.  
  5522.         end
  5523.  
  5524.         if (room == 23) then --large gallery
  5525.  
  5526.           if (itemslot == 7) then --mask without mouth
  5527.             EAX=getItemByID(lines[19])
  5528.           end
  5529.  
  5530.         end
  5531.  
  5532.         if (room == 24) then --east wing storeroom
  5533.  
  5534.           if (itemslot == 0) then --fuel canteen
  5535.             EAX=getItemByID(lines[37])
  5536.           end
  5537.  
  5538.           if (itemslot == 3) then --old key
  5539.             EAX=getItemByID(lines[38])
  5540.           end
  5541.  
  5542.           if (itemslot == 8) then --handgun magazine
  5543.             EAX=getItemByID(lines[40])
  5544.           end
  5545.  
  5546.           if (itemslot == 5) then --shotgun shells
  5547.             EAX=getItemByID(lines[41])
  5548.           end
  5549.  
  5550.           if (itemslot == 6) then --first aid spray
  5551.             EAX=getItemByID(lines[39])
  5552.           end
  5553.  
  5554.         end
  5555.  
  5556.         if (room == 25) then --courtyard study
  5557.  
  5558.           if (itemslot == 5) then --flash grenade
  5559.             EAX=getItemByID(lines[36])
  5560.           end
  5561.  
  5562.           if (itemslot == 1) then --shotgun shells
  5563.             EAX=getItemByID(lines[34])
  5564.           end
  5565.  
  5566.           if (itemslot == 4) then -- metal object
  5567.             EAX=getItemByID(lines[35])
  5568.           end
  5569.  
  5570.         end
  5571.  
  5572.         if (room == 27) then --garden shed
  5573.  
  5574.           if (itemslot == 1) then --shotgun shells
  5575.             EAX=getItemByID(lines[42])
  5576.           end
  5577.  
  5578.           if (itemslot == 2) then --first aid spray
  5579.             EAX=getItemByID(lines[44])
  5580.           end
  5581.  
  5582.           if (itemslot == 0) then --flash grenade
  5583.             EAX=getItemByID(lines[43])
  5584.           end
  5585.  
  5586.           if (itemslot == 5) then --flash grenade from wesker
  5587.             EAX=getItemByID(lines[45])
  5588.           end
  5589.  
  5590.           if (itemslot == 6) then --shotgun shells from wesker
  5591.             EAX=getItemByID(lines[47])
  5592.           end
  5593.  
  5594.           if (itemslot == 7) then --first aid spray
  5595.             EAX=getItemByID(lines[46])
  5596.           end
  5597.  
  5598.         end
  5599.  
  5600.      end
  5601.  
  5602.      if (stage == 2) then
  5603.  
  5604.         if (room == 2) then --dining room 2F
  5605.  
  5606.           if (itemslot == 3) then --dagger
  5607.             EAX=getItemByID(lines[50])
  5608.           end
  5609.  
  5610.         end
  5611.  
  5612.         if (room == 3) then --outside balcony
  5613.  
  5614.           if (itemslot == 0) then --dog collar / imitation key
  5615.             --EAX=getItemByID(lines[49]) taken out for now
  5616.           end
  5617.  
  5618.         end
  5619.  
  5620.         if (room == 4) then --C corridor
  5621.  
  5622.           if (itemslot == 5) then --wooden mount
  5623.             EAX=getItemByID(lines[79])
  5624.           end
  5625.  
  5626.         end
  5627.  
  5628.         if (room == 5) then -- armor room
  5629.  
  5630.           if (itemslot == 6) then --jewelry box / mask without all
  5631.             EAX=getItemByID(lines[80])
  5632.           end
  5633.  
  5634.         end
  5635.  
  5636.         if (room == 6) then --small library
  5637.  
  5638.           if (itemslot == 1) then --dog whistle
  5639.             EAX=getItemByID(lines[83])
  5640.           end
  5641.  
  5642.           if (itemslot == 6) then --handgun magazine
  5643.             EAX=getItemByID(lines[84])
  5644.           end
  5645.  
  5646.           if (itemslot == 0) then --lighter JILL ONLY
  5647.             EAX=getItemByID(lines[1])
  5648.           end
  5649.  
  5650.         end
  5651.  
  5652.         if (room == 8) then -- deer room
  5653.  
  5654.           if (itemslot == 1) then --red herb
  5655.             EAX=getItemByID(lines[89])
  5656.           end
  5657.  
  5658.         end
  5659.  
  5660.         if (room == 9) then -- bedroom
  5661.  
  5662.           if (itemslot == 6) then --first aid box (first aid spray)
  5663.             EAX=getItemByID(lines[85])
  5664.           end
  5665.  
  5666.           if (itemslot == 5) then --old key
  5667.             EAX=getItemByID(lines[86])
  5668.           end
  5669.  
  5670.           if (itemslot == 0) then --ink ribbon
  5671.             EAX=getItemByID(lines[87])
  5672.           end
  5673.  
  5674.           if (itemslot == 3) then --green herb
  5675.             EAX=getItemByID(lines[88])
  5676.           end
  5677.  
  5678.         end
  5679.  
  5680.         if (room == 10) then -- fish tank room
  5681.  
  5682.           if (itemslot == 0x0000000D) then --wind crest
  5683.             EAX=getItemByID(lines[93])
  5684.           end
  5685.  
  5686.         end
  5687.  
  5688.         if (room == 11) then --resting room
  5689.  
  5690.           if (itemslot == 0) then --green herb
  5691.             EAX=getItemByID(lines[82])
  5692.           end
  5693.  
  5694.         end
  5695.  
  5696.         if (room == 12) then --sliding trap room / secret passage
  5697.  
  5698.           if (itemslot == 0x00000010) then --dagger
  5699.             EAX=getItemByID(lines[81])
  5700.           end
  5701.  
  5702.           if (itemslot == 2) then --medal of eagle book
  5703.             EAX=getItemByID(lines[48])
  5704.           end
  5705.  
  5706.         end
  5707.  
  5708.         if (room == 13) then --pillar room
  5709.  
  5710.           if (itemslot == 0) then --green herb (right)
  5711.             EAX=getItemByID(lines[71])
  5712.           end
  5713.  
  5714.           if (itemslot == 1) then --green herb (left)
  5715.             EAX=getItemByID(lines[72])
  5716.           end
  5717.  
  5718.         end
  5719.  
  5720.         if (room == 14) then --attic entry
  5721.  
  5722.           if (itemslot == 3) then --flash grenade
  5723.             EAX=getItemByID(lines[76])
  5724.           end
  5725.  
  5726.         end
  5727.  
  5728.         if (room == 15) then --small dining room
  5729.  
  5730.           if (itemslot == 1) then --music mid pages
  5731.             EAX=getItemByID(lines[75])
  5732.           end
  5733.  
  5734.           if (itemslot == 4) then --handgun magazine (in cupboard)
  5735.             EAX=getItemByID(lines[73])
  5736.           end
  5737.  
  5738.           if (itemslot == 6) then --handgun magazine (on table)
  5739.             EAX=getItemByID(lines[74])
  5740.           end
  5741.  
  5742.         end
  5743.  
  5744.         if (room == 16) then --attic
  5745.  
  5746.           if (itemslot == 0) then --mask without nose
  5747.             EAX=getItemByID(lines[78])
  5748.           end
  5749.  
  5750.           if (itemslot == 4) then --shotgun shells
  5751.             EAX=getItemByID(lines[77])
  5752.           end
  5753.  
  5754.         end
  5755.  
  5756.         if (room == 18) then --outside patio
  5757.  
  5758.           if (itemslot == 1) then --dagger
  5759.             EAX=getItemByID(lines[68])
  5760.           end
  5761.  
  5762.           if (itemslot == 3) then --green herb (left)
  5763.             EAX=getItemByID(lines[69])
  5764.           end
  5765.  
  5766.           if (itemslot == 0x0000000E) then --green herb (right)
  5767.             EAX=getItemByID(lines[70])
  5768.           end
  5769.  
  5770.           if (itemslot == 0x0000000B) then --grenade launcher, jill only
  5771.             EAX=getItemByID(lines[38])
  5772.           end
  5773.  
  5774.         end
  5775.  
  5776.         if (room == 19) then --elevator corridor
  5777.  
  5778.           if (itemslot == 2) then --green herb (left)
  5779.             EAX=getItemByID(lines[54])
  5780.           end
  5781.  
  5782.           if (itemslot == 4) then --green herb (right)
  5783.             EAX=getItemByID(lines[55])
  5784.           end
  5785.  
  5786.           if (itemslot == 5) then --red herb
  5787.             EAX=getItemByID(lines[56])
  5788.           end
  5789.  
  5790.         end
  5791.  
  5792.         if (room == 20) then --mirror corridor
  5793.  
  5794.           if (itemslot == 0) then --handgun magazine
  5795.             EAX=getItemByID(lines[53])
  5796.           end
  5797.  
  5798.           if (itemslot == 1) then --arrowhead
  5799.             EAX=getItemByID(lines[52])
  5800.           end
  5801.  
  5802.           if (itemslot == 2) then --green herb
  5803.             EAX=getItemByID(lines[51])
  5804.           end
  5805.  
  5806.         end
  5807.  
  5808.         if (room == 21) then --trophy room
  5809.  
  5810.           if (itemslot == 1) then --shotgun shells
  5811.             EAX=getItemByID(lines[61])
  5812.           end
  5813.  
  5814.           --red and yellow gemstone should be here but aren't :(
  5815.  
  5816.           if (itemslot == 0) then --dagger
  5817.             EAX=getItemByID(lines[64])
  5818.           end
  5819.  
  5820.         end
  5821.  
  5822.         if (room == 22) then --library
  5823.  
  5824.           if (itemslot == 0x0000000B) then --green herb (right)
  5825.             EAX=getItemByID(lines[65])
  5826.           end
  5827.  
  5828.           if (itemslot == 0x0000000C) then --green herb (left)
  5829.             EAX=getItemByID(lines[66])
  5830.           end
  5831.  
  5832.           if (itemslot == 4) then --last book 2, medal of wolf
  5833.             EAX=getItemByID(lines[67])
  5834.           end
  5835.  
  5836.         end
  5837.  
  5838.         if (room == 25) then --materials room
  5839.  
  5840.           if (itemslot == 0) then --shotgun shells (left)
  5841.             EAX=getItemByID(lines[57])
  5842.           end
  5843.  
  5844.           if (itemslot == 1) then --shotgun shells (right)
  5845.             EAX=getItemByID(lines[58])
  5846.           end
  5847.  
  5848.           if (itemslot == 3) then --flash grenade
  5849.             EAX=getItemByID(lines[59])
  5850.           end
  5851.  
  5852.           if (itemslot == 2) then --battery
  5853.             EAX=getItemByID(lines[60])
  5854.           end
  5855.  
  5856.         end
  5857.  
  5858.         if (room == 26) then --concrete passage 1
  5859.  
  5860.           if (itemslot == 0) then --shotgun shells
  5861.             EAX=getItemByID(lines[100])
  5862.           end
  5863.  
  5864.         end
  5865.  
  5866.         if (room == 27) then --concrete passage 2
  5867.  
  5868.           if (itemslot == 3) then --red herb
  5869.             EAX=getItemByID(lines[96])
  5870.           end
  5871.  
  5872.           if (itemslot == 4) then --blue herb
  5873.             EAX=getItemByID(lines[97])
  5874.           end
  5875.  
  5876.           if (itemslot == 2) then --handgun magazine
  5877.             EAX=getItemByID(lines[99])
  5878.           end
  5879.  
  5880.           if (itemslot == 5) then --dagger
  5881.             EAX=getItemByID(lines[98])
  5882.           end
  5883.  
  5884.         end
  5885.  
  5886.         if (room == 28) then --kitchen
  5887.  
  5888.           if (itemslot == 3) then --dagger
  5889.             EAX=getItemByID(lines[94])
  5890.           end
  5891.  
  5892.           if (itemslot == 4) then --old key
  5893.             EAX=getItemByID(lines[95])
  5894.           end
  5895.  
  5896.         end
  5897.  
  5898.      end
  5899.  
  5900.      if (stage == 3) then
  5901.  
  5902.         if (room == 0) then --main garden
  5903.  
  5904.           if (itemslot == 4) then --blue herb
  5905.             EAX=getItemByID(lines[110])
  5906.           end
  5907.  
  5908.           if (itemslot == 5) then --green herb
  5909.             EAX=getItemByID(lines[109])
  5910.           end
  5911.  
  5912.         end
  5913.  
  5914.         if (room == 4) then --zig zag path
  5915.  
  5916.           if (itemslot == 3) then --red herb
  5917.             EAX=getItemByID(lines[111])
  5918.           end
  5919.  
  5920.         end
  5921.  
  5922.         if (room == 6) then --underground statue room
  5923.  
  5924.           if (itemslot == 5) then --cylinder
  5925.             EAX=getItemByID(lines[123])
  5926.           end
  5927.  
  5928.         end
  5929.  
  5930.         if (room == 7) then --entrance passage
  5931.  
  5932.           if (itemslot == 2) then --ink ribbon
  5933.             EAX=getItemByID(lines[112])
  5934.           end
  5935.  
  5936.           if (itemslot == 4) then --green herb
  5937.             EAX=getItemByID(lines[113])
  5938.           end
  5939.  
  5940.         end
  5941.  
  5942.         if (room == 9) then --generator room
  5943.  
  5944.           if (itemslot == 5) then --shaft / CANNOT DO THIS DUE TO DUPE CONFLICT
  5945.             --EAX=getItemByID(lines[115])
  5946.           end
  5947.  
  5948.           if (itemslot == 0x0000000C) then --handgun magazine near door
  5949.             EAX=getItemByID(lines[114])
  5950.           end
  5951.  
  5952.           if (itemslot == 0x0000000D) then --handgun magazine near elevator
  5953.             EAX=getItemByID(lines[116])
  5954.           end
  5955.  
  5956.         end
  5957.  
  5958.         if (room == 10) then --enrico room
  5959.  
  5960.           if (itemslot == 3) then --hex crank / removed due to enrico bug
  5961.             EAX=getItemByID(lines[117])
  5962.           end
  5963.  
  5964.         end
  5965.  
  5966.         if (room == 11) then --boulder passage 1
  5967.  
  5968.           if (itemslot == 1) then --shotgun shells
  5969.             EAX=getItemByID(lines[118])
  5970.           end
  5971.  
  5972.         end
  5973.  
  5974.         if (room == 12) then --spider room
  5975.  
  5976.           if (itemslot == 0) then --knife
  5977.             EAX=getItemByID(lines[119])
  5978.           end
  5979.  
  5980.         end
  5981.  
  5982.         if (room == 13) then --straight passage
  5983.  
  5984.           if (itemslot == 4) then --blue herb (right)
  5985.             EAX=getItemByID(lines[120])
  5986.           end
  5987.  
  5988.           if (itemslot == 5) then --blue herb (left)
  5989.             EAX=getItemByID(lines[121])
  5990.           end
  5991.  
  5992.         end
  5993.  
  5994.         if (room == 15) then --boulder passage 2
  5995.  
  5996.           if (itemslot == 5) then --first aid box (first aid spray)
  5997.             EAX=getItemByID(lines[122])
  5998.           end
  5999.  
  6000.         end
  6001.  
  6002.         if (room == 18) then --small headstone area
  6003.  
  6004.           if (itemslot == 7) then --magnum
  6005.             EAX=getItemByID(lines[107])
  6006.           end
  6007.  
  6008.           if (itemslot == 5) then --star crest
  6009.             EAX=getItemByID(lines[105])
  6010.           end
  6011.  
  6012.           if (itemslot == 6) then --moon crest
  6013.             EAX=getItemByID(lines[104])
  6014.           end
  6015.  
  6016.           if (itemslot == 4) then --sun crest
  6017.             EAX=getItemByID(lines[106])
  6018.           end
  6019.  
  6020.         end
  6021.  
  6022.         if (room == 20) then --cabin
  6023.  
  6024.           if (itemslot == 6) then --square crank
  6025.             EAX=getItemByID(lines[108])
  6026.           end
  6027.  
  6028.         end
  6029.  
  6030.         if (room == 22) then --garbage compactor room
  6031.  
  6032.           if (itemslot == 4) then --broken flamethrower -- taken out for now due to being required in it's area
  6033.             --EAX=getItemByID(lines[124])
  6034.           end
  6035.  
  6036.         end
  6037.  
  6038.         if (room == 23) then --winding underground passage
  6039.  
  6040.           if (itemslot == 7) then --green herb
  6041.             EAX=getItemByID(lines[125])
  6042.           end
  6043.  
  6044.           if (itemslot == 9 or itemslot == 8) then --red herb (green in hard)
  6045.             EAX=getItemByID(lines[126])
  6046.           end
  6047.  
  6048.         end
  6049.  
  6050.         if (room == 24) then --underground storage
  6051.  
  6052.           if (itemslot == 9) then --magnum rounds
  6053.             EAX=getItemByID(lines[127])
  6054.           end
  6055.  
  6056.           if (itemslot == 0x0000000A) then --handgun magazine
  6057.             EAX=getItemByID(lines[128])
  6058.           end
  6059.  
  6060.           if (itemslot == 8) then --flash grenade
  6061.             EAX=getItemByID(lines[129])
  6062.           end
  6063.  
  6064.         end
  6065.  
  6066.         if (room == 25) then --lisa's room
  6067.  
  6068.           if (itemslot == 3) then --jewelry box / stone ring
  6069.             EAX=getItemByID(lines[130])
  6070.           end
  6071.  
  6072.           if (itemslot == 0x0000000D) then --green herb
  6073.             EAX=getItemByID(lines[132])
  6074.           end
  6075.  
  6076.           if (itemslot == 0x0000000E) then --blue herb
  6077.             EAX=getItemByID(lines[131])
  6078.           end
  6079.  
  6080.         end
  6081.  
  6082.      end
  6083.  
  6084.      if (stage == 4) then
  6085.  
  6086.         if (room == 0) then --entry corridor
  6087.  
  6088.           if (itemslot == 2) then --blue herb (right)
  6089.             EAX=getItemByID(lines[133])
  6090.           end
  6091.  
  6092.           if (itemslot == 3) then --blue herb (middle)
  6093.             EAX=getItemByID(lines[134])
  6094.           end
  6095.  
  6096.           if (itemslot == 4) then --blue herb (left)
  6097.             EAX=getItemByID(lines[135])
  6098.           end
  6099.  
  6100.         end
  6101.  
  6102.         if (room == 1) then --room 001
  6103.  
  6104.           if (itemslot == 3) then -- handgun magazine
  6105.             EAX=getItemByID(lines[139])
  6106.           end
  6107.  
  6108.           if (itemslot == 2) then -- self defense gun
  6109.             EAX=getItemByID(lines[138])
  6110.           end
  6111.  
  6112.         end
  6113.  
  6114.         if (room == 2) then --room 001 bathroom
  6115.  
  6116.           if (itemslot == 0) then -- control room key
  6117.             EAX=getItemByID(lines[140])
  6118.           end
  6119.  
  6120.         end
  6121.  
  6122.         if (room == 3) then --residence storeroom
  6123.  
  6124.           if (itemslot == 0) then --ink ribbon
  6125.             EAX=getItemByID(lines[136])
  6126.           end
  6127.  
  6128.           if (itemslot == 3) then --flash grenade
  6129.             EAX=getItemByID(lines[137])
  6130.           end
  6131.  
  6132.         end
  6133.  
  6134.         if (room == 4) then --rec room
  6135.  
  6136.           if (itemslot == 0x0000000B) then --green herb
  6137.             EAX=getItemByID(lines[141])
  6138.           end
  6139.  
  6140.           if (itemslot == 0x0000000C) then --green herb
  6141.             EAX=getItemByID(lines[142])
  6142.           end
  6143.  
  6144.           if (itemslot == 0x0000000D) then --First Aid Box (Mixed Herbs G+B)
  6145.             EAX=getItemByID(lines[144])
  6146.           end
  6147.  
  6148.           if (itemslot == 0x0000000E) then --shotgun shells
  6149.             EAX=getItemByID(lines[145])
  6150.           end
  6151.  
  6152.           if (itemslot == 0x0000000A) then --unprinted book
  6153.             EAX=getItemByID(lines[143])
  6154.           end
  6155.  
  6156.         end
  6157.  
  6158.         if (room == 7) then --room 002 bathroom
  6159.  
  6160.           if (itemslot == 6) then --key for room 001
  6161.             EAX=getItemByID(lines[146])
  6162.           end
  6163.  
  6164.         end
  6165.  
  6166.         if (room == 8) then --gallery
  6167.  
  6168.           if (itemslot == 5) then --handgun magazine
  6169.             EAX=getItemByID(lines[147])
  6170.           end
  6171.  
  6172.           if (itemslot == 3) then --insecticide spray
  6173.             EAX=getItemByID(lines[148])
  6174.           end
  6175.  
  6176.           if (itemslot == 2) then --key for room 003
  6177.             EAX=getItemByID(lines[149])
  6178.           end
  6179.  
  6180.           if (itemslot == 9) then --red herb
  6181.             EAX=getItemByID(lines[150])
  6182.           end
  6183.  
  6184.         end
  6185.  
  6186.         if (playingas == "jill") then
  6187.  
  6188.           if (room == 9) then --residence medical room, JILL ONLY
  6189.  
  6190.             if (itemslot == 0) then --bottle
  6191.               EAX=getItemByID(lines[95])
  6192.             end
  6193.  
  6194.             if (itemslot == 1) then --bottle
  6195.               EAX=getItemByID(lines[76])
  6196.             end
  6197.  
  6198.             if (itemslot == 2) then --bottle
  6199.               EAX=getItemByID(lines[77])
  6200.             end
  6201.  
  6202.             if (itemslot == 3) then --bottle
  6203.               EAX=getItemByID(lines[86])
  6204.             end
  6205.  
  6206.           end
  6207.  
  6208.         end
  6209.  
  6210.         if (room == 12) then --plant 42 room
  6211.  
  6212.           if (itemslot == 0) then -- helmet key
  6213.             EAX=getItemByID(lines[151])
  6214.           end
  6215.  
  6216.         end
  6217.  
  6218.         if (room == 13) then --aqua ring entry / exit
  6219.  
  6220.           if (itemslot == 4) then --green herb
  6221.             EAX=getItemByID(lines[152])
  6222.           end
  6223.  
  6224.           if (itemslot == 5) then --magnum rounds
  6225.             EAX=getItemByID(lines[156])
  6226.           end
  6227.  
  6228.         end
  6229.  
  6230.         if (room == 16) then --aqua ring storage
  6231.  
  6232.           if (itemslot == 3) then --shotgun shells
  6233.             EAX=getItemByID(lines[154])
  6234.           end
  6235.  
  6236.           if (itemslot == 4) then --magnum rounds on hard, same slot as above intentionally
  6237.             EAX=getItemByID(lines[154])
  6238.           end
  6239.  
  6240.         end
  6241.  
  6242.         if (room == 17) then --control room
  6243.  
  6244.           if (itemslot == 0x0000000C) then --first aid box (green + green)
  6245.             EAX=getItemByID(lines[153])
  6246.           end
  6247.  
  6248.         end
  6249.  
  6250.         if (room == 18) then --aqua ring water tank
  6251.  
  6252.           if (itemslot == 5) then --gallery key
  6253.             EAX=getItemByID(lines[155])
  6254.           end
  6255.  
  6256.         end
  6257.  
  6258.      end
  6259.  
  6260.      if (stage == 5) then
  6261.  
  6262.         if (room == 2) then --item box room
  6263.  
  6264.           if (itemslot == 2) then --ink ribbon
  6265.             EAX=getItemByID(lines[157])
  6266.           end
  6267.  
  6268.         end
  6269.  
  6270.         if (room == 3) then --laboratory stairway
  6271.  
  6272.           if (itemslot == 0) then --MO Disk
  6273.             EAX=getItemByID(lines[160])
  6274.           end
  6275.  
  6276.           if (itemslot == 1) then --green herb (far)
  6277.             EAX=getItemByID(lines[158])
  6278.           end
  6279.  
  6280.           if (itemslot == 4) then --green herb (near)
  6281.             EAX=getItemByID(lines[159])
  6282.           end
  6283.  
  6284.         end
  6285.  
  6286.         if (room == 4) then --visual data room
  6287.  
  6288.           if (itemslot == 9) then --first aid spray
  6289.             EAX=getItemByID(lines[161])
  6290.           end
  6291.  
  6292.           if (itemslot == 2) then --MO Disk
  6293.             EAX=getItemByID(lines[162])
  6294.           end
  6295.  
  6296.           if (itemslot == 0x0000000C) then --shotgun shells
  6297.             EAX=getItemByID(lines[163])
  6298.           end
  6299.  
  6300.           if (itemslot == 5) then --power area key
  6301.             EAX=getItemByID(lines[164])
  6302.           end
  6303.  
  6304.         end
  6305.  
  6306.         if (room == 5) then --O room
  6307.  
  6308.           if (itemslot == 0) then --dagger
  6309.             EAX=getItemByID(lines[170])
  6310.           end
  6311.  
  6312.         end
  6313.  
  6314.         if (room == 6) then --operating room
  6315.  
  6316.           if (itemslot == 1) then --magnum rounds
  6317.             EAX=getItemByID(lines[171])
  6318.           end
  6319.  
  6320.           if (itemslot == 9) then --first aid box (1 green herb)
  6321.             EAX=getItemByID(lines[173])
  6322.           end
  6323.  
  6324.           if (itemslot == 0) then --flash grenade
  6325.             EAX=getItemByID(lines[172])
  6326.           end
  6327.  
  6328.         end
  6329.  
  6330.         if (room == 7) then --morgue
  6331.  
  6332.           if (itemslot == 0) then --flash grenade
  6333.             EAX=getItemByID(lines[174])
  6334.           end
  6335.  
  6336.           if (itemslot == 0x00000010) then --shotgun shells
  6337.             EAX=getItemByID(lines[175])
  6338.           end
  6339.  
  6340.         end
  6341.  
  6342.         if (room == 8) then --pass code corridor
  6343.  
  6344.           if (itemslot == 4) then --first aid box (green + green)
  6345.             EAX=getItemByID(lines[165])
  6346.           end
  6347.  
  6348.         end
  6349.  
  6350.         if (room == 9) then --xray room A
  6351.  
  6352.           if (itemslot == 0x00000010) then --Xray CLARK
  6353.             EAX=getItemByID(lines[168])
  6354.           end
  6355.  
  6356.           if (itemslot == 6) then --Xray GAIL
  6357.             EAX=getItemByID(lines[169])
  6358.           end
  6359.  
  6360.         end
  6361.  
  6362.         if (room == 10) then --xray room B
  6363.  
  6364.           if (itemslot == 3) then --slide filter
  6365.             EAX=getItemByID(lines[167])
  6366.           end
  6367.  
  6368.           if (itemslot == 2) then --magnum rounds
  6369.             EAX=getItemByID(lines[166])
  6370.           end
  6371.  
  6372.         end
  6373.  
  6374.         if (room == 14) then --lab lounge
  6375.  
  6376.           if (itemslot == 1) then --ink ribbon
  6377.             EAX=getItemByID(lines[176])
  6378.           end
  6379.  
  6380.           if (itemslot == 0) then --shotgun shells
  6381.             EAX=getItemByID(lines[178])
  6382.           end
  6383.  
  6384.           if (itemslot == 5) then --first aid spray
  6385.             EAX=getItemByID(lines[177])
  6386.           end
  6387.  
  6388.         end
  6389.  
  6390.         if (room == 16) then --Power Maze B
  6391.  
  6392.           if (itemslot == 4) then --flash grenade
  6393.             EAX=getItemByID(lines[180])
  6394.           end
  6395.  
  6396.         end
  6397.  
  6398.      end
  6399.  
  6400.   end
  6401.  
  6402.   if (add == 0x0043D3F3) then --enemy id, changed from 0x0043D2E3
  6403.  
  6404.     val = EAX
  6405.     slot = EDX
  6406.  
  6407.     if (slot == 0 and val > 0) then
  6408.  
  6409.       if (stage == 1) then
  6410.  
  6411.         if (room == 1) then --west wing inner stairway
  6412.           EAX=getEnemyByID(lines[231])
  6413.         end
  6414.  
  6415.         if (room == 3) then --northern corridor / tea room
  6416.           EAX=getEnemyByID(lines[229])
  6417.         end
  6418.  
  6419.         if (room == 5) then --dining room
  6420.           EAX=getEnemyByID(lines[193])
  6421.         end
  6422.  
  6423.         if (room == 6) then --main entry hall
  6424.           EAX=getEnemyByID(lines[209])
  6425.         end
  6426.  
  6427.         if (room == 7) then --art room
  6428.           EAX=getEnemyByID(lines[183])
  6429.         end
  6430.  
  6431.         if (room == 8) then --L Corridor
  6432.           EAX=getEnemyByID(lines[204])
  6433.         end
  6434.  
  6435.         if (room == 9) then --bathroom / winding corridor
  6436.           EAX=getEnemyByID(lines[186])
  6437.         end
  6438.  
  6439.         if (room == 10) then --dark corridor
  6440.           EAX=getEnemyByID(lines[192])
  6441.         end
  6442.  
  6443.         if (room == 11) then --graveyard/crypt
  6444.           EAX=getEnemyByID(lines[191])
  6445.         end
  6446.  
  6447.         if (room == 13) then --tiger eye room
  6448.           EAX=getEnemyByID(lines[230])
  6449.         end
  6450.  
  6451.         if (room == 14) then --researcher's bedroom
  6452.           EAX=getEnemyByID(lines[220])
  6453.         end
  6454.  
  6455.         if (room == 17) then --large art room / mirror room
  6456.           EAX=getEnemyByID(lines[212])
  6457.         end
  6458.  
  6459.         if (room == 18) then --west wing outer stairway
  6460.           EAX=getEnemyByID(lines[232])
  6461.         end
  6462.  
  6463.         if (room == 20) then --outside boiler
  6464.           EAX=getEnemyByID(lines[214])
  6465.         end
  6466.  
  6467.         if (room == 23) then --large gallery
  6468.           EAX=getEnemyByID(lines[206])
  6469.         end
  6470.  
  6471.         if (room == 26) then --roofed passage
  6472.           EAX=getEnemyByID(lines[221])
  6473.         end
  6474.  
  6475.       end
  6476.  
  6477.       if (stage == 2) then
  6478.  
  6479.         if (room == 2) then --dining room 2F
  6480.           EAX=getEnemyByID(lines[194])
  6481.         end
  6482.  
  6483.         if (room == 4) then --C corridor
  6484.           EAX=getEnemyByID(lines[188])
  6485.         end
  6486.  
  6487.         if (room == 6) then --small library
  6488.           EAX=getEnemyByID(lines[227])
  6489.         end
  6490.  
  6491.         if (room == 7) then --east wing stairway
  6492.           EAX=getEnemyByID(lines[195])
  6493.         end
  6494.  
  6495.         if (room == 13) then --pillar room
  6496.           EAX=getEnemyByID(lines[216])
  6497.         end
  6498.  
  6499.         if (room == 14) then --attic entry
  6500.           EAX=getEnemyByID(lines[185])
  6501.         end
  6502.  
  6503.         if (room == 15) then --small dining room
  6504.           EAX=getEnemyByID(lines[226])
  6505.         end
  6506.  
  6507.         if (room == 16) then --attic
  6508.           EAX=getEnemyByID(lines[184])
  6509.         end
  6510.  
  6511.         if (room == 18) then --Outside Patio
  6512.           EAX=getEnemyByID(lines[215])
  6513.         end
  6514.  
  6515.         if (room == 19) then --elevator corridor
  6516.           EAX=getEnemyByID(lines[196])
  6517.         end
  6518.  
  6519.         if (room == 20) then --mirror corridor
  6520.           EAX=getEnemyByID(lines[211])
  6521.         end
  6522.  
  6523.         if (room == 22) then --library
  6524.           EAX=getEnemyByID(lines[207])
  6525.         end
  6526.  
  6527.         if (room == 26) then --concrete passage 1
  6528.           EAX=getEnemyByID(lines[189])
  6529.         end
  6530.  
  6531.         if (room == 27) then --concrete passage 2
  6532.           EAX=getEnemyByID(lines[190])
  6533.         end
  6534.  
  6535.         if (room == 28) then --kitchen
  6536.           EAX=getEnemyByID(lines[203])
  6537.         end
  6538.  
  6539.       end
  6540.  
  6541.       if (stage == 3) then
  6542.  
  6543.         if (room == 0) then --main garden
  6544.           EAX=getEnemyByID(lines[208])
  6545.         end
  6546.  
  6547.         if (room == 8) then --forked passage
  6548.           EAX=getEnemyByID(lines[201])
  6549.         end
  6550.  
  6551.         if (room == 10) then --Enrico Room
  6552.           EAX=getEnemyByID(lines[198])
  6553.         end
  6554.  
  6555.         if (room == 11) then --boulder passage 1
  6556.           EAX=getEnemyByID(lines[187])
  6557.         end
  6558.  
  6559.         if (room == 19) then --forest pathway
  6560.           EAX=getEnemyByID(lines[200])
  6561.         end
  6562.  
  6563.         if (room == 21) then --jessica's tomb
  6564.           EAX=getEnemyByID(lines[202])
  6565.         end
  6566.  
  6567.         if (room == 23) then --winding underground passage
  6568.           EAX=getEnemyByID(lines[233])
  6569.         end
  6570.  
  6571.       end
  6572.  
  6573.       if (stage == 4) then
  6574.  
  6575.         if (room == 0) then --entry corridor
  6576.           EAX=getEnemyByID(lines[199])
  6577.         end
  6578.  
  6579.         if (room == 1) then --room 001
  6580.           EAX=getEnemyByID(lines[222])
  6581.         end
  6582.  
  6583.         if (room == 2) then --room 001 bathroom
  6584.           EAX=getEnemyByID(lines[223])
  6585.         end
  6586.  
  6587.         if (room == 6) then --room 002
  6588.           EAX=getEnemyByID(lines[224])
  6589.         end
  6590.  
  6591.         if (room == 7) then --room 002 bathroom
  6592.           EAX=getEnemyByID(lines[225])
  6593.         end
  6594.  
  6595.         if (room == 14) then --aqua ring walkway
  6596.           EAX=getEnemyByID(lines[182])
  6597.         end
  6598.  
  6599.       end
  6600.  
  6601.       if (stage == 5) then
  6602.  
  6603.         if (room == 3) then --laboratory stairway
  6604.           EAX=getEnemyByID(lines[205])
  6605.         end
  6606.  
  6607.         if (room == 5) then --O room
  6608.           EAX=getEnemyByID(lines[213])
  6609.         end
  6610.  
  6611.         if (room == 7) then --morgue / surgeon's room
  6612.           EAX=getEnemyByID(lines[228])
  6613.         end
  6614.  
  6615.         if (room == 10) then --xray room B
  6616.           EAX=getEnemyByID(lines[234])
  6617.         end
  6618.  
  6619.         if (room == 12) then --elevator entry
  6620.           EAX=getEnemyByID(lines[197])
  6621.         end
  6622.  
  6623.         if (room == 15) then --Power Maze A
  6624.           EAX=getEnemyByID(lines[218])
  6625.         end
  6626.  
  6627.         if (room == 16) then --Power Maze B
  6628.           EAX=getEnemyByID(lines[219])
  6629.         end
  6630.  
  6631.         if (room == 17) then --Power Control Room
  6632.           EAX=getEnemyByID(lines[217])
  6633.         end
  6634.  
  6635.         if (room == 19) then --Main Laboratory
  6636.           EAX=getEnemyByID(lines[210])
  6637.         end
  6638.  
  6639.       end
  6640.  
  6641.     end
  6642.  
  6643.   end
  6644.  
  6645.   if (add == 0x0041F2BC) then --animation, changed from 0x0041F22C
  6646.  
  6647.     shouldwrite = false
  6648.  
  6649.     if (stage == 1) then
  6650.  
  6651.       if (room == 1 or room == 3 or room == 5 or room == 6 or room == 7 or room == 8 or room == 9 or room == 10 or room == 11 or room == 13 or room == 14 or room == 17 or room == 18 or room == 20 or room == 23 or room == 26) then
  6652.         shouldwrite = true
  6653.       end
  6654.  
  6655.     end
  6656.  
  6657.     if (stage == 2) then
  6658.  
  6659.       if (room == 2 or room == 4 or room == 6 or room == 7 or room == 13 or room == 14 or room == 15 or room == 16 or room == 18 or room == 19 or room == 20 or room == 22 or room == 26 or room == 27 or room == 28) then
  6660.         shouldwrite = true
  6661.       end
  6662.  
  6663.     end
  6664.  
  6665.     if (stage == 3) then
  6666.  
  6667.       if (room == 0 or room == 8 or room == 10 or room == 11 or room == 19 or room == 21 or room == 23) then
  6668.         shouldwrite = true
  6669.       end
  6670.  
  6671.     end
  6672.  
  6673.     if (stage == 4) then
  6674.  
  6675.       if (room == 0 or room == 1 or room == 2 or room == 6 or room == 7 or room == 14) then
  6676.         shouldwrite = true
  6677.       end
  6678.  
  6679.     end
  6680.  
  6681.     if (stage == 5) then
  6682.  
  6683.       if (room == 3 or room == 5 or room == 7 or room == 10 or room == 12 or room == 15 or room == 16 or room == 17 or room == 19) then
  6684.         shouldwrite = true
  6685.       end
  6686.  
  6687.     end
  6688.  
  6689.     --print('anim ID is:' .. ESI+0x33)
  6690.  
  6691.     --print("setting anim to 0")
  6692.  
  6693.     if (shouldwrite == true) then
  6694.       target = ESI+0x33
  6695.       writeBytes(target, 0x00);
  6696.     end
  6697.  
  6698.     --print("CRIMSONTEST")
  6699.  
  6700.     if (spawningcrimson == true) then
  6701.  
  6702.         target = ESI+0x31
  6703.         writeBytes(target, 0x0B)
  6704.         writeBytes(target + 0x1, 0x02)
  6705.         writeBytes(target + 0x2, 0x0A)
  6706.  
  6707.     end
  6708.  
  6709.  
  6710.   end
  6711.  
  6712.   if (add == 0x00407D78) then --changed from 0x00407D88
  6713.  
  6714.    room = EAX
  6715.    stage = EDX
  6716.    --print("room: " .. room)
  6717.    --print("stage: " .. stage)
  6718.  
  6719.     spawningcrimson = false --reset crimson flag each time we change room
  6720.     --print("SPAWNINGCRIMSONFALSESET")
  6721.  
  6722.    if (stage == 0) then
  6723.     stage = 1
  6724.    end
  6725.  
  6726.     if (stage > 10) then --loaded game so the stage is garbage
  6727.  
  6728.       if (room == 24 or room == 5) then --east wing storeroom or dining room
  6729.         stage = 1
  6730.       end
  6731.  
  6732.       if (room == 20 or room == 7) then --cabin or entrance passage
  6733.         stage = 3
  6734.       end
  6735.  
  6736.       if (room == 2 or room == 14) then --lab entrance and lab lounge
  6737.         stage = 5
  6738.       end
  6739.  
  6740.       if (room == 3) then --residence storage room
  6741.         stage = 4
  6742.       end
  6743.  
  6744.     end
  6745.  
  6746.   end
  6747.  
  6748.   if (add == 0x004E823D) then --cutscene items, changed from 0x004E7E6D
  6749.  
  6750.     target = ECX+0x624C
  6751.     doswap = false
  6752.     itemtopos = 0x000E0001 --debug rocket launcher in case of errors
  6753.  
  6754.     if (stage == 2) then
  6755.  
  6756.       if (room == 10) then --Fish Tank Room
  6757.  
  6758.         cutsceneitem = readBytes(target, 1)
  6759.  
  6760.         if (cutsceneitem == 0x75) then--gotta check it's not the bees
  6761.  
  6762.           itemtopos = getItemByID(lines[90]) --fish hook
  6763.           doswap = true
  6764.  
  6765.         end
  6766.  
  6767.       end
  6768.  
  6769.       if (room == 18) then --Outside Patio
  6770.  
  6771.         itemtopos = getItemByID(lines[38]) --grenade launcher, jill only
  6772.         doswap = true
  6773.  
  6774.       end
  6775.  
  6776.       if (room == 21) then --Trophy Room
  6777.  
  6778.         cutsceneitem = readBytes(target, 1)
  6779.  
  6780.         if (cutsceneitem == 0x48) then
  6781.  
  6782.           itemtopos = getItemByID(lines[62]) --red gemstone
  6783.           doswap = true
  6784.  
  6785.         end
  6786.  
  6787.         if (cutsceneitem == 0x4A) then
  6788.  
  6789.           itemtopos = getItemByID(lines[63]) --yellow gemstone
  6790.           doswap = true
  6791.  
  6792.         end
  6793.  
  6794.       end
  6795.  
  6796.     end
  6797.  
  6798.     if (stage == 3) then
  6799.  
  6800.       if (room == 10) then --Enrico Room
  6801.  
  6802.         itemtopos = getItemByID(lines[117]) --hex crank
  6803.         doswap = true
  6804.  
  6805.       end
  6806.  
  6807.     end
  6808.  
  6809.     if (stage == 5) then
  6810.  
  6811.       if (room == 15) then --Power Maze A
  6812.  
  6813.         itemtopos = getItemByID(lines[179]) --fuel capsule
  6814.         doswap = true
  6815.  
  6816.       end
  6817.  
  6818.     end
  6819.  
  6820.     if (doswap == true) then
  6821.  
  6822.       --print("cutscene injection!")
  6823.  
  6824.       writeBytes(target, ((itemtopos & 0xFF0000) >> 16))
  6825.       writeBytes(target+8, (itemtopos & 0xFF))
  6826.  
  6827.     end
  6828.  
  6829.   end
  6830.  
  6831.   debug_continueFromBreakpoint(co_run)
  6832.  
  6833.   return 1
  6834.  
  6835. end
  6836.  
  6837. function FormClose(sender)
  6838. closeCE()
  6839. return caHide --Possible options: caHide, caFree, caMinimize, caNone
  6840. end
  6841.  
  6842. function CEButton1Click(sender) --jill
  6843.  
  6844.   playingas = "jill"
  6845.  
  6846.   setProperty(UDF1.CELabel8,"Caption", "Jill has been chosen on Normal difficulty")
  6847.  
  6848.   local file = TrainerOrigin..'\\ItemListJillNormal.txt'
  6849.   local lines = lines_from(file)
  6850.  
  6851.   local count = 0
  6852.  
  6853.   -- print all line numbers and their contents
  6854.   for k,v in pairs(lines) do
  6855.     count = count + 1
  6856.     --print('line[' .. k .. ']', v)
  6857.   end
  6858.  
  6859.   if (lines[200] ~= "-1") then
  6860.     enemyrando = true
  6861.   end
  6862.  
  6863.   if (lines[400] ~= "-1") then
  6864.     doorrando = true
  6865.   end
  6866.  
  6867.   if (count > 500) then
  6868.     lockrando = true
  6869.   end
  6870.  
  6871.   HookBHD()
  6872.  
  6873.   if (count == 0) then
  6874.  
  6875.     --print('ERROR: ItemList.txt not found, have you generated it using the generator exe?')
  6876.     setProperty(UDF1.CELabel6,"Caption", "NOT FOUND! Generate then relaunch this!")
  6877.     setProperty(UDF1.CELabel6,"Color", 0x0000FF)
  6878.     setProperty(UDF1.CELabel12,"Caption", "ERROR")
  6879.     setProperty(UDF1.CELabel12,"Color", 0x0000FF)
  6880.     canrandomize = false
  6881.  
  6882.   else
  6883.  
  6884.     --print('ItemList found and loaded!')
  6885.     setProperty(UDF1.CELabel6,"Caption", "FOUND!")
  6886.     setProperty(UDF1.CELabel6,"Color", 0x00FF00)
  6887.     setProperty(UDF1.CELabel12,"Caption", "ON")
  6888.     setProperty(UDF1.CELabel12,"Color", 0x00FF00)
  6889.  
  6890.   end
  6891.  
  6892.     setProperty(UDF1.CELabel13,"Caption", "OFF")
  6893.     setProperty(UDF1.CELabel13,"Color", 0x0000FF)
  6894.     setProperty(UDF1.CELabel14,"Caption", "OFF")
  6895.     setProperty(UDF1.CELabel14,"Color", 0x0000FF)
  6896.     setProperty(UDF1.CELabel16,"Caption", "OFF")
  6897.     setProperty(UDF1.CELabel16,"Color", 0x0000FF)
  6898.  
  6899.   if (enemyrando == true) then
  6900.       setProperty(UDF1.CELabel13,"Caption", "ON")
  6901.       setProperty(UDF1.CELabel13,"Color", 0x00FF00)
  6902.   end
  6903.  
  6904.   if (doorrando == true) then
  6905.       setProperty(UDF1.CELabel14,"Caption", "ON")
  6906.       setProperty(UDF1.CELabel14,"Color", 0x00FF00)
  6907.   end
  6908.  
  6909.   if (lockrando == true) then
  6910.       setProperty(UDF1.CELabel16,"Caption", "ON")
  6911.       setProperty(UDF1.CELabel16,"Color", 0x00FF00)
  6912.   end
  6913.  
  6914. end
  6915.  
  6916. function CEButton2Click(sender) --chris
  6917.  
  6918.   playingas = "chris"
  6919.  
  6920.   setProperty(UDF1.CELabel8,"Caption", "Chris has been chosen on Normal difficulty")
  6921.  
  6922.   local file = TrainerOrigin..'\\ItemListChrisNormal.txt'
  6923.   local lines = lines_from(file)
  6924.  
  6925.   local count = 0
  6926.  
  6927.   -- print all line numbers and their contents
  6928.   for k,v in pairs(lines) do
  6929.     count = count + 1
  6930.     --print('line[' .. k .. ']', v)
  6931.   end
  6932.  
  6933.   if (lines[200] ~= "-1") then
  6934.     enemyrando = true
  6935.   end
  6936.  
  6937.   if (lines[400] ~= "-1") then
  6938.     doorrando = true
  6939.   end
  6940.  
  6941.   if (count > 500) then
  6942.     lockrando = true
  6943.   end
  6944.  
  6945.   HookBHD()
  6946.  
  6947.     if (count == 0) then
  6948.  
  6949.     --print('ERROR: ItemList.txt not found, have you generated it using the generator exe?')
  6950.     setProperty(UDF1.CELabel6,"Caption", "NOT FOUND! Generate then relaunch this!")
  6951.     setProperty(UDF1.CELabel6,"Color", 0x0000FF)
  6952.     setProperty(UDF1.CELabel12,"Caption", "ERROR")
  6953.     setProperty(UDF1.CELabel12,"Color", 0x0000FF)
  6954.     canrandomize = false
  6955.  
  6956.   else
  6957.  
  6958.     --print('ItemList found and loaded!')
  6959.     setProperty(UDF1.CELabel6,"Caption", "FOUND!")
  6960.     setProperty(UDF1.CELabel6,"Color", 0x00FF00)
  6961.     setProperty(UDF1.CELabel12,"Caption", "ON")
  6962.     setProperty(UDF1.CELabel12,"Color", 0x00FF00)
  6963.  
  6964.   end
  6965.  
  6966.     setProperty(UDF1.CELabel13,"Caption", "OFF")
  6967.     setProperty(UDF1.CELabel13,"Color", 0x0000FF)
  6968.     setProperty(UDF1.CELabel14,"Caption", "OFF")
  6969.     setProperty(UDF1.CELabel14,"Color", 0x0000FF)
  6970.     setProperty(UDF1.CELabel16,"Caption", "OFF")
  6971.     setProperty(UDF1.CELabel16,"Color", 0x0000FF)
  6972.  
  6973.   if (enemyrando == true) then
  6974.       setProperty(UDF1.CELabel13,"Caption", "ON")
  6975.       setProperty(UDF1.CELabel13,"Color", 0x00FF00)
  6976.   end
  6977.  
  6978.   if (doorrando == true) then
  6979.       setProperty(UDF1.CELabel14,"Caption", "ON")
  6980.       setProperty(UDF1.CELabel14,"Color", 0x00FF00)
  6981.   end
  6982.  
  6983.   if (lockrando == true) then
  6984.       setProperty(UDF1.CELabel16,"Caption", "ON")
  6985.       setProperty(UDF1.CELabel16,"Color", 0x00FF00)
  6986.   end
  6987.  
  6988. end
  6989.  
  6990. function HookBHD()
  6991.  
  6992.   PROCESS_NAME = 'bhd.exe'
  6993.   if getProcessIDFromProcessName(PROCESS_NAME) ~= nil then
  6994.     openProcess(PROCESS_NAME) ---- Open the process
  6995.     local pickupitemadd = getAddress("bhd.exe+20246") --was bhd.exe+20216
  6996.     local dooradd = getAddress("bhd.exe+7D78") --was bhd.exe+7D88
  6997.     local cutsceneadd = getAddress("bhd.exe+E823D") --was bhd.exe+E7E6D
  6998.     local animadd = getAddress("bhd.exe+1F2BC") --was bhd.exe+1F22C
  6999.     local enemyadd = getAddress("bhd.exe+3D3F3") --was bhd.exe+3D2E3
  7000.     local randodooradd = getAddress("bhd.exe+1DAC4") --was bhd.exe+1DAB4
  7001.     debug_setBreakpoint(pickupitemadd)
  7002.     debug_setBreakpoint(dooradd)
  7003.     debug_setBreakpoint(cutsceneadd)
  7004.  
  7005.     if (enemyrando == true) then
  7006.       debug_setBreakpoint(animadd)
  7007.       debug_setBreakpoint(enemyadd)
  7008.     end
  7009.  
  7010.     if (doorrando == true or lockrando == true) then
  7011.       debug_setBreakpoint(randodooradd)
  7012.     end
  7013.  
  7014.     --print('bhd.exe successfully detected and hooked in!')
  7015.     setProperty(UDF1.CELabel4,"Caption", "Hooked in!")
  7016.     setProperty(UDF1.CELabel4,"Color", 0x00FF00)
  7017.   else
  7018.   --print('ERROR: Game not detected, launch game before launching this!')
  7019.     canrandomize = false
  7020.     setProperty(UDF1.CELabel4,"Caption", "Not Hooked in! Launch bhd.exe before this!")
  7021.     setProperty(UDF1.CELabel4,"Color", 0x0000FF)
  7022.   end
  7023.  
  7024.   setProperty(UDF1.CEButton1,"Enabled", false)
  7025.   setProperty(UDF1.CEButton2,"Enabled", false)
  7026.   setProperty(UDF1.CEButton3,"Enabled", false)
  7027.   setProperty(UDF1.CEButton4,"Enabled", false)
  7028.  
  7029. end
  7030.  
  7031. function CEButton3Click(sender)
  7032.  
  7033.   playingas = "jill"
  7034.   difficulty = "hard"
  7035.  
  7036.   setProperty(UDF1.CELabel8,"Caption", "Jill has been chosen on Hard difficulty")
  7037.  
  7038.   local file = TrainerOrigin..'\\ItemListJillHard.txt'
  7039.   local lines = lines_from(file)
  7040.  
  7041.   local count = 0
  7042.  
  7043.   -- print all line numbers and their contents
  7044.   for k,v in pairs(lines) do
  7045.     count = count + 1
  7046.     --print('line[' .. k .. ']', v)
  7047.   end
  7048.  
  7049.   if (lines[200] ~= "-1") then
  7050.     enemyrando = true
  7051.   end
  7052.  
  7053.   if (lines[400] ~= "-1") then
  7054.     doorrando = true
  7055.   end
  7056.  
  7057.   if (count > 500) then
  7058.     lockrando = true
  7059.   end
  7060.  
  7061.   HookBHD()
  7062.  
  7063.     if (count == 0) then
  7064.  
  7065.     --print('ERROR: ItemList.txt not found, have you generated it using the generator exe?')
  7066.     setProperty(UDF1.CELabel6,"Caption", "NOT FOUND! Generate then relaunch this!")
  7067.     setProperty(UDF1.CELabel6,"Color", 0x0000FF)
  7068.     setProperty(UDF1.CELabel12,"Caption", "ERROR")
  7069.     setProperty(UDF1.CELabel12,"Color", 0x0000FF)
  7070.     canrandomize = false
  7071.  
  7072.   else
  7073.  
  7074.     --print('ItemList found and loaded!')
  7075.     setProperty(UDF1.CELabel6,"Caption", "FOUND!")
  7076.     setProperty(UDF1.CELabel6,"Color", 0x00FF00)
  7077.     setProperty(UDF1.CELabel12,"Caption", "ON")
  7078.     setProperty(UDF1.CELabel12,"Color", 0x00FF00)
  7079.  
  7080.   end
  7081.  
  7082.     setProperty(UDF1.CELabel13,"Caption", "OFF")
  7083.     setProperty(UDF1.CELabel13,"Color", 0x0000FF)
  7084.     setProperty(UDF1.CELabel14,"Caption", "OFF")
  7085.     setProperty(UDF1.CELabel14,"Color", 0x0000FF)
  7086.     setProperty(UDF1.CELabel16,"Caption", "OFF")
  7087.     setProperty(UDF1.CELabel16,"Color", 0x0000FF)
  7088.  
  7089.   if (enemyrando == true) then
  7090.       setProperty(UDF1.CELabel13,"Caption", "ON")
  7091.       setProperty(UDF1.CELabel13,"Color", 0x00FF00)
  7092.   end
  7093.  
  7094.   if (doorrando == true) then
  7095.       setProperty(UDF1.CELabel14,"Caption", "ON")
  7096.       setProperty(UDF1.CELabel14,"Color", 0x00FF00)
  7097.   end
  7098.  
  7099.   if (lockrando == true) then
  7100.       setProperty(UDF1.CELabel16,"Caption", "ON")
  7101.       setProperty(UDF1.CELabel16,"Color", 0x00FF00)
  7102.   end
  7103.  
  7104. end
  7105.  
  7106. function CEButton4Click(sender)
  7107.  
  7108.   playingas = "chris"
  7109.   difficulty = "hard"
  7110.  
  7111.   setProperty(UDF1.CELabel8,"Caption", "Chris has been chosen on Hard difficulty")
  7112.  
  7113.   local file = TrainerOrigin..'\\ItemListChrisHard.txt'
  7114.   local lines = lines_from(file)
  7115.  
  7116.   local count = 0
  7117.  
  7118.   -- print all line numbers and their contents
  7119.   for k,v in pairs(lines) do
  7120.     count = count + 1
  7121.     --print('line[' .. k .. ']', v)
  7122.   end
  7123.  
  7124.   if (lines[200] ~= "-1") then
  7125.     enemyrando = true
  7126.   end
  7127.  
  7128.   if (lines[400] ~= "-1") then
  7129.     doorrando = true
  7130.   end
  7131.  
  7132.   if (count > 500) then
  7133.     lockrando = true
  7134.   end
  7135.  
  7136.   HookBHD()
  7137.  
  7138.     if (count == 0) then
  7139.  
  7140.     --print('ERROR: ItemList.txt not found, have you generated it using the generator exe?')
  7141.     setProperty(UDF1.CELabel6,"Caption", "NOT FOUND! Generate then relaunch this!")
  7142.     setProperty(UDF1.CELabel6,"Color", 0x0000FF)
  7143.     setProperty(UDF1.CELabel12,"Caption", "ERROR")
  7144.     setProperty(UDF1.CELabel12,"Color", 0x0000FF)
  7145.     canrandomize = false
  7146.  
  7147.   else
  7148.  
  7149.     --print('ItemList found and loaded!')
  7150.     setProperty(UDF1.CELabel6,"Caption", "FOUND!")
  7151.     setProperty(UDF1.CELabel6,"Color", 0x00FF00)
  7152.     setProperty(UDF1.CELabel12,"Caption", "ON")
  7153.     setProperty(UDF1.CELabel12,"Color", 0x00FF00)
  7154.  
  7155.   end
  7156.  
  7157.     setProperty(UDF1.CELabel13,"Caption", "OFF")
  7158.     setProperty(UDF1.CELabel13,"Color", 0x0000FF)
  7159.     setProperty(UDF1.CELabel14,"Caption", "OFF")
  7160.     setProperty(UDF1.CELabel14,"Color", 0x0000FF)
  7161.     setProperty(UDF1.CELabel16,"Caption", "OFF")
  7162.     setProperty(UDF1.CELabel16,"Color", 0x0000FF)
  7163.  
  7164.   if (enemyrando == true) then
  7165.       setProperty(UDF1.CELabel13,"Caption", "ON")
  7166.       setProperty(UDF1.CELabel13,"Color", 0x00FF00)
  7167.   end
  7168.  
  7169.   if (doorrando == true) then
  7170.       setProperty(UDF1.CELabel14,"Caption", "ON")
  7171.       setProperty(UDF1.CELabel14,"Color", 0x00FF00)
  7172.   end
  7173.  
  7174.   if (lockrando == true) then
  7175.       setProperty(UDF1.CELabel16,"Caption", "ON")
  7176.       setProperty(UDF1.CELabel16,"Color", 0x00FF00)
  7177.   end
  7178.  
  7179. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement