Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 42.80 KB | None | 0 0
  1. #include common_scripts\utility;
  2. #include maps\mp\_utility;
  3. #include maps\mp\gametypes\_hud_util;
  4.  
  5. init()
  6. {
  7.     level.doCustomMap = 0;
  8.     level.doorwait = 0.3;
  9.     level.elevator_model["enter"] = maps\mp\gametypes\_teams::getTeamFlagModel( "allies" );
  10.     level.elevator_model["exit"] = maps\mp\gametypes\_teams::getTeamFlagModel( "axis" );
  11.     precacheModel( level.elevator_model["enter"] );
  12.     precacheModel( level.elevator_model["exit"] );
  13.     wait 1;
  14.     if(getDvar("mapname") == "mp_afghan"){ /** Afghan **/
  15.         level thread Afghan();
  16.         level.doCustomMap = 1;
  17.     }
  18.     if(getDvar("mapname") == "mp_boneyard"){ /** Scrapyard **/
  19.         level thread Scrapyard();
  20.         level.doCustomMap = 1;
  21.     }
  22.     if(getDvar("mapname") == "mp_brecourt"){ /** Wasteland **/
  23.         level thread Wasteland();
  24.         level.doCustomMap = 1;
  25.     }
  26.     if(getDvar("mapname") == "mp_checkpoint"){ /** Karachi **/
  27.         level thread Karachi();
  28.         level.doCustomMap = 1;
  29.     }
  30.     if(getDvar("mapname") == "mp_derail"){ /** Derail **/
  31.         level thread Derail();
  32.         level.doCustomMap = 1;
  33.     }
  34.     if(getDvar("mapname") == "mp_estate"){ /** Estate **/
  35.         level thread Estate();
  36.         level.doCustomMap = 1;
  37.     }
  38.     if(getDvar("mapname") == "mp_favela"){ /** Favela **/
  39.         level thread Favela();
  40.         level.doCustomMap = 1;
  41.     }
  42.     if(getDvar("mapname") == "mp_highrise"){ /** HighRise **/
  43.         level thread HighRise();
  44.         level.doCustomMap = 1;
  45.     }
  46.     if(getDvar("mapname") == "mp_nightshift"){ /** Skidrow **/
  47.         level thread Skidrow();
  48.         level.doCustomMap = 1;
  49.     }
  50.     if(getDvar("mapname") == "mp_invasion"){ /** Invasion **/
  51.         level thread Invasion();
  52.         level.doCustomMap = 1;
  53.     }
  54.     if(getDvar("mapname") == "mp_quarry"){ /** Quarry **/
  55.         level thread Quarry();
  56.         level.doCustomMap = 1;
  57.     }
  58.     if(getDvar("mapname") == "mp_rundown"){ /** Rundown **/
  59.         level thread Rundown();
  60.         level.doCustomMap = 1;
  61.     }
  62.     if(getDvar("mapname") == "mp_rust"){ /** Rust **/
  63.         level thread Rust();
  64.         level.doCustomMap = 1;
  65.     }
  66.     if(getDvar("mapname") == "mp_subbase"){ /** SubBase **/
  67.         level thread SubBase();
  68.         level.doCustomMap = 1;
  69.     }
  70.     if(getDvar("mapname") == "mp_terminal"){ /** Terminal **/
  71.         level thread Terminal();
  72.         level.doCustomMap = 1;
  73.     }
  74.     if(getDvar("mapname") == "mp_underpass"){ /** Underpass **/
  75.         level thread Underpass();
  76.         level.doCustomMap = 1;
  77.     }
  78.    
  79.    
  80.     /**************** DLC ******************/
  81.    
  82.    
  83.     if(getDvar("mapname") == "mp_abandon"){ /** Carnival **/
  84.         level thread Carnival();
  85.         level.doCustomMap = 1;
  86.     }
  87.     if(getDvar("mapname") == "mp_complex"){ /** Bailout **/
  88.         level thread Bailout();
  89.         level.doCustomMap = 1;
  90.     }
  91.     if(level.doCustomMap == 1)
  92.     {
  93.         level.gameState = "starting";
  94.         level thread CreateMapWait();
  95.     }
  96.     else
  97.     {
  98.         level.gameState = "starting";
  99.         wait 15;
  100.         level notify("CREATED");
  101.     }
  102. }
  103.  
  104. CreateMapWait()
  105. {
  106.     for(i = 15; i > 0; i--)
  107.     {
  108.         level.TimerText destroy();
  109.         level.TimerText = level createServerFontString( "objective", 1.5 );
  110.         level.TimerText setPoint( "CENTER", "CENTER", 0, -100 );
  111.         level.TimerText setText("^3Wait for the map to be created: " + i);
  112.         foreach(player in level.players)
  113.         {
  114.             player freezeControls(true);
  115.             player VisionSetNakedForPlayer("mpIntro", 0);
  116.         }
  117.         wait 1;
  118.     }
  119.     level notify("CREATED");
  120.     foreach(player in level.players)
  121.     {
  122.         player freezeControls(false);
  123.         player VisionSetNakedForPlayer(getDvar("mapname"), 0);
  124.     }
  125. }
  126.  
  127. BuildBunker(start_x, start_y, start_z, floorlength)
  128. {  
  129.     // Default floorlength is 12
  130.     // Set floorlength to 0 for no floor
  131.    
  132.     box_x = 55; // Set box length (X)
  133.     box_y = 30; // Set box width (Y)
  134.     box_z = 27; // Set box height (Z)
  135.    
  136.     axis_x = start_x; // Start X position
  137.     axis_y = start_y; // Start Y position
  138.     axis_z = start_z; // Start Z position
  139.    
  140.     // Build wall left
  141.     for( i=0; i < 5; i++ ) // Z Axis
  142.     {
  143.         block = spawn( "script_model", self.origin );
  144.         block setModel( "com_plasticcase_friendly" );
  145.         block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  146.         block.origin = (axis_x, axis_y, axis_z+(1*box_z)+(i*box_z));
  147.        
  148.         for( e=1; e < 11; e++ ) // Y Axis
  149.         {
  150.             if(i != 2 && i != 3 )
  151.             {
  152.                 block = spawn( "script_model", self.origin );
  153.                 block setModel( "com_plasticcase_friendly" );
  154.                 block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  155.                 block.origin = (axis_x, axis_y+(e*box_y), axis_z+(1*box_z)+(i*box_z));
  156.                 wait 0.01;
  157.             }
  158.         }
  159.     }
  160.    
  161.     // Build wall right
  162.     for( i=0; i < 5; i++ ) // Z Axis
  163.     {
  164.         block = spawn( "script_model", self.origin );
  165.         block setModel( "com_plasticcase_friendly" );
  166.         block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  167.         block.origin = (axis_x+(5*box_x), axis_y, axis_z+(1*box_z)+(i*box_z));
  168.        
  169.         for( e=1; e < 11; e++ ) // Y Axis
  170.         {
  171.             if(i != 2 && i != 3 )
  172.             {
  173.                 block = spawn( "script_model", self.origin );
  174.                 block setModel( "com_plasticcase_friendly" );
  175.                 block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  176.                 block.origin = (axis_x+(5*box_x), axis_y+(e*box_y), axis_z+(1*box_z)+(i*box_z));
  177.                 wait 0.01;
  178.             }
  179.         }
  180.     }
  181.    
  182.     // Build wall back
  183.     for( i=0; i < 5; i++ ) // Z Axis
  184.     {
  185.         block = spawn( "script_model", self.origin );
  186.         block setModel( "com_plasticcase_friendly" );
  187.         block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  188.         block.origin = (axis_x, axis_y+(11*box_y), axis_z+(i*box_z)+(1*box_z));
  189.        
  190.         for( e=1; e < 5; e++ ) // Y Axis
  191.         {
  192.             if(i != 2 && i != 3 )
  193.             {
  194.                 block = spawn( "script_model", self.origin );
  195.                 block setModel( "com_plasticcase_friendly" );
  196.                 block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  197.                 block.origin = (axis_x+(e*box_x), axis_y+(11*box_y), axis_z+(i*box_z)+(1*box_z));
  198.                 wait 0.01;
  199.             }
  200.         }
  201.     }
  202.    
  203.     for( i=0; i < 5; i++ ) // Z Axis
  204.     {
  205.         block = spawn( "script_model", self.origin );
  206.         block setModel( "com_plasticcase_friendly" );
  207.         block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  208.         block.origin = (axis_x+(5*box_x), axis_y+(11*box_y), axis_z+(i*box_z)+(1*box_z));
  209.         wait 0.01;
  210.     }
  211.  
  212.     // Build wall front
  213.     for( i=0; i < 4; i++ ) // Y Axis
  214.     {
  215.         block = spawn( "script_model", self.origin );
  216.         block setModel( "com_plasticcase_friendly" );
  217.         block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  218.         block.origin = (axis_x+(1*box_x)+(i*box_x), axis_y, axis_z+(5*box_z));
  219.        
  220.         for( e=4; e > 0; e-- ) // Z Axis
  221.         {
  222.             if(i != 1 && i != 2 )
  223.             {
  224.                 block = spawn( "script_model", self.origin );
  225.                 block setModel( "com_plasticcase_friendly" );
  226.                 block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  227.                 block.origin = (axis_x+(1*box_x)+(i*box_x), axis_y, axis_z-(e*box_z)+(5*box_z));
  228.                 wait 0.01;
  229.             }
  230.         }
  231.     }
  232.    
  233.     // Build stair 1
  234.     self.stair = 0;
  235.     for( i=0; i < 10; i++ )
  236.     {
  237.         block = spawn( "script_model", self.origin );
  238.         block setModel( "com_plasticcase_friendly" );
  239.         block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  240.         block.origin = (axis_x+(1*box_x), axis_y+(1*box_y)+(self.stair*box_y)+5, axis_z+(i*16));
  241.         self.stair++;
  242.         wait 0.01;
  243.     }
  244.  
  245.     // Build roof
  246.     for( i=0; i < 6; i++ ) // X Axis
  247.     {
  248.         block = spawn( "script_model", self.origin );
  249.         block setModel( "com_plasticcase_friendly" );
  250.         block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  251.         block.origin = (axis_x+(i*box_x), axis_y, axis_z+(6*box_z));
  252.        
  253.         for( e=0; e < 12; e++ ) // Y Axis
  254.         {
  255.             if(i != 1)
  256.             {
  257.                 block = spawn( "script_model", self.origin );
  258.                 block setModel( "com_plasticcase_friendly" );
  259.                 block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  260.                 block.origin = (axis_x+(i*box_x), axis_y+(e*box_y), axis_z+(6*box_z));
  261.                 wait 0.01;
  262.             }
  263.         }
  264.     }
  265.    
  266.     // Fix hole on top of stars
  267.     block = spawn( "script_model", self.origin );
  268.     block setModel( "com_plasticcase_friendly" );
  269.     block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  270.     block.origin = (axis_x+(1*box_x), axis_y+(11*box_y), axis_z+(6*box_z));
  271.    
  272.     // Build floor
  273.     if(floorlength < 0)
  274.     {
  275.         floor_y = axis_y;
  276.        
  277.         if(floorlength > 12)
  278.         {
  279.             floor_y = (floorlength - 12) * box_y;
  280.         }
  281.        
  282.         for( i=0; i < 6; i++ ) // X Axis
  283.         {
  284.             block = spawn( "script_model", self.origin );
  285.             block setModel( "com_plasticcase_friendly" );
  286.             block Solid();
  287.             block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  288.             block.origin = (axis_x+(i*box_x), floor_y, axis_z);
  289.             wait 0.01;
  290.            
  291.             for( e=1; e < self.Floor_count; e++ ) // Y Axis
  292.             {
  293.                 block = spawn( "script_model", self.origin );
  294.                 block setModel( "com_plasticcase_friendly" );
  295.                 block Solid();
  296.                 block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  297.                 block.origin = (axis_x+(i*box_x), floor_y+(e*box_y), axis_z);
  298.                 wait 0.01;
  299.             }
  300.         }
  301.     }
  302. }
  303.  
  304. CreateElevator(enter, exit, angle)
  305. {
  306.     flag = spawn( "script_model", enter );
  307.     flag setModel( level.elevator_model["enter"] );
  308.     wait 0.01;
  309.     flag = spawn( "script_model", exit );
  310.     flag setModel( level.elevator_model["exit"] );
  311.     wait 0.01;
  312.     self thread ElevatorThink(enter, exit, angle);
  313. }
  314.  
  315. CreateElevatorCustom(enter, exit, angle)
  316. {
  317.     self endon("GAME_HAS_ENDED");
  318.     level.flag1 = spawn( "script_model", enter );
  319.     level.flag1 setModel( level.elevator_model["enter"] );
  320.     wait 0.01;
  321.     level.flag2 = spawn( "script_model", exit );
  322.     level.flag2 setModel( level.elevator_model["exit"] );
  323.     wait 0.01;
  324.     self thread ElevatorThinkCustom(enter, exit, angle);
  325. }
  326.  
  327. DeleteElevatorCustom()
  328. {
  329.     level.flag1 delete();
  330.     level.flag2 delete();
  331. }
  332.  
  333. ElevatorThinkCustom(enter, exit, angle)
  334. {
  335.     self endon("disconnect");
  336.     self endon("GAME_HAS_ENDED");
  337.     while(1)
  338.     {
  339.         foreach(player in level.players)
  340.         {
  341.             if(Distance(enter, player.origin) <= 50)
  342.             {
  343.                 //self notify("ENTER_FLAG");
  344.                
  345.                 player SetOrigin(exit);
  346.                 player SetPlayerAngles(angle);
  347.                
  348.                 self thread maps\mp\gametypes\_rank::doZombieFlare();
  349.             }
  350.         }
  351.         wait .25;
  352.     }
  353. }
  354.  
  355. ElevatorThink(enter, exit, angle)
  356. {
  357.     self endon("disconnect");
  358.     while(1)
  359.     {
  360.         foreach(player in level.players)
  361.         {
  362.             if(Distance(enter, player.origin) <= 50)
  363.             {
  364.                 //self notify("ENTER_FLAG");
  365.                
  366.                 player SetOrigin(exit);
  367.                 player SetPlayerAngles(angle);
  368.                
  369.                 self thread maps\mp\gametypes\_rank::doZombieFlare();
  370.             }
  371.         }
  372.         wait .25;
  373.     }
  374. }
  375.  
  376. CreateBlocks(pos, angle)
  377. {
  378.     block = spawn("script_model", pos );
  379.     block setModel("com_plasticcase_friendly");
  380.     block.angles = angle;
  381.     block Solid();
  382.     block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  383.     wait 0.01;
  384. }
  385.  
  386. CreateDoors(open, close, angle, size, height, hp, maxhp, range, type, doorid)
  387. {
  388.    
  389.     offset = (((size / 2) - 0.5) * -1);
  390.     center = spawn("script_model", open );
  391.     for(j = 0; j < size; j++){
  392.         door = spawn("script_model", open + ((0, 30, 0) * offset));
  393.         door setModel("com_plasticcase_enemy");
  394.         door Solid();
  395.         door CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  396.         door EnableLinkTo();
  397.         door LinkTo(center);
  398.         for(h = 1; h < height; h++){
  399.             door = spawn("script_model", open + ((0, 30, 0) * offset) - ((70, 0, 0) * h));
  400.             door setModel("com_plasticcase_enemy");
  401.             door Solid();
  402.             door CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  403.             door EnableLinkTo();
  404.             door LinkTo(center);
  405.         }
  406.         offset += 1;
  407.     }
  408.     center.angles = angle;
  409.     center.state = "open";
  410.     center.hp = hp;
  411.     center.maxhp = maxhp;
  412.     center.range = range;
  413.     center.doorid = doorid;
  414.     if(type == 0)
  415.     {
  416.         center thread DoorThink(open, close);
  417.     }
  418.     if(type == 1)
  419.     {
  420.         center thread DoorThinkCustom(open, close);
  421.     }
  422.     center thread DoorUse();   
  423.     center thread DoorFix(close, hp);
  424.     center thread ResetDoors(open, hp);
  425.    
  426.     wait 0.01;
  427. }
  428.  
  429. CreateRamps(top, bottom)
  430. {
  431.     D = Distance(top, bottom);
  432.     blocks = roundUp(D/30);
  433.     CX = top[0] - bottom[0];
  434.     CY = top[1] - bottom[1];
  435.     CZ = top[2] - bottom[2];
  436.     XA = CX/blocks;
  437.     YA = CY/blocks;
  438.     ZA = CZ/blocks;
  439.     CXY = Distance((top[0], top[1], 0), (bottom[0], bottom[1], 0));
  440.     Temp = VectorToAngles(top - bottom);
  441.     BA = (Temp[2], Temp[1] + 90, Temp[0]);
  442.     for(b = 0; b < blocks; b++)
  443.     {
  444.         block = spawn("script_model", (bottom + ((XA, YA, ZA) * b)));
  445.         block setModel("com_plasticcase_friendly");
  446.         block.angles = BA;
  447.         block Solid();
  448.         block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  449.         wait 0.01;
  450.     }
  451.     block = spawn("script_model", (bottom + ((XA, YA, ZA) * blocks) - (0, 0, 5)));
  452.     block setModel("com_plasticcase_friendly");
  453.     block.angles = (BA[0], BA[1], 0);
  454.     block Solid();
  455.     block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  456.     wait 0.01;
  457. }
  458.  
  459. CreateGrids(corner1, corner2, angle)
  460. {
  461.     W = Distance((corner1[0], 0, 0), (corner2[0], 0, 0));
  462.     L = Distance((0, corner1[1], 0), (0, corner2[1], 0));
  463.     H = Distance((0, 0, corner1[2]), (0, 0, corner2[2]));
  464.     CX = corner2[0] - corner1[0];
  465.     CY = corner2[1] - corner1[1];
  466.     CZ = corner2[2] - corner1[2];
  467.     ROWS = roundUp(W/55);
  468.     COLUMNS = roundUp(L/30);
  469.     HEIGHT = roundUp(H/20);
  470.     XA = CX/ROWS;
  471.     YA = CY/COLUMNS;
  472.     ZA = CZ/HEIGHT;
  473.     center = spawn("script_model", corner1);
  474.     for(r = 0; r <= ROWS; r++){
  475.         for(c = 0; c <= COLUMNS; c++){
  476.             for(h = 0; h <= HEIGHT; h++){
  477.                 block = spawn("script_model", (corner1 + (XA * r, YA * c, ZA * h)));
  478.                 block setModel("com_plasticcase_friendly");
  479.                 block.angles = (0, 0, 0);
  480.                 block Solid();
  481.                 block LinkTo(center);
  482.                 block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  483.                 wait 0.01;
  484.             }
  485.         }
  486.     }
  487.     center.angles = angle;
  488. }
  489.  
  490. CreateWalls(start, end)
  491. {
  492.     D = Distance((start[0], start[1], 0), (end[0], end[1], 0));
  493.     H = Distance((0, 0, start[2]), (0, 0, end[2]));
  494.     blocks = roundUp(D/55);
  495.     height = roundUp(H/30);
  496.     CX = end[0] - start[0];
  497.     CY = end[1] - start[1];
  498.     CZ = end[2] - start[2];
  499.     XA = (CX/blocks);
  500.     YA = (CY/blocks);
  501.     ZA = (CZ/height);
  502.     TXA = (XA/4);
  503.     TYA = (YA/4);
  504.     Temp = VectorToAngles(end - start);
  505.     Angle = (0, Temp[1], 90);
  506.     for(h = 0; h < height; h++)
  507.     {
  508.         block = spawn("script_model", (start + (TXA, TYA, 10) + ((0, 0, ZA) * h)));
  509.         block setModel("com_plasticcase_friendly");
  510.         block.angles = Angle;
  511.         block Solid();
  512.         block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  513.         wait 0.001;
  514.         for(i = 1; i < blocks; i++){
  515.             block = spawn("script_model", (start + ((XA, YA, 0) * i) + (0, 0, 10) + ((0, 0, ZA) * h)));
  516.             block setModel("com_plasticcase_friendly");
  517.             block.angles = Angle;
  518.             block Solid();
  519.             block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  520.             wait 0.001;
  521.         }
  522.         block = spawn("script_model", ((end[0], end[1], start[2]) + (TXA * -1, TYA * -1, 10) + ((0, 0, ZA) * h)));
  523.         block setModel("com_plasticcase_friendly");
  524.         block.angles = Angle;
  525.         block Solid();
  526.         block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  527.         wait 0.001;
  528.     }
  529. }
  530.  
  531. CreateCluster(amount, pos, radius)
  532. {
  533.     while(1)
  534.     {
  535.         for(i = 0; i < amount; i++)
  536.         {
  537.             half = radius / 2;
  538.             power = ((randomInt(radius) - half), (randomInt(radius) - half), 500);
  539.             block_cluster = spawn("script_model", pos + (0, 0, 1000) );
  540.             block_cluster setModel("com_plasticcase_friendly");
  541.             block_cluster.angles = (90, 0, 0);
  542.             block_cluster PhysicsLaunchServer((0, 0, 0), power);
  543.             block_cluster Solid();
  544.             block_cluster CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
  545.             block_cluster thread ResetCluster(pos, radius);
  546.             block_cluster thread DeleteCluster();
  547.             wait 0.05;
  548.         }
  549.        
  550.         wait 12;
  551.     }
  552. }
  553.  
  554. DeleteCluster()
  555. {
  556.     wait 9;
  557.     self delete();
  558. }
  559.  
  560. ResetCluster(pos, radius)
  561. {
  562.     wait 5;
  563.     self RotateTo(((randomInt(36)*10), (randomInt(36)*10), (randomInt(36)*10)), 1);
  564.     level waittill("RESETCLUSTER");
  565.     self thread CreateCluster(1, pos, radius);
  566.     self delete();
  567. }
  568.  
  569. DoorThink(open, close)
  570. {
  571.     while(1)
  572.     {
  573.         if(self.doorid == 0)   
  574.         {
  575.             level.door1maxhp = self.maxhp;
  576.             level.door1hp = self.hp;
  577.             level.door1id = 1;
  578.             level.door1state = self.state;
  579.         }
  580.         if(self.doorid == 1)
  581.         {
  582.             level.door2maxhp = self.maxhp;
  583.             level.door2hp = self.hp;
  584.             level.door2id = 1;
  585.             level.door2state = self.state;
  586.         }
  587.        
  588.         if(self.hp > 0)
  589.         {
  590.             self waittill ( "triggeruse" , player );
  591.             if(player.team == "allies")
  592.             {
  593.                 if(self.state == "open")
  594.                 {
  595.                     self MoveTo(close, level.doorwait);
  596.                     wait level.doorwait;
  597.                     self.state = "close";
  598.                     continue;
  599.                 }
  600.                 if(self.state == "close")
  601.                 {
  602.                     self MoveTo(open, level.doorwait);
  603.                     wait level.doorwait;
  604.                     self.state = "open";                   
  605.                     continue;
  606.                 }
  607.             }
  608.             if(player.team == "axis")
  609.             {
  610.                 if(self.state == "close")
  611.                 {
  612.                     self.hp -= 2;
  613.                     player iPrintlnBold("^4Hitting Door...");
  614.                     if(self.door1id == 1)
  615.                     {
  616.                         level notify ("DOOR1HEALTH");
  617.                     }
  618.                     if(self.door2id == 1)
  619.                     {
  620.                         level notify ("DOOR2HEALTH");
  621.                     }
  622.                     wait 0.5;
  623.                     continue;
  624.                 }
  625.             }
  626.         }
  627.         else
  628.         {
  629.            
  630.             if(self.state == "close")
  631.             {
  632.                 self MoveTo(open, level.doorwait);
  633.                 if(self.doorid == 0)   
  634.                 {
  635.                     level.door1state = "broken";
  636.                     level notify ("DOOR1HEALTH");
  637.                 }
  638.                 if(self.doorid == 1)
  639.                 {
  640.                     level.door2state = "broken";
  641.                     level notify ("DOOR2HEALTH");
  642.                 }
  643.             }
  644.             self.state = "broken";
  645.             wait .5;
  646.         }
  647.     }
  648. }
  649.  
  650. DoorThinkCustom(open, close)
  651. {
  652.     while(1)
  653.     {
  654.         if(self.doorid == 0)   
  655.         {
  656.             level.door1maxhp = self.maxhp;
  657.             level.door1hp = self.hp;
  658.             level.door1id = 1;
  659.             level.door1state = self.state;
  660.         }
  661.         if(self.doorid == 1)
  662.         {
  663.             level.door2maxhp = self.maxhp;
  664.             level.door2hp = self.hp;
  665.             level.door2id = 1;
  666.             level.door2state = self.state;
  667.         }
  668.        
  669.         if(self.hp > 0)
  670.         {
  671.             self waittill ( "triggeruse" , player );
  672.             if(player.team == "allies")
  673.             {
  674.                 if(self.state == "open")
  675.                 {
  676.                     self MoveTo(close, level.doorwait);
  677.                     wait level.doorwait;
  678.                     self.state = "close";
  679.                     continue;
  680.                 }
  681.                 if(self.state == "close")
  682.                 {
  683.                     if(level.gameState == "playing")
  684.                     {
  685.                         player iPrintlnBold("^7Dont open the door when zombies are released!");
  686.                     }
  687.                     else
  688.                     {
  689.                         self MoveTo(open, level.doorwait);
  690.                         wait level.doorwait;
  691.                         self.state = "open";                   
  692.                         continue;
  693.                     }
  694.                 }
  695.             }
  696.             if(player.team == "axis")
  697.             {
  698.                 if(self.state == "close")
  699.                 {
  700.                     self.hp -= 2;
  701.                     player iPrintlnBold("^4Hitting Door...");
  702.                     if(self.door1id == 1)
  703.                     {
  704.                         level notify ("DOOR1HEALTH");
  705.                     }
  706.                     if(self.door2id == 1)
  707.                     {
  708.                         level notify ("DOOR2HEALTH");
  709.                     }
  710.                     wait 0.5;
  711.                     continue;
  712.                 }
  713.             }
  714.         }
  715.         else
  716.         {
  717.            
  718.             if(self.state == "close")
  719.             {
  720.                 self MoveTo(open, level.doorwait);
  721.                 if(self.doorid == 0)   
  722.                 {
  723.                     level.door1state = "broken";
  724.                     level notify ("DOOR1HEALTH");
  725.                 }
  726.                 if(self.doorid == 1)
  727.                 {
  728.                     level.door2state = "broken";
  729.                     level notify ("DOOR2HEALTH");
  730.                 }
  731.             }
  732.             self.state = "broken";
  733.             wait .5;
  734.         }
  735.     }
  736. }
  737.  
  738. DoorFix(close, hp)
  739. {
  740.     while(1)
  741.     {
  742.         level waittill("FIXDOOR");
  743.         self.hp = hp;
  744.         self MoveTo(close, level.doorwait);
  745.         self.state = "close";
  746.         wait 0.3;
  747.     }
  748. }
  749.  
  750. DoorUse(range)
  751. {
  752.     self endon("disconnect");
  753.     while(1)
  754.     {
  755.         foreach(player in level.players)
  756.         {
  757.             if(Distance(self.origin, player.origin) <= self.range)
  758.             {
  759.                 if(player.team == "allies")
  760.                 {
  761.                     if(self.state == "open")
  762.                     {
  763.                         player.hint = "Press ^3[{+activate}] ^7to ^2Close ^7the door.";
  764.                     }
  765.                     if(self.state == "close")
  766.                     {
  767.                         player.hint = "Press ^3[{+activate}] ^7to ^2Open ^7the door.";
  768.                     }
  769.                     if(self.state == "broken")
  770.                     {
  771.                         player.hint = "^1Door is Broken";
  772.                     }
  773.                 }
  774.                 if(player.team == "axis")
  775.                 {
  776.                     if(self.state == "close")
  777.                     {
  778.                         player.hint = "Press ^3[{+activate}] ^7to ^2Attack ^7the door.";
  779.                     }
  780.                     if(self.state == "broken")
  781.                     {
  782.                         player.hint = "^1Door is Broken";
  783.                     }
  784.                 }
  785.                 if(player.buttonPressed[ "+activate" ] == 1)
  786.                 {
  787.                     player.buttonPressed[ "+activate" ] = 0;
  788.                     self notify( "triggeruse" , player);
  789.                 }
  790.             }
  791.         }
  792.        
  793.         wait .05;
  794.     }
  795. }
  796.  
  797. ResetDoors(open, hp)
  798. {
  799.     while(1)
  800.     {
  801.         level waittill("RESETDOORS");
  802.         self.hp = hp;
  803.         self MoveTo(open, level.doorwait);
  804.         self.state = "open";
  805.     }
  806. }
  807.  
  808. roundUp( floatVal )
  809. {
  810.     if ( int( floatVal ) != floatVal )
  811.         return int( floatVal+1 );
  812.     else
  813.         return int( floatVal );
  814. }
  815.  
  816. Afghan()
  817. {
  818.     CreateRamps((2280, 1254, 142), (2548, 1168, 33));
  819.     CreateDoors((1590, -238, 160), (1590, -168, 160), (90, 0, 0), 2, 2, 5, 50);
  820.     CreateDoors((1938, -125, 160), (1938, -15, 160), (90, 0, 0), 4, 2, 15, 75);
  821.     CreateDoors((2297, 10, 160), (2297, -100, 160), (90, 0, 0), 4, 2, 10, 75);
  822.     CreateDoors((525, 1845, 162), (585, 1845, 162), (90, 90, 0), 2, 2, 5, 50);
  823.     CreateDoors((-137, 1380, 226), (-137, 1505, 226), (90, 0, 0), 4, 2, 15, 75);
  824.     CreateDoors((820, 1795, 165), (820, 1495, 165), (90, 0, 0), 12, 2, 40, 100);
  825.     CreateDoors((2806, 893, 210), (2806, 806, 210), (90, 0, 0), 3, 2, 10, 50);
  826. }
  827.  
  828. Derail()
  829. {
  830.     CreateElevator((-110, 2398, 124), (-125, 2263, 333), (0, 270, 0));
  831.     CreateBlocks((-240, 1640, 422), (0, 90, 0));
  832.     CreateBlocks((-270, 1640, 422), (0, 90, 0));
  833.     CreateBlocks((-270, 1585, 422), (0, 90, 0));
  834.     CreateBlocks((-270, 1530, 422), (0, 90, 0));
  835.     CreateBlocks((-270, 1475, 422), (0, 90, 0));
  836.     CreateBlocks((-270, 1420, 422), (0, 90, 0));
  837.     CreateBlocks((-270, 1365, 422), (0, 90, 0));
  838.     CreateBlocks((-270, 1310, 422), (0, 90, 0));
  839.     CreateBlocks((-270, 1255, 422), (0, 90, 0));
  840.     CreateBlocks((-970, 3018, 138), (0, 90, 0));
  841.     CreateBlocks((-985, 3018, 148), (0, 90, 0));
  842.     CreateBlocks((-1000, 3018, 158), (0, 90, 0));
  843.     CreateBlocks((-1015, 3018, 168), (0, 90, 0));
  844.     CreateBlocks((-1030, 3018, 178), (0, 90, 0));
  845.     CreateBlocks((-1045, 3018, 188), (0, 90, 0));
  846.     CreateBlocks((-1060, 3018, 198), (0, 90, 0));
  847.     CreateBlocks((-1075, 3018, 208), (0, 90, 0));
  848.     CreateBlocks((-1090, 3018, 218), (0, 90, 0));
  849.     CreateBlocks((-1105, 3018, 228), (0, 90, 0));
  850.     CreateBlocks((-1120, 3018, 238), (0, 90, 0));
  851.     CreateBlocks((-1135, 3018, 248), (0, 90, 0));
  852.     CreateRamps((-124, 2002, 437), (-124, 2189, 332));
  853.     CreateDoors((400, 1486, 128), (400, 1316, 128), (90, 0, 0), 6, 2, 30, 100);
  854.     CreateDoors((-61, 755, 128), (-161, 755, 128), (90, 90, 0), 3, 2, 20, 75);
  855. }
  856.  
  857. Estate()
  858. {
  859.     CreateBlocks((-2378, 782, -130), (90, 0, 0));
  860.     CreateBlocks((-2388, 823, -130), (90, 0, 0));
  861.     CreateBlocks((-2398, 863, -130), (90, 0, 0));
  862.     CreateBlocks((-1098, 2623, 37), (90, 0, 0));
  863.     CreateBlocks((-3227, 3483, -101), (90, 0, 0));
  864.     CreateBlocks((-371, 919, 245), (0, 100, 90));
  865.     CreateBlocks((-383, 991, 245), (0, 100, 90));
  866.     CreateBlocks((-371, 919, 275), (0, 100, 90));
  867.     CreateBlocks((-383, 991, 275), (0, 100, 90));
  868.     CreateBlocks((-371, 919, 305), (0, 100, 90));
  869.     CreateBlocks((-383, 991, 305), (0, 100, 90));
  870.     CreateBlocks((-371, 919, 335), (0, 100, 90));
  871.     CreateBlocks((-383, 991, 335), (0, 100, 90));
  872.     CreateBlocks((-349, 1115, 245), (0, 50, 90));
  873.     CreateBlocks((-302, 1166, 245), (0, 50, 90));
  874.     CreateBlocks((-349, 1115, 275), (0, 50, 90));
  875.     CreateBlocks((-302, 1166, 275), (0, 50, 90));
  876.     CreateBlocks((-349, 1115, 305), (0, 50, 90));
  877.     CreateBlocks((-302, 1166, 305), (0, 50, 90));
  878.     CreateBlocks((-349, 1115, 335), (0, 50, 90));
  879.     CreateBlocks((-302, 1166, 335), (0, 50, 90));
  880.     CreateBlocks((-371, 919, 395), (0, 100, 90));
  881.     CreateBlocks((-383, 991, 395), (0, 100, 90));
  882.     CreateBlocks((-371, 919, 425), (0, 100, 90));
  883.     CreateBlocks((-383, 991, 425), (0, 100, 90));
  884.     CreateBlocks((-371, 919, 455), (0, 100, 90));
  885.     CreateBlocks((-383, 991, 455), (0, 100, 90));
  886.     CreateBlocks((-371, 919, 485), (0, 100, 90));
  887.     CreateBlocks((-383, 991, 485), (0, 100, 90));
  888.     CreateBlocks((-349, 1115, 395), (0, 50, 90));
  889.     CreateBlocks((-302, 1166, 395), (0, 50, 90));
  890.     CreateBlocks((-349, 1115, 425), (0, 50, 90));
  891.     CreateBlocks((-302, 1166, 425), (0, 50, 90));
  892.     CreateBlocks((-349, 1115, 455), (0, 50, 90));
  893.     CreateBlocks((-302, 1166, 455), (0, 50, 90));
  894.     CreateBlocks((-349, 1115, 485), (0, 50, 90));
  895.     CreateBlocks((-302, 1166, 485), (0, 50, 90));
  896.     CreateBlocks((-55, 1231, 245), (0, -20, 90));
  897.     CreateBlocks((8, 1217, 245), (0, -20, 90));
  898.     CreateBlocks((102, 1188, 245), (0, -20, 90));
  899.     CreateBlocks((162, 1168, 245), (0, -20, 90));
  900.     CreateBlocks((-55, 1231, 275), (0, -20, 90));
  901.     CreateBlocks((8, 1217, 275), (0, -20, 90));
  902.     CreateBlocks((102, 1188, 275), (0, -20, 90));
  903.     CreateBlocks((162, 1168, 275), (0, -20, 90));
  904.     CreateBlocks((-3200, 998, -143), (90, 0, 0));
  905.     CreateBlocks((-3200, 1028, -143), (90, 0, 0));
  906.     CreateBlocks((-3200, 1058, -143), (90, 0, 0));
  907.     CreateBlocks((-3200, 1088, -143), (90, 0, 0));
  908.     CreateBlocks((-3200, 1118, -143), (90, 0, 0));
  909.     CreateBlocks((-3181, 3124, -218), (90, 0, 0));
  910.     CreateBlocks((-3211, 3124, -218), (90, 0, 0));
  911.     CreateBlocks((-3241, 3124, -218), (90, 0, 0));
  912.     CreateBlocks((-3181, 3124, -163), (90, 0, 0));
  913.     CreateBlocks((-3211, 3124, -163), (90, 0, 0));
  914.     CreateBlocks((-3241, 3124, -163), (90, 0, 0));
  915.     CreateBlocks((-2622, 3676, -106), (90, 0, 0));
  916.     CreateBlocks((-3741, 3245, -200), (90, 0, 0));
  917.     CreateBlocks((-3821, 2170, -250), (90, 0, 0));
  918.     CreateBlocks((-3791, 2170, -250), (90, 0, 0));
  919.     CreateBlocks((-3761, 2170, -250), (90, 0, 0));
  920.     CreateBlocks((-3821, 2170, -195), (90, 0, 0));
  921.     CreateBlocks((-3791, 2170, -195), (90, 0, 0));
  922.     CreateBlocks((-3761, 2170, -195), (90, 0, 0));
  923.     CreateBlocks((-471, -126, 193), (0, 0, 90));
  924.     CreateBlocks((-547, -104, 193), (0, 0, 90));
  925.     CreateBlocks((-625, -84, 193), (0, 0, 90));
  926.     CreateBlocks((-702, -61, 193), (0, 0, 90));
  927.     CreateBlocks((-778, -38, 193), (0, 0, 90));
  928.     CreateBlocks((-830, -13, 193), (0, 0, 90));
  929.     CreateBlocks((1333, -92, 210), (0, 0, 90));
  930.     CreateRamps((1025, 3563, 291), (692, 3563, 146));
  931.     CreateDoors((489, 1321, 212), (409, 1341, 212), (90, 70, 0), 4, 2, 20, 75);
  932.     CreateDoors((421, 861, 212), (461, 1011, 212), (90, -20, 0), 4, 2, 20, 75);
  933.     CreateDoors((64, 680, 212), (184, 640, 212), (90, 75, 0), 6, 2, 30, 100);
  934.     CreateDoors((706, 575, 185), (791, 545, 185), (0, -15, 0), 6, 1, 25, 75);
  935.     CreateDoors((24, 477, 341), (48, 552, 341), (90, -15, 0), 3, 2, 5, 50);
  936. }
  937.  
  938. Favela()
  939. {
  940.     CreateDoors((-64, 277, 198), (-64, 337, 198), (90, -6, 0), 2, 2, 5, 50);
  941.     CreateDoors((-438, 987, 310), (-438, 1047, 310), (90, 4, 0), 2, 2, 5, 50);
  942.     CreateDoors((-625, -238, 174), (-625, -298, 174), (90, -9, 0), 2, 2, 5, 50);
  943.     CreateDoors((893, 1056, 368), (833, 1056, 368), (90, 90, 0), 2, 2, 5, 50);
  944.     CreateDoors((80, 450, 198), (145, 450, 198), (90, 90, 0), 2, 2, 5, 50);
  945. }
  946.  
  947. HighRise()
  948. {
  949.     ents = getEntArray();
  950.     for ( index = 0; index < ents.size; index++ )
  951.     {
  952.         if(isSubStr(ents[index].classname, "trigger_hurt"))
  953.         ents[index].origin = (0, 0, 9999999);
  954.  
  955.     }
  956.    
  957.     box_x = 55; // Set box length (X)
  958.     box_y = 30; // Set box width (Y)
  959.     box_z = 27; // Set box height (Z)
  960.    
  961.     axis_x = 190; // Set X start point
  962.     axis_y = 4239; // Set Y start point
  963.     axis_z = 2048; // Set Z start point
  964.    
  965.     CreateBlocks((-2723, 5162, 3030), (90, 0, 0));
  966.     CreateBlocks((-2753, 5162, 3030), (90, 0, 0));
  967.     CreateBlocks((-2723, 5132, 3030), (90, 0, 0));
  968.     //CreateDoors((-1550, 5875, 2967), (-1550, 5649, 2967), (0, 0, 0), 7, 1, 20, 100);
  969.     //CreateDoors((-1185, 5900, 2967), (-1185, 6117, 2967), (0, 0, 0), 7, 1, 20, 100);
  970.     //CreateElevator((-1661.48, 6294.18, 2972.93), (-1298.99, 6727.67, 3776.13), (0, 0, 0));
  971.     //CreateElevator((1274.27, 7567.99, 3796.13), (340.968, 5253.99, 2824.13), (0, 100, 0));
  972.     //CreateElevator((-2300.55, 8787.69, 2851.72), (-625.143, 11347.8, 2168.13), (0, 270, 0));
  973.     //CreateElevator((-1920.1, 11254.2, 2264.13), (-160.389, 7784.77, 3101.75), (0, 0, 0));
  974.     CreateElevator((-3904.1, 5119.2, 2848.13), (0, 4000, 2048.13), (0, 0, 0)); //to bunker
  975.     CreateElevator((244, 4525, 2063), (-625.143, 11347.8, 2168.13), (0, 0, 0)); //out of bunker (escape building)
  976.     CreateElevator((-1740, 10346, 2264), (-160.389, 7784.77, 3101.75), (0, 0, 0)); //escape to crane
  977.     CreateDoors((axis_x + (0*box_x) + 30, axis_y, axis_z + 40), (axis_x + (2*box_x) + 30, axis_y, axis_z + 40), (90, 0, 90), 4, 2, 100, 100, 60, 1);
  978. }
  979.  
  980. Invasion()
  981. {
  982.     box_x = 55; // Set box length (X)
  983.     box_y = 30; // Set box width (Y)
  984.     box_z = 27; // Set box height (Z)
  985.    
  986.     axis_x = 957; // Set X start point
  987.     axis_y = -2244; // Set Y start point
  988.     axis_z = 1255; // Set Z start point
  989.    
  990.     //CreateElevator((-2415, -1388, 268), (-1915, -2294, 573), (0, -90, 0));
  991.     //CreateElevator((-1413, -1333, 270), (-1558, -1485, 1064), (0, 0, 0));
  992.     //CreateElevator((-607, -984, 293), (-842, -1053, 878), (0, 0, 0));
  993.     CreateGrids((-1400, -1850, 390), (-1359, -1455, 390), (0, 0, 0));
  994.     CreateBlocks((-1468, -1470, 1044), (0, -80, 0));
  995.     CreateBlocks((-1498, -1475, 1044), (0, -80, 0));
  996.     CreateBlocks((-1528, -1480, 1044), (0, -80, 0));
  997.     CreateBlocks((-1558, -1485, 1044), (0, -80, 0));
  998.     CreateBlocks((-1588, -1490, 1044), (0, -80, 0));
  999.     CreateBlocks((-1618, -1495, 1044), (0, -80, 0));
  1000.     CreateBlocks((-1648, -1500, 1044), (0, -80, 0));
  1001.     CreateDoors((axis_x + (0*box_x) + 30, axis_y, axis_z + 40), (axis_x + (2*box_x) + 30, axis_y, axis_z + 40), (90, 0, 90), 4, 2, 100, 100, 60, 1);
  1002.     CreateElevator((-2651, -722, 264), (1256, -2723, 1271), (0, 90, 0)); // spawn plek naar bunker
  1003.     CreateElevator((1018, -3595, 251), (1256, -2723, 1271), (0, 90, 0)); // spawn plek naar bunker
  1004.     CreateElevator((1329, -2823, 306), (1256, -2723, 1271), (0, 90, 0)); // spawn plek naar bunker
  1005.     CreateElevator((-2808, -3722, 290), (1256, -2723, 1271), (0, 90, 0)); // spawn plek naar bunker
  1006.     CreateElevator((36, -2544, 264), (1256, -2723, 1271), (0, 90, 0)); // spawn plek naar bunker
  1007.     CreateElevator((1029, -3276, 417), (1256, -2723, 1271), (0, 90, 0)); // spawn plek naar bunker
  1008.     CreateElevator((-2465, -1724, 264), (1256, -2723, 1271), (0, 90, 0)); // spawn plek naar bunker
  1009.     CreateElevator((-2300, -2810, 264), (1256, -2723, 1271), (0, 90, 0)); // spawn plek naar bunker
  1010.     CreateElevator((-3653, -1367, 259), (1256, -2723, 1271), (0, 90, 0)); // spawn plek naar bunker
  1011.     CreateElevator((2252, -2263, 288), (1256, -2723, 1271), (0, 90, 0)); // spawn plek naar bunker
  1012.    
  1013. }
  1014.  
  1015. Karachi()
  1016. {
  1017.     CreateElevator((25, 519, 200), (25, 457, 336), (0, 180, 0));
  1018.     CreateElevator((-525, 520, 336), (-522, 783, 336), (0, 0, 0));
  1019.     CreateElevator((25, 854, 336), (25, 854, 472), (0, 180, 0));
  1020.     CreateElevator((-522, 783, 472), (-525, 520, 472), (0, 0, 0));
  1021.     CreateElevator((25, 457, 472), (25, 457, 608), (0, 180, 0));
  1022.     CreateElevator((-525, 520, 608), (-522, 783, 608), (0, 0, 0));
  1023.     CreateElevator((561, 116, 176), (568, -67, 280), (0, 0, 0));
  1024.     CreateBlocks((800, 206, 254), (0, 0, 0));
  1025.     CreateBlocks((800, 256, 254), (0, 0, 0));
  1026.     CreateBlocks((800, 375, 254), (0, 0, 0));
  1027.     CreateBlocks((479, -831, 369), (90, 90, 0));
  1028.     CreateBlocks((768, -253, 582), (90, -45, 0));
  1029.     CreateBlocks((814, -253, 582), (90, -45, 0));
  1030.     CreateBlocks((860, -253, 582), (90, -45, 0));
  1031.     CreateBlocks((916, -253, 582), (90, -45, 0));
  1032.     CreateBlocks((962, -253, 582), (90, -45, 0));
  1033.     CreateBlocks((415, -777, 582), (0, 0, 0));
  1034.     CreateBlocks((360, -777, 582), (0, 0, 0));
  1035.     CreateBlocks((305, -777, 582), (0, 0, 0));
  1036.     CreateBlocks((516, -74, 564), (90, 90, 0));
  1037.     CreateBlocks((516, -74, 619), (90, 90, 0));
  1038.     CreateRamps((559, -255, 554), (559, -99, 415));
  1039.    
  1040.     box_x = 55; // Set box length (X)
  1041.     box_y = 30; // Set box width (Y)
  1042.     box_z = 27; // Set box height (Z)
  1043.    
  1044.     axis_x = -328; // Set X start point
  1045.     axis_y = 1014; // Set Y start point
  1046.     axis_z = 744; // Set Z start point
  1047.        
  1048.     CreateElevator((37, -780, 600), (-507, 859, 750), (0, 0, 0));
  1049.     CreateDoors((axis_x + (0*box_x) + 30, axis_y, axis_z + 40), (axis_x + (2*box_x) + 30, axis_y, axis_z + 40), (90, 0, 90), 4, 2, 100, 100, 60, 1);
  1050. }
  1051.  
  1052. Quarry()
  1053. {
  1054.     CreateBlocks((-5817, -319, -88), (0, 0, 0));
  1055.     CreateBlocks((-5817, -289, -108), (0, 0, 0));
  1056.     CreateRamps((-3742, -1849, 304), (-3605, -1849, 224));
  1057.     CreateRamps((-3428, -1650, 224), (-3188, -1650, 160));
  1058.     CreateRamps((-3412, -1800, 416), (-3735, -1800, 304));
  1059.     CreateGrids((-3520, -1880, 320), (-3215, -2100, 320), (0, 0, 0));
  1060.     CreateGrids((-3100, -1725, 400), (-2740, -1840, 400), (3, 0, 0));
  1061. }
  1062.  
  1063. Rundown()
  1064. {
  1065.     CreateDoors((360, -1462, 202), (300, -1342, 202), (90, 25, 0), 3, 2, 10, 75);
  1066.     CreateDoors((460, -1420, 206), (400, -1300, 206), (90, 25, 0), 3, 2, 10, 75);
  1067.     CreateDoors((30, -1630, 186), (-30, -1510, 186), (90, 25, 0), 4, 2, 15, 75);
  1068.     CreateDoors((-280, -1482, 186), (-220, -1602, 186), (90, 25, 0), 4, 2, 15, 75);
  1069.     CreateBlocks((385, -1660, 40), (0, 120, 90));
  1070.     CreateRamps((-597, -280, 212), (-332, -522, 180));
  1071.     CreateRamps((726, -389, 142), (560, -373, 13));
  1072.     CreateRamps((2250, -1155, 306), (1905, -876, 200));
  1073.     CreateRamps((850, -3125, 312), (535, -3125, 189));
  1074.     CreateRamps((1775, 450, 144), (1775, 735, -5));
  1075. }
  1076.  
  1077. Rust()
  1078. {
  1079.     box_x = 55; // Set box length (X)
  1080.     box_y = 30; // Set box width (Y)
  1081.     box_z = 27; // Set box height (Z)
  1082.    
  1083.     axis_x = 475; // Set X start point
  1084.     axis_y = 1435; // Set Y start point
  1085.     axis_z = 253; // Set Z start point
  1086.    
  1087.     /*
  1088.     CreateBlocks((773, 1080, 258), (0, 90, 0));
  1089.     CreateRamps((745, 1570, 383), (745, 1690, 273));
  1090.     CreateDoors((565, 1540, 295), (653, 1540, 295), (90, 90, 0), 3, 2, 15, 60);
  1091.     CreateGrids((773, 1135, 258), (533, 1795, 258), (0, 0, 0));
  1092.     CreateGrids((695, 1795, 378), (533, 1540, 378), (0, 0, 0));
  1093.     CreateGrids((773, 1540, 498), (533, 1795, 498), (0, 0, 0));
  1094.     CreateWalls((533, 1795, 278), (773, 1795, 498));
  1095.     CreateWalls((790, 1795, 278), (790, 1540, 498));
  1096.     CreateWalls((515, 1540, 278), (515, 1795, 498));
  1097.     CreateWalls((773, 1540, 278), (715, 1540, 378));
  1098.     CreateWalls((590, 1540, 278), (533, 1540, 378));
  1099.     CreateWalls((773, 1540, 398), (533, 1540, 428));
  1100.     CreateWalls((773, 1540, 458), (740, 1540, 498));
  1101.     CreateWalls((566, 1540, 458), (533, 1540, 498));*/
  1102.    
  1103.     CreateDoors((axis_x + (0*box_x) + 30, axis_y, axis_z + 40), (axis_x + (2*box_x) + 30, axis_y, axis_z + 40), (90, 0, 90), 4, 2, 100, 100, 60, 1);
  1104.     CreateElevator((-213, 1443, -235), (701, 1011, 269), (0, 90, 0)); // pijp
  1105.     CreateElevator((533, 1726, 267), (-468, -324, -231), (0, -90, 0)); // outside map
  1106.     CreateElevator((-577, -222, -221), (633, 1726, 267), (0, -90, 0)); // inside map
  1107. }
  1108.  
  1109. Scrapyard()
  1110. {
  1111.     CreateBlocks((420, 1636, 174), (0, 0, 0));
  1112.     CreateBlocks((475, 1636, 174), (0, 0, 0));
  1113.     CreateBlocks((530, 1636, 174), (0, 0, 0));
  1114.     CreateBlocks((585, 1636, 174), (0, 0, 0));
  1115.     CreateBlocks((640, 1636, 174), (0, 0, 0));
  1116.     CreateBlocks((695, 1636, 174), (0, 0, 0));
  1117.     CreateBlocks((750, 1636, 174), (0, 0, 0));
  1118.     CreateBlocks((805, 1636, 174), (0, 0, 0));
  1119.     CreateBlocks((860, 1636, 174), (0, 0, 0));
  1120.     CreateBlocks((420, 1606, 174), (0, 0, 0));
  1121.     CreateBlocks((475, 1606, 174), (0, 0, 0));
  1122.     CreateBlocks((530, 1606, 174), (0, 0, 0));
  1123.     CreateBlocks((585, 1606, 174), (0, 0, 0));
  1124.     CreateBlocks((640, 1606, 174), (0, 0, 0));
  1125.     CreateBlocks((695, 1606, 174), (0, 0, 0));
  1126.     CreateBlocks((750, 1606, 174), (0, 0, 0));
  1127.     CreateBlocks((805, 1606, 174), (0, 0, 0));
  1128.     CreateBlocks((860, 1606, 174), (0, 0, 0));
  1129.     CreateBlocks((420, 1576, 174), (0, 0, 0));
  1130.     CreateBlocks((475, 1576, 174), (0, 0, 0));
  1131.     CreateBlocks((530, 1576, 174), (0, 0, 0));
  1132.     CreateBlocks((585, 1576, 174), (0, 0, 0));
  1133.     CreateBlocks((640, 1576, 174), (0, 0, 0));
  1134.     CreateBlocks((695, 1576, 174), (0, 0, 0));
  1135.     CreateBlocks((750, 1576, 174), (0, 0, 0));
  1136.     CreateBlocks((805, 1576, 174), (0, 0, 0));
  1137.     CreateBlocks((860, 1576, 174), (0, 0, 0));
  1138.     CreateBlocks((-1541, -80, 1), (0, 90, -33.3));
  1139.     CreateBlocks((-1517.7, -80, 16.3), (0, 90, -33.3));
  1140.     CreateBlocks((-1494.4, -80, 31.6), (0, 90, -33.3));
  1141.     CreateBlocks((-1471.1, -80, 46.9), (0, 90, -33.3));
  1142.     CreateBlocks((-1447.8, -80, 62.2), (0, 90, -33.3));
  1143.     CreateBlocks((-1424.5, -80, 77.5), (0, 90, -33.3));
  1144.     CreateBlocks((-1401.2, -80, 92.8), (0, 90, -33.3));
  1145.     CreateBlocks((-1377.9, -80, 108.1), (0, 90, -33.3));
  1146.     CreateBlocks((-1354.6, -80, 123.4), (0, 90, -33.3));
  1147.     CreateElevator((10, 1659, -72), (860, 1606, 194), (0, 180, 0));
  1148.     CreateDoors((1992, 266, -130), (1992, 336, -130), (90, 0, 0), 2, 2, 5, 50);
  1149.     CreateDoors((1992, 710, -130), (1992, 640, -130), (90, 0, 0), 2, 2, 5, 50);
  1150. }
  1151.  
  1152. Skidrow()
  1153. {
  1154.     /*
  1155.     CreateRamps((-705, -830, 688), (-495, -830, 608));
  1156.     CreateRamps((-580, -445, 608), (-580, -375, 568));
  1157.     CreateRamps((1690, 325, 213), (1890, 325, 108));
  1158.     CreateGrids((-700, -120, 580), (-700, -120, 640), (0, 90, 0));
  1159.     CreateGrids((-705, -490, 580), (-705, -770, 580), (-45, 0, 0));
  1160.     CreateGrids((-1540, -1687, 600), (-275, -1687, 660), (0, 0, 0));
  1161.     CreateGrids((-1060, -1535, 584), (-470, -1650, 584), (0, 0, 0));
  1162.     */
  1163.    
  1164.     axis_x = 1340; // Set X start point
  1165.     axis_y = 970; // Set Y start point
  1166.     axis_z = 530; // Set Z start point
  1167.    
  1168.     box_x = 55; // Set box length (X)
  1169.     box_y = 30; // Set box width (Y)
  1170.     box_z = 27; // Set box height (Z)
  1171.    
  1172.     CreateGrids((82, 319, 600), (82, 970, 600), (0, 0, 0)); // anti walk
  1173.     CreateElevator((-725, -410, 136), (1493, 677, 560), (0, 90, 0)); // to bunker
  1174.    
  1175.     //CreateElevator((132, 897, 576), (-2429, -991, 984), (0, 0, 0)); // escape from bunker
  1176.     //CreateElevator((132, 767, 576), (1677, 1177, 120), (0, 0, 0)); // escape from bunker
  1177.     //CreateElevator((132, 637, 576), (1126, -2080, 504), (0, 0, 0)); // escape from bunker
  1178.     //CreateElevator((132, 507, 576), (-898, -937, 688), (0, 0, 0)); // escape from bunker
  1179.     CreateDoors((axis_x + (0*box_x) + 30, axis_y, axis_z + 40), (axis_x + (2*box_x) + 30, axis_y, axis_z + 40), (90, 0, 90), 4, 2, 100, 100, 60, 1);
  1180. }
  1181.  
  1182. SubBase()
  1183. {
  1184.     CreateBlocks((-1506, 800, 123), (0, 0, 45));
  1185.     CreateDoors((-503, -3642, 22), (-313, -3642, 22), (90, 90, 0), 7, 2, 25, 75);
  1186.     CreateDoors((-423, -3086, 22), (-293, -3086, 22), (90, 90, 0), 6, 2, 20, 75);
  1187.     CreateDoors((-183, -3299, 22), (-393, -3299, 22), (90, 90, 0), 7, 2, 25, 75);
  1188.     CreateDoors((1100, -1138, 294), (1100, -1078, 294), (90, 0, 0), 2, 2, 5, 50);
  1189.     CreateDoors((331, -1400, 294), (331, -1075, 294), (90, 0, 0), 11, 2, 40, 100);
  1190.     CreateDoors((-839, -1249, 278), (-839, -1319, 278), (90, 0, 0), 2, 2, 5, 50);
  1191.     CreateDoors((-1428, -1182, 278), (-1498, -1182, 278), (90, 90, 0), 2, 2, 5, 50);
  1192.     CreateDoors((-435, -50, 111), (-380, -50, 111), (90, 90, 0), 2, 2, 5, 50);
  1193.     CreateDoors((-643, -50, 111), (-708, -50, 111), (90, 90, 0), 2, 2, 5, 50);
  1194.     CreateDoors((1178, -438, 102), (1248, -438, 102), (90, 90, 0), 2, 2, 5, 50);
  1195.     CreateDoors((1112, -90, 246), (1112, -160, 246), (90, 0, 0), 2, 2, 5, 50);
  1196. }
  1197.  
  1198. Terminal()
  1199. {
  1200. ents = getEntArray();
  1201. for ( index = 0; index < ents.size; index++ )
  1202. {
  1203.  if(isSubStr(ents[index].classname, "trigger_hurt"))
  1204.     ents[index].origin = (9999999, 9999999, 9999999);
  1205.  
  1206. }
  1207.     CreateElevator((2859, 4529, 192), (3045, 4480, 250), (0, 0, 0));
  1208.     CreateElevator((2975, 4080, 192), (2882, 4289, 55), (0, 180, 0));
  1209.     CreateElevator((520, 7375, 192), (-898, 5815, 460), (0, -90, 0));
  1210.     CreateElevator((-670, 5860, 460), (1585, 7175, 200), (0, 180, 0));
  1211.     CreateElevator((-895, 4300, 392), (-895, 4300, 570), (0, 90, 0));
  1212.     CreateWalls((-640, 4910, 390), (-640, 4685, 660));
  1213.     CreateWalls((-1155, 4685, 390), (-1155, 4910, 660));
  1214.     CreateWalls((-570, 5440, 460), (-640, 4930, 660));
  1215.     CreateWalls((-1155, 4930, 460), (-1155, 5945, 660));
  1216.     CreateWalls((-1155, 5945, 460), (-910, 5945, 660));
  1217.     CreateWalls((-1105, 4665, 392), (-965, 4665, 512));
  1218.     CreateWalls((-825, 4665, 392), (-685, 4665, 512));
  1219.     CreateWalls((3375, 2715, 195), (3765, 3210, 245));
  1220.     CreateWalls((4425, 3580, 195), (4425, 3230, 315));
  1221.     CreateWalls((4425, 3580, 380), (4425, 3230, 440));
  1222.     CreateWalls((4045, 3615, 382), (3850, 3615, 412));
  1223.     CreateWalls((2960, 2800, 379), (3250, 2800, 409));
  1224.     CreateDoors((-705, 4665, 412), (-895, 4665, 412), (90, -90, 0), 4, 2, 100, 75);
  1225.     CreateDoors((3860, 3305, 212), (3860, 3485, 212), (90, 0, 0), 6, 2, 100, 100);
  1226.     CreateRamps((3620, 2415, 369), (4015, 2705, 192));
  1227.     CreateGrids((4380, 2330, 360), (4380, 2980, 360), (0, 0, 0));
  1228.     CreateBlocks((1635, 2470, 121), (0, 0, 0));
  1229.     CreateBlocks((2675, 3470, 207), (90, 0, 0));
  1230.     /*
  1231.     CreateElevator((447.24, 4718.11, 192.125), (-2141.39, 4316.81, 191.073), (0, 0, 0));
  1232.     CreateWalls((-71, 3128.37, 40.125), (-2535.84, 3037.37, 100.125));
  1233.     CreateWalls((-2535.84, 3037.37, 40.125), (-2642.44, 3427.56, 100.125));
  1234.     CreateWalls((-2735, 4906.63, 40.125), (-2900.87, 4644.34, 100.125));
  1235.     CreateBlocks((-2704.97, 3668.2, 100.125), (90, 0, 0));
  1236.     */
  1237.  
  1238.  
  1239. }
  1240.  
  1241. Underpass()
  1242. {
  1243.     CreateElevator((-415, 3185, 392), (-1630, 3565, 1035), (0, 180, 0));
  1244.     CreateBlocks((1110, 1105, 632), (90, 0, 0));
  1245.     CreateBlocks((-2740, 3145, 1100), (90, 0, 0));
  1246.     CreateBlocks((2444, 1737, 465), (90, 0, 0));
  1247.     CreateWalls((-1100, 3850, 1030), (-1100, 3085, 1160));
  1248.     CreateWalls((-2730, 3453, 1030), (-2730, 3155, 1150));
  1249.     CreateWalls((-2730, 3155, 1030), (-3330, 3155, 1180));
  1250.     CreateWalls((-3330, 3155, 1030), (-3330, 3890, 1180));
  1251.     CreateWalls((-3330, 3890, 1030), (-2730, 3890, 1180));
  1252.     CreateWalls((-2730, 3890, 1030), (-2730, 3592, 1150));
  1253.     CreateWalls((-2730, 3890, 1150), (-2730, 3155, 1180));
  1254.     CreateDoors((-2730, 3400, 1052), (-2730, 3522.5, 1052), (90, 180, 0), 4, 2, 20, 75);
  1255.     CreateRamps((-3285, 3190, 1125), (-3285, 3353, 1030));
  1256.     CreateRamps((-3285, 3855, 1125), (-3285, 3692, 1030));
  1257.     CreateGrids((-2770, 3190, 1120), (-3230, 3190, 1120), (0, 0, 0));
  1258.     CreateGrids((-2770, 3855, 1120), (-3230, 3855, 1120), (0, 0, 0));
  1259.     CreateGrids((-2770, 3220, 1120), (-2770, 3825, 1120), (0, 0, 0));
  1260.     CreateCluster(20, (-3030, 3522.5, 1030), 250);
  1261. }
  1262.  
  1263. Wasteland()
  1264. {  
  1265.     axis_x = 4110; // Set X start point
  1266.     axis_y = 4070; // Set Y start point
  1267.     axis_z = 500; // Set Z start point
  1268.  
  1269.     BuildBunker(axis_x, axis_y, axis_z, 22);
  1270.     CreateDoors((axis_x + 30, axis_y, axis_z + 40), (axis_x + 140, axis_y, axis_z + 40), (90, 0, 90), 4, 2, 100, 100, 80, 1, 0);
  1271.    
  1272.     axis_x = 4110; // Set X start point
  1273.     axis_y = 4730; // Set Y start point
  1274.     axis_z = 662; // Set Z start point
  1275.    
  1276.     BuildBunker(axis_x, axis_y, axis_z, 22);
  1277.     CreateDoors((axis_x + 30, axis_y, axis_z + 40), (axis_x + 140, axis_y, axis_z + 40), (90, 0, 90), 4, 2, 100, 100, 80, 0, 1);
  1278.    
  1279.     CreateElevator((941, -856, -55), (4250, 3759, 515), (0, 90, 0)); // to bunker 1st
  1280.     CreateElevator((4165, 5000, 677), (4110, 3850, 33), (0, 0, 0)); // to under 1st bunker
  1281.     CreateElevator((4110, 4000, 33), (4330, 5000, 677), (0, -90, 0)); // back to 1st bunker
  1282.  
  1283.     CreateGrids((-1600, 3600, 90), (-1600, 4650, 90), (90, 0, 0)); // barrikade1
  1284.    
  1285.     //CreateGrids((-3944, 5583, 70), (-3944, 6200, 70), (0, 0, 0)); // barrikade2
  1286. }
  1287.  
  1288. Carnival()
  1289. {
  1290.     box_x = 55; // Set box length (X)
  1291.     box_y = 30; // Set box width (Y)
  1292.     box_z = 27; // Set box height (Z)
  1293.    
  1294.     axis_x = -2643; // Set X start point
  1295.     axis_y = 4121; // Set Y start point
  1296.     axis_z = -7; // Set Z start point
  1297.    
  1298.     CreateDoors((axis_x + (0*box_x) + 30, axis_y, axis_z + 40), (axis_x + (2*box_x) + 30, axis_y, axis_z + 40), (90, 0, 90), 4, 2, 100, 100, 60, 1);
  1299.    
  1300.     CreateElevator((342, 1810, 22), (270, 1853, 1429), (0, 90, 0));
  1301.     CreateElevator((943, 793, 66), (-2186, 3286, -7), (0, 90, 0));
  1302. }
  1303.  
  1304. Bailout()
  1305. {
  1306.     box_x = 55; // Set box length (X)
  1307.     box_y = 30; // Set box width (Y)
  1308.     box_z = 27; // Set box height (Z)
  1309.    
  1310.     axis_x = 550; // Set X start point
  1311.     axis_y = -700; // Set Y start point
  1312.     axis_z = 1000; // Set Z start point
  1313.    
  1314.     CreateDoors((axis_x + (0*box_x) + 30, axis_y, axis_z + 40), (axis_x + (2*box_x) + 30, axis_y, axis_z + 40), (90, 0, 90), 4, 2, 100, 100, 60, 1);
  1315.    
  1316.     CreateElevator((-104, -1766, 816), (200, -2310, 1143), (0, 90, 0)); // naar bunker
  1317.        
  1318.     CreateElevator((2254, -2442, 600), (2868, -1708, 1290), (0, 90, 0)); // naar gat in het dak
  1319.     CreateElevator((637, -3575, 848), (753, -3588, 856), (0, 90, 0)); // naar gat in huis
  1320.    
  1321.     //CreateElevator((943, 793, 66), (-2186, 3286, -7), (0, 90, 0));
  1322. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement