Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.78 KB | None | 0 0
  1. //Spawn helper function
  2. void SpawnObject( string type, vector position, vector orientation )
  3. {
  4. auto obj = GetGame().CreateObject( type, position );
  5. obj.SetPosition( position );
  6. obj.SetOrientation( orientation );
  7. obj.SetOrientation( obj.GetOrientation() ); //Collision fix
  8. obj.Update();
  9. obj.SetAffectPathgraph( true, false );
  10. if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );
  11. }
  12.  
  13. void main()
  14. {
  15. //Spawn helper function
  16. void SpawnObject( string type, vector position, vector orientation )
  17. {
  18. auto obj = GetGame().CreateObject( type, position );
  19. obj.SetPosition( position );
  20. obj.SetOrientation( orientation );
  21. obj.SetOrientation( obj.GetOrientation() ); //Collision fix
  22. obj.Update();
  23. obj.SetAffectPathgraph( true, false );
  24. if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );
  25. }
  26.  
  27. //Your custom spawned objects
  28. SpawnObject( "bldr_Wall_Fen4_D", "7661.746582 175.799377 11552.798828", "-103.987999 0.457473 4.187320" );
  29. SpawnObject( "bldr_Wall_Fen4_8", "7659.641113 175.850830 11558.708008", "72.012703 -2.542550 0.314126" );
  30. SpawnObject( "bldr_plnt_d_FagusSylvatica_fallenb", "7661.890625 176.474380 11555.654297", "79.012604 -19.548401 1.114080" );
  31. SpawnObject( "bldr_plnt_t_FagusSylvatica_1fd", "7660.951660 184.889145 11557.958984", "-0.000293 0.183385 -0.091623" );
  32. SpawnObject( "Barrel_Green", "7661.850098 175.824005 11550.400391", "0.000000 0.000000 0.000000" );
  33. SpawnObject( "bldr_debris_small_house", "7661.850098 175.796387 11545.700195", "0.014653 0.457915 1.832870" );
  34. SpawnObject( "bldr_Garbage_Container", "7662.279297 176.662552 11550.439453", "-8.985347 0.457915 1.832870" );
  35. SpawnObject( "bldr_wheel_cart_dz", "7635.160156 175.597351 11509.500000", "0.006157 -1.924460 -0.183349" );
  36. SpawnObject( "bldr_container_1c", "7674.301270 175.962799 11513.444336", "-14.993799 -0.924455 -0.183349" );
  37. SpawnObject( "bldr_misc_concretepanels", "7671.909668 175.341644 11512.838867", "-17.046200 4.117650 -0.643274" );
  38. SpawnObject( "bldr_hbarrier_6m", "7672.898926 175.796005 11530.372070", "-16.993799 -0.283315 2.724930" );
  39. SpawnObject( "bldr_mil_camonet_roof_nato", "7671.026855 175.975296 11558.668945", "-73.872009 4.474640 2.111380" );
  40. SpawnObject( "bldr_roadblock_cncblocks_long", "7669.503418 175.831070 11553.454102", "-57.014603 -1.008100 0.825236" );
  41. SpawnObject( "bldr_roadblock_cncblock", "7671.727539 175.342880 11551.863281", "-0.076991 -1.002400 4.392331" );
  42. SpawnObject( "bldr_tent_table", "7670.811035 175.419540 11554.708008", "36.771400 -2.913010 2.488540" );
  43. SpawnObject( "bldr_misc_barbedwire", "7671.077148 175.463699 11562.534180", "-8.000011 -1.934750 4.482730" );
  44. SpawnObject( "bldr_T34", "7672.879883 174.751999 11557.700195", "-0.026685 -1.282650 1.191920" );
  45. SpawnObject( "bldr_Misc_WoodenCrate_3x", "7670.139160 175.599518 11559.229492", "-0.085714 -1.093180 4.483550" );
  46. SpawnObject( "bldr_Forest_DeerSkeleton_Full", "7677.568359 175.411957 11522.501953", "-37.085705 -1.106000 8.797241" );
  47. SpawnObject( "bldr_tank_small_white", "7649.710449 177.366928 11563.994141", "-20.919100 0.196014 0.109184" );
  48. SpawnObject( "bldr_mil_reinforcedtank2_shelter2", "7688.760254 184.075150 11566.305664", "81.051498 -1.189410 -2.474210" );
  49. SpawnObject( "bldr_locker_closed_v1", "7667.229980 175.653503 11479.200195", "-165.020004 0.824494 -1.374920" );
  50. SpawnObject( "bldr_metalcrate", "7663.549805 175.493515 11480.400391", "0.030783 -1.282470 -1.375120" );
  51. SpawnObject( "bldr_box_c", "7666.479980 175.618942 11479.500000", "4.030780 -2.282470 -1.375120" );
  52. SpawnObject( "bldr_wall_board_02", "7662.412598 175.943375 11480.205078", "-73.969299 -2.282470 0.624877" );
  53. SpawnObject( "bldr_pultskasou", "7664.103027 176.113235 11482.816406", "13.030800 -1.282470 -1.375120" );
  54. SpawnObject( "bldr_shelf_1side", "7667.901855 175.548004 11482.751953", "10.030802 -1.282470 -1.375120" );
  55. SpawnObject( "bldr_fluor_lamp", "7655.390137 174.844971 11493.500000", "0.030783 -1.282470 -1.375120" );
  56. SpawnObject( "bldr_misc_through_trailer", "7666.360352 175.518814 11494.536133", "0.030783 -1.282470 -1.375120" );
  57. SpawnObject( "bldr_misc_tirepile", "7618.815430 181.603012 11505.948242", "0.401686 -5.745800 -4.005770" );
  58. SpawnObject( "bldr_Misc_FeedRack", "7637.195313 176.027435 11471.702148", "0.401686 -5.745800 -4.005770" );
  59. SpawnObject( "bldr_Misc_Sunshade", "7656.022461 176.416214 11481.253906", "0.401686 -3.745800 -0.005767" );
  60. SpawnObject( "bldr_Misc_WoodTable_Outdoor", "7658.215820 175.730057 11480.643555", "15.091997 -1.186050 -3.087570" );
  61. SpawnObject( "bldr_Misc_WoodTable_Outdoor", "7654.895996 175.553436 11481.244141", "-3.908030 0.813954 -2.087580" );
  62. SpawnObject( "bldr_Cemetery_Tombstone2", "7641.145996 175.988358 11472.600586", "-0.908032 12.814000 -4.087571" );
  63. SpawnObject( "bldr_ConcretePanels_02_four_F", "7667.562012 175.459183 11485.065430", "13.033703 -0.915470 -2.107760" );
  64. SpawnObject( "bldr_ConcretePanels_02_four_F", "7665.651855 175.662903 11477.365234", "14.055703 -1.739360 -1.833790" );
  65. SpawnObject( "bldr_ConcretePanels_02_four_F", "7663.761719 175.280930 11487.265625", "12.064500 -2.013930 -1.834080" );
  66. SpawnObject( "bldr_ConcretePanels_02_four_F", "7659.892090 175.111496 11488.765625", "12.064502 -1.013930 -1.834091" );
  67. SpawnObject( "bldr_ConcretePanels_02_four_F", "7662.071777 175.460815 11479.465820", "12.057100 -1.188890 -2.748580" );
  68. SpawnObject( "bldr_ConcretePanels_02_four_F", "7655.961914 174.935638 11490.065430", "12.066799 -0.738575 -2.200140" );
  69. SpawnObject( "bldr_ConcretePanels_02_four_F", "7654.291992 175.021378 11482.165039", "11.079000 -1.645800 -2.749250" );
  70. SpawnObject( "bldr_ConcretePanels_02_four_F", "7658.111816 175.227539 11480.965820", "11.057099 -1.188890 -2.748580" );
  71. SpawnObject( "Land_Misc_Scaffolding", "7655.556641 178.708893 11546.262695", "164.036011 1.740520 1.192180" );
  72. SpawnObject( "Land_Misc_Through_Static", "7643.140137 175.511307 11473.286133", "-22.991199 -0.366415 0.625053" );
  73. SpawnObject( "Land_Mil_GuardHouse3", "7664.343262 176.807388 11481.478516", "12.980203 -1.175510 -1.374920" );
  74. SpawnObject( "Land_Misc_Well_Pump_Blue", "7662.346191 175.877106 11483.576172", "-99.961105 -1.282020 2.258290" );
  75. SpawnObject( "Land_Lamp_City1_amp", "7660.052246 179.665970 11476.259766", "0.051391 -1.189410 -2.474210" );
  76. SpawnObject( "Land_Shed_W2", "7659.547852 175.569931 11473.346680", "34.026604 -0.640644 -2.382230" );
  77. SpawnObject( "Land_FuelStation_Feed", "7662.030273 176.522903 11485.247070", "-76.956200 -2.914600 0.251534" );
  78. SpawnObject( "Land_Lunapark_Shooting_Gallery", "7653.546387 176.448578 11501.444336", "-58.981800 -0.839405 -0.367219" );
  79. SpawnObject( "Land_Wreck_Caravan_MRust", "7614.632324 179.145462 11425.599609", "-10.963099 -0.648908 -1.283740" );
  80. SpawnObject( "Land_Wreck_Volha_Blue", "7589.052734 176.251480 11451.299805", "1.018190 -0.839405 -0.367217" );
  81. SpawnObject( "Land_Wreck_Harverster", "7632.872559 177.184387 11497.039063", "0.040042 4.429831 -0.643001" );
  82. SpawnObject( "Land_Workshop_FuelStation", "7562.608887 177.978622 11440.716797", "-8.792712 1.175560 -0.333331" );
  83. SpawnObject( "Land_Ruin_Slum_House3", "7553.133301 176.310425 11446.364258", "-9.976241 -2.473450 -0.550513" );
  84. SpawnObject( "bldr_wall_tin_5", "7567.277344 176.711166 11453.216797", "168.000000 -2.017240 -1.008310" );
  85. SpawnObject( "bldr_wall_tin_5", "7572.017090 176.581802 11454.016602", "-12.000000 -2.017240 -0.366626" );
  86. SpawnObject( "bldr_wall_tin_5", "7576.917480 176.571838 11454.816406", "-9.000000 -2.650280 0.366626" );
  87. SpawnObject( "bldr_wall_tin_5", "7581.337402 176.517105 11455.616211", "-11.000000 -3.843150 -0.366626" );
  88. SpawnObject( "bldr_wall_tin_5", "7585.817383 176.448303 11456.216797", "-4.999999 -2.017240 0.091763" );
  89. SpawnObject( "bldr_wall_tin_5", "7588.037109 176.412811 11456.616211", "-3.000021 -2.017240 0.091763" );
  90. SpawnObject( "bldr_Wall_CncBarrier_4Block", "7572.270508 176.780640 11440.412109", "-8.980640 -2.015800 -0.550341" );
  91. SpawnObject( "bldr_Wall_CncBarrier_4Block", "7590.164063 176.757858 11443.029297", "-8.980640 -1.015800 -0.550340" );
  92. SpawnObject( "bldr_Wall_Fen4_4_nolc", "7592.327148 175.410385 11454.702148", "-100.004013 -2.565260 0.091855" );
  93. SpawnObject( "bldr_Wall_Fen4_4_nolc", "7592.847168 175.584122 11450.801758", "-96.004303 -2.565260 0.091855" );
  94. SpawnObject( "bldr_Wall_IndCnc3_2_4", "7566.800293 176.165588 11452.321289", "-7.981820 -2.839400 -0.829684" );
  95. SpawnObject( "bldr_Wall_IndCnc3_2_4", "7560.719238 176.733521 11451.121094", "-14.970104 -1.556890 -2.214280" );
  96. SpawnObject( "Land_Rail_Station_Small", "7584.391602 175.804657 11563.885742", "-16.964504 -2.015370 -0.008931" );
  97. SpawnObject( "Land_BusStop_City", "7590.166016 177.108368 11439.634766", "-8.983580 -2.565020 -0.366994" );
  98. SpawnObject( "Land_Misc_Toilet_Mobile", "7555.903809 177.214172 11442.818359", "0.018185 -2.839550 -0.367077" );
  99. SpawnObject( "Land_Camp_House_red", "7638.863281 181.592438 11406.255859", "165.041000 2.168110 -0.283862" );
  100. SpawnObject( "Land_Train_Wagon_Box", "7641.279297 176.354919 11585.615234", "-112.000000 -1.091760 -0.091623" );
  101. SpawnObject( "Land_Wreck_Tractor", "7619.485352 175.611542 11476.393555", "-0.000147 -0.091623 0.091623" );
  102. SpawnObject( "bldr_Lamp_City3", "7592.300781 179.804459 11450.060547", "0.020539 -3.205140 -0.367341" );
  103. SpawnObject( "bldr_Misc_Bench4", "7590.735352 176.548096 11441.260742", "169.018982 -1.015800 0.449659" );
  104. SpawnObject( "bldr_Misc_CrashBarrier", "7569.110840 176.282684 11439.559570", "-6.976241 -2.473160 -1.074410" );
  105. SpawnObject( "bldr_Misc_NoticeBoard1", "7575.291016 176.883652 11439.528320", "-8.981817 -2.839550 -0.367077" );
  106. SpawnObject( "bldr_Misc_WoodPile1", "7593.580566 176.140015 11442.111328", "0.016424 -2.565020 -0.366994" );
  107. SpawnObject( "bldr_plnt_b_prunusSpinosa_1s_summer", "7594.800781 177.503555 11441.081055", "0.018185 -2.839550 -0.367077" );
  108. SpawnObject( "bldr_plnt_b_prunusSpinosa_2s_summer", "7567.934570 178.208450 11451.848633", "0.018185 -2.839550 -0.367077" );
  109. SpawnObject( "bldr_plnt_d_BetulaPendula_stump", "7593.935547 177.312057 11445.296875", "0.029523 -2.088630 -0.810004" );
  110. SpawnObject( "bldr_plnt_b_sambucusNigra_1s_summer", "7568.725586 177.675125 11438.437500", "0.034024 -2.656120 -0.734151" );
  111. SpawnObject( "bldr_plnt_b_caraganaArborescens_2s_summer", "7573.692871 177.981735 11437.017578", "0.019359 -2.015800 -0.550341" );
  112. SpawnObject( "Land_Construction_House1", "7549.855957 176.412582 11530.233398", "-18.953102 -1.831610 -1.467230" );
  113. SpawnObject( "Land_Container_1Mo", "7537.098633 175.362610 11527.007813", "0.003519 -0.366593 -0.550011" );
  114. SpawnObject( "Land_Barn_Brick2", "7802.379883 185.817886 11435.949219", "-11.995599 -2.549960 -0.458404" );
  115. SpawnObject( "Land_Lighthouse", "6671.393066 180.853027 11064.151367", "-0.989441 1.350330 0.633222" );
  116. SpawnObject( "Land_Misc_Polytunnel", "7617.049316 176.446304 11461.967773", "0.020967 -1.191120 -1.008520" );
  117. SpawnObject( "bldr_Dead_pile1", "7613.915039 179.435196 11398.041992", "-0.003519 0.549978 -0.366643" );
  118. SpawnObject( "bldr_sign_oneway", "7585.750000 176.864563 11442.178711", "0.019359 -2.015800 -0.550341" );
  119. SpawnObject( "bldr_Target_Concrete1", "7592.123535 176.403915 11461.541992", "-0.172363 -3.470810 2.844740" );
  120. SpawnObject( "bldr_plnt_t_FagusSylvaticaE_2s_summer", "7594.067383 182.613647 11463.013672", "-0.013194 -0.549684 1.374980" );
  121. SpawnObject( "bldr_plnt_t_FagusSylvaticaE_2s_summer", "7640.778809 182.750275 11500.511719", "0.077240 2.837420 1.559960" );
  122. SpawnObject( "bldr_plnt_t_juglansRegia_2s_summer", "7669.025391 182.242615 11495.512695", "-0.002932 -0.366603 0.458254" );
  123. SpawnObject( "bldr_plnt_t_juglansRegia_3s_summer", "7603.449219 183.034805 11498.620117", "0.000587 -0.183243 -0.183386" );
  124. SpawnObject( "bldr_plnt_t_malusDomestica_3s_summer", "7645.502930 182.002396 11516.575195", "-0.077414 4.025520 -1.102620" );
  125. SpawnObject( "bldr_Garbage_Pile8", "7613.559082 175.410370 11502.625000", "0.022424 1.648550 3.117060" );
  126. SpawnObject( "bldr_Slum_Roof6", "7640.252441 176.199921 11503.187500", "24.922600 4.025520 -1.102620" );
  127. SpawnObject( "Land_Smokestack_Medium", "7613.080078 199.350006 11542.416992", "76.005302 1.633450 -0.825127" );
  128. SpawnObject( "GardenPlot", "7595.726074 175.260529 11506.560547", "1.012320 0.358483 -1.099970" );
  129. SpawnObject( "Land_Misc_DeerStand1", "7696.516113 178.038727 11548.353516", "0.012317 -0.641517 -1.099970" );
  130. SpawnObject( "Land_Misc_DeerStand1", "7594.012207 179.244003 11445.389648", "-8.953808 -3.204610 -0.826260" );
  131. SpawnObject( "Land_Misc_Greenhouse", "7599.115723 176.203445 11467.203125", "176.065979 1.253470 -1.376500" );
  132. SpawnObject( "Land_Misc_TrailRoof_Small", "7615.699707 175.717300 11493.040039", "-0.955415 0.521226 -0.734717" );
  133. SpawnObject( "Land_Mil_GuardBox_Smooth", "7624.949219 175.874420 11464.704102", "0.012317 -0.641517 -1.099970" );
  134. SpawnObject( "bldr_bilboard_bienvenudo", "7600.116211 178.780563 11451.375977", "0.000000 0.000000 0.000000" );
  135. SpawnObject( "bldr_sawhorse_dz", "7636.049805 175.209686 11498.500000", "0.022424 0.824359 1.558210" );
  136. SpawnObject( "bldr_Garbage_Bin", "7658.325684 175.396927 11497.884766", "0.022424 0.824359 1.558210" );
  137. SpawnObject( "bldr_Garbage_GroundSq_5m", "7655.922363 174.815552 11495.828125", "0.000000 0.000000 0.000000" );
  138. SpawnObject( "bldr_misc_concretepanels", "7672.987305 175.783203 11498.815430", "0.016425 1.282990 0.733547" );
  139. SpawnObject( "bldr_misc_haybale_decayed", "7649.560547 175.320602 11499.272461", "0.000000 0.825054 -1.374780" );
  140. SpawnObject( "bldr_misc_pallets1", "7656.104004 175.016190 11502.414063", "-0.016425 -1.282990 0.733547" );
  141. SpawnObject( "bldr_misc_pallets3", "7659.615723 175.577103 11477.601563", "-0.019788 0.824494 -1.374920" );
  142. SpawnObject( "bldr_misc_timbers4", "7630.294434 175.892883 11464.440430", "-48.969196 -1.548630 -2.069659" );
  143. SpawnObject( "bldr_tank_small_gas", "7667.180664 179.736969 11480.782227", "11.000600 -0.183243 -0.183386" );
  144. SpawnObject( "bldr_hbarrier_round", "7655.106445 175.654663 11476.748047", "16.036200 -0.259476 0.192175" );
  145. SpawnObject( "bldr_roadblock_bags_endr", "7651.469727 175.649780 11478.038086", "-5.966310 -0.915470 -2.107760" );
  146. SpawnObject( "bldr_roadblock_cncblocks_short", "7655.228027 175.600769 11493.271484", "14.033698 -0.915470 -2.107760" );
  147. SpawnObject( "bldr_tent_pallets", "7656.837891 175.186417 11492.489258", "0.000587 -0.183243 -0.183386" );
  148. SpawnObject( "bldr_misc_barbedwire", "7660.297363 175.869263 11492.634766", "14.999999 1.742080 -2.107501" );
  149. SpawnObject( "bldr_misc_concreteblock2_damaged", "7659.310547 175.209518 11498.919922", "-57.019791 0.824494 -1.374920" );
  150. SpawnObject( "bldr_misc_concreteblock2_damaged", "7653.074219 175.211288 11502.798828", "-52.019798 0.824494 -1.374920" );
  151. SpawnObject( "bldr_misc_hedgehog_concrete", "7665.253418 175.749268 11491.262695", "0.000000 -0.183246 -0.183385" );
  152. SpawnObject( "bldr_misc_hedgehog_concrete", "7666.133301 175.883484 11489.762695", "0.000000 -1.742080 -1.191480" );
  153. SpawnObject( "bldr_misc_range_line", "7641.598633 176.515289 11513.668945", "-16.008202 2.565100 -0.183569" );
  154. SpawnObject( "bldr_misc_range_roof", "7594.968750 176.447052 11513.833984", "81.036301 1.740520 1.192180" );
  155. SpawnObject( "bldr_misc_range_single", "7654.933105 175.778549 11491.156250", "0.033691 -0.915470 -2.107760" );
  156. SpawnObject( "bldr_sign_build_altar", "7661.439941 178.645096 11485.224609", "12.033705 -0.915470 -2.107761" );
  157. SpawnObject( "bldr_sign_build_chernobus", "7665.899902 175.482727 11485.700195", "0.007902 -0.182904 -2.473690" );
  158. SpawnObject( "bldr_sign_camp_arsenevo", "7652.399902 174.978302 11480.099609", "103.026001 0.359351 -1.382230" );
  159. SpawnObject( "bldr_path_panels_damaged", "7652.541992 174.937454 11491.825195", "-0.019788 0.884476 -1.844840" );
  160. SpawnObject( "bldr_path_panels_damaged", "7652.881836 175.103790 11491.820313", "-0.019788 0.889343 -1.849509" );
  161. SpawnObject( "bldr_plnt_b_rosaCanina_1s", "7654.184082 175.754593 11493.592773", "-0.008216 2.565100 -0.183569" );
  162. SpawnObject( "bldr_Misc_Sandbox", "7595.838867 174.814713 11506.559570", "0.000587 -0.183243 -0.183386" );
  163. SpawnObject( "bldr_Misc_Toilet_Dry", "7642.519043 176.712357 11502.091797", "-35.948601 -1.189410 -2.474210" );
  164. SpawnObject( "bldr_Misc_Well", "7624.610840 175.870926 11513.722656", "-0.087101 4.936640 -1.012060" );
  165. SpawnObject( "bldr_ch_mod_c", "7665.220215 175.383255 11485.500000", "0.027314 -1.453760 -1.076480" );
  166. SpawnObject( "bldr_flowers_02", "7664.720215 175.366791 11485.599609", "0.044068 -1.365910 -1.848060" );
  167. SpawnObject( "bldr_radio_b", "7668.259766 175.566010 11485.400391", "0.044068 -1.365910 -1.848060" );
  168. SpawnObject( "bldr_radio_b", "7667.319824 175.552399 11484.700195", "0.044068 -1.365910 -1.848060" );
  169. SpawnObject( "bldr_sign_food", "7650.582520 175.742462 11500.533203", "-0.019788 0.824494 -1.374920" );
  170. SpawnObject( "bldr_TrailSign_18_PolanaE", "7611.499023 177.077606 11450.265625", "0.036215 1.740520 1.192180" );
  171. SpawnObject( "bldr_TrailSign_19_Swarog", "7625.012207 175.893494 11477.262695", "122.999016 -0.908378 -0.183246" );
  172. SpawnObject( "bldr_Misc_Table_Camp", "7660.382813 175.269699 11498.135742", "-0.019788 0.824494 -1.374920" );
  173. SpawnObject( "bldr_Pumpkin", "7654.649902 174.749466 11499.599609", "-0.016425 -1.282990 0.733547" );
  174. SpawnObject( "bldr_Pumpkin", "7652.870117 174.765488 11500.099609", "0.016425 1.282990 0.733547" );
  175. SpawnObject( "bldr_Sardines", "7653.640137 174.753403 11500.000000", "-0.016425 -1.282990 0.733547" );
  176. SpawnObject( "Cleaver", "7652.830078 175.561996 11500.000000", "6.000000 -69.000000 0.000000" );
  177. SpawnObject( "Land_Lunapark_Autodrome", "7579.559570 176.579239 11448.385742", "-7.964514 -2.015366 -0.008931" );
  178. SpawnObject( "bldr_Target_Concrete_Block", "7563.246094 175.131165 11435.951172", "-6.958947 5.168111 -0.283862" );
  179. SpawnObject( "bldr_Panel_Concrete_Small_2", "7565.628418 176.293259 11435.339844", "-75.959045 0.168108 -3.283862" );
  180. SpawnObject( "bldr_Panel_Concrete_Small_2", "7561.786621 176.302399 11435.366211", "-95.002686 -1.649731 -3.908199" );
  181. SpawnObject( "bldr_Panel_Concrete_Small_2", "7558.799316 176.286758 11435.428711", "0.036946 5.351093 -1.283738" );
  182. SpawnObject( "bldr_ConcretePanels_02_four_F", "7581.475098 176.063232 11439.638672", "-98.951836 -1.014830 -5.375629" );
  183. //Traderspawns
  184. SpawnObject( "BookBible", "7665.290039 175.783005 11484.799805", "0.000000 0.000000 0.000000" );
  185. SpawnObject( "BookTheWarOfTheWorlds", "7655.379883 175.979004 11503.700195", "0.000000 0.000000 0.000000" );
  186.  
  187. //INIT WEATHER BEFORE ECONOMY INIT------------------------
  188. Weather weather = g_Game.GetWeather();
  189.  
  190. weather.MissionWeather(false); // false = use weather controller from Weather.c
  191.  
  192. weather.GetOvercast().Set( Math.RandomFloatInclusive(0.02, 0.1), 1, 0);
  193. weather.GetRain().Set( 0, 1, 0);
  194. weather.GetFog().Set( 0, 1, 0);
  195.  
  196. //INIT ECONOMY--------------------------------------
  197. Hive ce = CreateHive();
  198. if ( ce )
  199. ce.InitOffline();
  200.  
  201. //DATE RESET AFTER ECONOMY INIT-------------------------
  202. int year, month, day, hour, minute;
  203. int reset_month = 8, reset_day = 10;
  204. GetGame().GetWorld().GetDate(year, month, day, hour, minute);
  205.  
  206. if ((month == reset_month) && (day < reset_day))
  207. {
  208. GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
  209. }
  210. else
  211. {
  212. if ((month == reset_month + 1) && (day > reset_day))
  213. {
  214. GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
  215. }
  216. else
  217. {
  218. if ((month < reset_month) || (month > reset_month + 1))
  219. {
  220. GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
  221. }
  222. }
  223. }
  224. }
  225.  
  226. class CustomMission: MissionServer
  227. {
  228. void SetRandomHealth(EntityAI itemEnt)
  229. {
  230. if ( itemEnt )
  231. {
  232. int rndHlt = Math.RandomInt(55,100);
  233. itemEnt.SetHealth("","",rndHlt);
  234. }
  235. }
  236.  
  237. override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
  238. {
  239. Entity playerEnt;
  240. playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");//Creates random player
  241. Class.CastTo(m_player, playerEnt);
  242.  
  243. GetGame().SelectPlayer(identity, m_player);
  244.  
  245. return m_player;
  246. }
  247.  
  248. override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
  249. {
  250. EntityAI itemTop;
  251. EntityAI itemEnt;
  252. ItemBase itemBs;
  253. float rand;
  254.  
  255. itemTop = player.FindAttachmentBySlotName("Body");
  256.  
  257. if ( itemTop )
  258. {
  259. itemEnt = itemTop.GetInventory().CreateInInventory("Rag");
  260. if ( Class.CastTo(itemBs, itemEnt ) )
  261. itemBs.SetQuantity(4);
  262.  
  263. SetRandomHealth(itemEnt);
  264.  
  265. string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" };
  266. int rndIndex = Math.RandomInt(0, 4);
  267. itemEnt = itemTop.GetInventory().CreateInInventory(chemlightArray[rndIndex]);
  268. SetRandomHealth(itemEnt);
  269. }
  270. }
  271. };
  272.  
  273. Mission CreateCustomMission(string path)
  274. {
  275. return new CustomMission();
  276. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement