Guest User

ZM09 OLD ACS CODE

a guest
Feb 21st, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 67.55 KB | None | 0 0
  1. /* ZM09 SCRIPTS SOURCE CODE V1.0
  2.  
  3. THE BIGGEST MAP SCRIPTS EVER SAW ON ZOMBIE HORDE MAPS :D
  4. HAVE FUN EATING WORDS :)
  5. */
  6. #include "zcommon.acs"
  7. #import "ZMGAME.acs"
  8. #import "FUNCTION.ACS"
  9. #import "MODCVARS.acs"
  10. #define PLAYER_TID 600
  11. #define SPAWN_LAVA 0
  12. #define SPAWN_LAVA_SOUND 1
  13. #define OPENGL_PLAYER 1
  14. #define SOFTWARE_PLA    YER 0
  15. #define THEME_MUSIC 0
  16. #define RAVISHING_MUSIC 1
  17. #define LAST_HUMAN_MUSIC 2
  18. #define NEDM_MUSIC 3
  19. #define SOULSPHERE_MUSIC  4
  20. #define IMSCARED_MUSIC 5
  21. #define RAVISHING 1
  22. #define WHITE_FACE 2
  23. #define SOUL_SPHERE 3
  24. #define active true
  25.  
  26. int secret[10],selected;
  27. int debug_zm09;
  28. int tele_x,tele_y,tele_z,tele_active=0;
  29. int user_ghoulactivesound=0;
  30. int user_ghoulinvisible=0;
  31. int user_ghoulinvisiblecount=0;
  32. int user_invisible=0;
  33. int out_invisible=0;
  34. int sound_toplay=0;
  35. int timer_GHOUL=0;
  36. int script_test=0;
  37. int ghoul_invtest=0;
  38. int stuck_test=0;
  39. int dev=0;
  40. int ghoul_hate=0;
  41. int Music_Played=0;
  42. int weather=0;
  43. int generator1=1,generator2;
  44. int weather_quality=0;
  45. bool rain_sound=true;
  46. int  rain_detail=0;
  47. int soulsphere_damage=2.0;
  48. bool rainfall_actived=false;
  49. int nedm_code=0;
  50. int reflection_actived=true;
  51. int total_players=0;
  52. int menu_zm09;
  53. int ghoul_target;
  54. int ghoul_target_distance=0;
  55. int used_tids[11]={49,50,51,52,59,62,63,66,114,116,122};
  56. int Local_musicstore[6]={"IBMSND3","IBMSND2","IBMSND6","NEDM","IBMSND7","SUICIDE"};
  57. int zm09_strsettings[8]={"ULTRA LOW","LOW","MEDIUM","HIGH","ULTRA","EXTREME","ON","OFF"};
  58. bool debug_locker=0;
  59.  
  60. script 1 open{//MAIN SCRIPT
  61.     int getout=FALSE;    
  62.     int i=0;
  63.     nedm_code=random(0,3);
  64.     while(i<=10){
  65.         thing_remove(used_tids[i]);i++;
  66.     }Thing_Deactivate(44);
  67.     thing_deactivate(144);
  68.     secret_select();
  69.     secret_select_help();
  70.     red_keyspawn();
  71.     winery_key_spawn();
  72.     acs_execute(42,0,0,0,0);
  73.     while(getout==FALSE){
  74.         if(HumanCounter()==1 && zombieCounter()>=1){
  75.                 getout=TRUE;  
  76.                 Music_Played=LAST_HUMAN_MUSIC;
  77.                 SetMusic("ibmsnd6");
  78.         }delay(35);
  79.     }
  80. }
  81.  
  82. script 2 (int x){//Red door Switches
  83.     test_secret(x);
  84. }
  85.  
  86. script 3 OPEN clientside
  87. {//spark enable/disable
  88.     if(generator1==true || generator2==true)
  89.  {
  90.     Thing_Activate (154);
  91.     if(generator2==false)
  92.         Thing_Activate (155);
  93.  }
  94.     delay(70);
  95.     restart;
  96. }
  97.  
  98. script 4 (int who, int code){// White Face/Ravishing AI core
  99.     int safe_tid=ActivatorTID();
  100.     int wface_hatee=0;//Code 1414325 was removed, it would release whiteface and call script 35
  101.     int i=0,j=0;
  102.     int shorter_distance;
  103.     int farest_distance=0;
  104.     while(humancounter()>=1){
  105.         i=0;
  106.         wface_hatee=0;
  107.         farest_distance=0;
  108.         shorter_distance=2147483647;
  109.         while(i<32){
  110.             if(thingcount(t_none,i+600)==1){
  111.                 if(CheckActorInventory(i+600,"zombiemaker")==0){
  112.                     if(i+600!=safe_tid || humancounter()==1){
  113.                         j=ibm_distance (100,i+600);
  114.                         if(who==1){ //RAVISHING
  115.                             if(j<shorter_distance){
  116.                                 shorter_distance=j;
  117.                                 wface_hatee=i+600;
  118.                             }
  119.                         }else{//WHITE FACE
  120.                             if(j>farest_distance){
  121.                                 farest_distance=j;
  122.                                 wface_hatee=i+600;
  123.                             }
  124.                         }
  125.                     }
  126.                 }
  127.             }
  128.             i++;
  129.             delay(1);
  130.         }
  131.         ghoul_target=wface_hatee;
  132.         if(shorter_distance==2147483647)ghoul_target_distance=wface_hatee;
  133.         else  ghoul_target_distance=shorter_distance;
  134.         Thing_Hate(100,wface_hatee,6);
  135.         while(thingcount(T_NONE,wface_hatee)==1){
  136.             if(CheckActorInventory(wface_hatee,"zombiemaker")==1) break;
  137.             if(dev==0 && who==1){acs_execute(12,0,0,0,0); acs_execute (11,0,0,0,0);}
  138.             dev=0;
  139.             delay(35);
  140.         }
  141.         delay(1);
  142.     }
  143. }
  144.  
  145. SCRIPT 5 (void){
  146.     spawn("ShortGreenColumn",-2677.0, -3169.0, 211.0,0,0);
  147. }
  148. int lava_del_tids[8]={44,49,50,51,52,53,72,86};
  149. script 6 (void){//Lava Script
  150.     int time_delay=0;
  151.     tele_active=1;
  152.     time_delay=random(0,30);
  153.     if(time_delay>0) delay(35*time_delay);
  154.     Thing_ChangeTID(500, 66);
  155.     acs_execute(15,0,SPAWN_LAVA,0,0);//text effect
  156.     ThingSound(15,"IBMSND1",255);
  157.     Radius_Quake(random(5,9), 12*35, 0, 16, 15);
  158.     delay(255);
  159.     Ceiling_LowerAndCrush(4,7,6553);
  160.     Ceiling_LowerAndCrush(10,7,65536);
  161.     Ceiling_LowerAndCrush(94,4,65536);
  162.     Ceiling_LowerAndCrush(14,7,65536);
  163.     Ceiling_LowerAndCrush(18,7,65536);
  164.     Ceiling_LowerAndCrush(124,7,65536);
  165.     delay(350);
  166.     ceiling_raisebyvalue(9,10,335);
  167.     ceiling_raisebyvalue(48,10,464);
  168.     acs_execute(15,0,SPAWN_LAVA_SOUND,0,0);//text effect
  169.     delay(350);
  170.     door_close(4,7);    door_close(10,7);    door_close(94,4);    door_close(14,7);    door_close(18,7);    door_close(124,7);
  171.     acs_execute(17,0,0,0,0);
  172.     time_delay=0;while(time_delay<8){
  173.         thing_remove(lava_del_tids[time_delay]);time_delay++;
  174.     }generator2=0;
  175.     acs_execute(34,0,generator1*10+generator2,0,0);
  176.     Light_ChangeToValue(80,80);
  177.     Light_changetovalue(81,80);
  178.     Thing_ChangeTID(66, 500);
  179.     Sector_SetDamage(7,MOD_LAVA,MOD_LAVA);
  180.     delay(random(350,3500));
  181.     acs_execute(13,0,0,0,0);
  182. }
  183.  
  184. script 7 (void){//50% Right code door open on cave
  185.     floor_lowerbyvalue(29,25,320);
  186.     floor_lowerbyvalue(26,25,256);
  187.     floor_lowerbyvalue(24,25,192);
  188.     floor_LOWERbyvalue(17,25,128);
  189.     floor_lowerbyvalue(16,25,64);
  190. }
  191.  
  192. int ravishing_script;
  193. script 8 (void){//Ravishing Script : Attack
  194.     ravishing_script=8;
  195.     dev=8;
  196.     stuck_test=0;
  197.     ghoul_invtest=0;
  198.     user_ghoulactivesound=0;
  199.     timer_GHOUL=0;
  200.     user_invisible=0;
  201.     user_ghoulinvisible=0;
  202.     timer_GHOUL=0;
  203.     user_ghoulinvisible=0;
  204.     if(out_invisible==0) out_invisible=50;
  205.     SetActorProperty(100,APROP_Speed,16.0);
  206. }
  207.  
  208. script 9 (int x){//Ravishing Script : Check monster require change status
  209.     ravishing_script=9;
  210.     ghoul_hate=x;
  211.     dev=9;
  212.     script_test=1;
  213.     if(user_invisible==true && user_ghoulinvisible==false && ghoul_invtest==false)
  214.     {
  215.         user_ghoulinvisible=true;
  216.         ghoul_invtest=true;
  217.         SetActorProperty(100,APROP_Speed,26.0);
  218.     }
  219.     else if(user_invisible==0 && user_ghoulinvisible==0 && ghoul_invtest==1)
  220.     {
  221.         user_ghoulinvisible=2;
  222.         ghoul_invtest=false;
  223.         SetActorProperty(100,APROP_Speed,16.0);
  224.     }
  225.     setresultvalue(user_ghoulinvisible);
  226.     delay(1);
  227.     user_ghoulinvisible=false;
  228.    
  229. }
  230. script 10 (VOID){//Ravishing Script: Dormaint script
  231.     ravishing_script=10;
  232.     dev=10;
  233.     stuck_test=0;
  234.     user_ghoulactivesound=0;
  235.     ghoul_invtest=0;
  236.     timer_GHOUL=0;
  237.     user_invisible=0;
  238.     timer_GHOUL=0;
  239.     user_ghoulinvisible=0;
  240.     SetActorProperty(100,APROP_Speed,16.0);
  241. }
  242.  
  243. script 11 (void){//Ravishing Script: main code
  244.     ravishing_script=11;
  245.     int pos_x=0,pos_y=0,pos_z=0;
  246.     while(true){
  247.         dev=true;
  248.         if(pos_x==getactorx(100) && pos_y==getactory(100) && pos_z==getactorz(100)){
  249.             stuck_test++;
  250.         }else{  
  251.             stuck_test=0;
  252.             pos_x=getactorx(100);
  253.             pos_y=getactory(100);
  254.             pos_z=getactorz(100);
  255.         }if(stuck_test==50){
  256.             user_invisible=1;
  257.             user_ghoulinvisible=0;
  258.             ghoul_invtest=0;
  259.             timer_GHOUL=0;
  260.            
  261.         }if(out_invisible>0){
  262.             SetActorProperty(100,APROP_Speed,16.0);
  263.         }if(timer_GHOUL>=16 && user_invisible==true){
  264.             user_invisible=false;
  265.             timer_GHOUL=0;
  266.             SetActorProperty(100,APROP_Speed,16.0);
  267.         }else if(timer_GHOUL>=7 && user_invisible==false){
  268.             timer_GHOUL=0;
  269.             user_invisible=true;
  270.         }if(user_invisible==true)
  271.         {
  272.             sound_toplay=1;
  273.         }else sound_toplay=0;
  274.         if(out_invisible>0) out_invisible--;
  275.         script_test=0;
  276.         delay(1);    
  277.     }
  278. }
  279.  
  280. script 12 (void){//Ravishing Script: Sound Effects
  281.    while(true){
  282.        ravishing_script=12;
  283.        if(sound_toplay==0){
  284.             while(user_ghoulactivesound<4 && user_invisible==0){
  285.                   user_ghoulactivesound++;
  286.                   delay(35);
  287.             }
  288.             timer_GHOUL++;
  289.             user_ghoulactivesound=false;
  290.             if(user_invisible==true) ThingSound(100,"EFF5",127);
  291.             else if(user_ghoulinvisible==false) ThingSound(100,"EFF10",127);
  292.         }
  293.         else{
  294.             while(user_ghoulactivesound<2 && user_invisible==true){
  295.                user_ghoulactivesound++;
  296.                delay(35);
  297.             }
  298.             timer_GHOUL++;
  299.             user_ghoulactivesound=0;
  300.            if(user_invisible==true) ThingSound(100,"EFF5",127);
  301.            else if(user_ghoulinvisible==false) ThingSound(100,"EFF10",127);
  302.        }
  303.        delay(1);
  304.      }
  305. }
  306.  
  307. script 13 (void){//Ravishing Script: Summon ravishing and other resources
  308.     ravishing_script=13;
  309.     delay(random(350,700));
  310.     SetFont("BIGFONT");
  311.     ThingSound(77,"IBMEFF3",127);
  312.     generator1=0;
  313.     acs_execute(34,0,generator1*10+generator2,0,0);
  314.     Thing_remove(96);
  315.     HudMessageBold(s:"\nPRIMARY GENERATOR IS NOW DESTROYED"; HUDMSG_FADEOUT, 980, CR_RED, 0.5, 0.2, 9.8, 0.5);
  316.     delay(50);
  317.     ThingSound(97,"IBMEFF3",127);
  318.     delay(50);
  319.     ThingSound(97,"IBMEFF2",127);
  320.     Music_Played=RAVISHING_MUSIC;
  321.     SetMusic("ibmsnd2");
  322.     SpawnSpot ("ravishing",25,100,24);
  323.     acs_execute(4,0,1,0,0);
  324.     delay(35);
  325.     acs_execute(11,0,0,0,0);
  326.     ACS_EXECUTE(12,0,0,0,0);//RAVISHING SOUND CODE
  327.     while(Game_info_round_timer==0) delay(1);
  328.     while(true){
  329.         if(Game_info_round_timer==0 || zombieCounter()==0 || HumanCounter()==0) Thing_Deactivate(100);
  330.         delay(1);
  331.     }
  332. }
  333. int teste=0;
  334.  
  335. Script 14 (void) clientside{//Generic Locked Door Mensage/Sound
  336.     if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
  337.     Print(s:"That door is locked.");
  338.     ActivatorSound("DRLOCKED", 127);
  339.     delay(15);
  340. }
  341.  
  342. script 15 (int action) clientside{//Lava Script: Mensage/sound Effect
  343.     if(action==SPAWN_LAVA){
  344.         int i=0;
  345.         while(i<17){
  346.             SetFont("BIGFONT");
  347.             HudMessageBold(s:"                                        \c[b3]WARNING!!!\n\c[b1] A QUAKE DESTROYED THE SYSTEM WHO MAKES THE LAVA STABLE\n             \c[j5]EVACUATE THE CAVE IMMEDIATELY!!! OR GET TOASTED"; HUDMSG_FADEOUT, 999, CR_RED, 0.5, 0.2, 0.5, 0.5);
  348.             i++;
  349.             delay(35);
  350.         }
  351.         delay(random(400,800));
  352.         delay(200);
  353.     }else{
  354.         while(true){//Replace with ambientsound
  355.             ThingSound(15,"ibmlava1",255);
  356.             delay(67);
  357. }   }   }
  358.  
  359. script 16 (void){//Teleport script, avoid telefrag
  360.     if(ThingCountSector(T_NONE,0,28)==2) teleport(38,0,0);
  361. }
  362.  
  363. script 17 (void){//Unlock Teleport Door
  364.     if(tele_active==1){
  365.         tele_active++;
  366.         SetFont("BIGFONT");
  367.         HudMessageBold(s:"a door is now unlocked"; HUDMSG_FADEOUT, 998, CR_YELLOW, 0.5, 0.5, 5.5, 0.5);
  368.         AmbientSound("REVEAL",127);
  369.         door_open(64,25);
  370.     }
  371. }
  372.  
  373. script 18 (void) setresultvalue(soulsphere_damage);
  374.  
  375.  
  376. int phase_light_name[4]={"phaselight1","phaselight3","phaselight1","phaselight2"};
  377. script 19 (void){//Generator Script
  378.     int light_spotid=40,i;
  379.     int light_id=49;
  380.     Thing_Activate(44);
  381.     spawnspot("steamspawner",130,0,0);
  382.     ThingSound(40,"IBMEFF2",127);
  383.     ThingSound(40,"IBMEFF1",127);
  384.     teleportother(53,44,0);
  385.     while(light_Spotid<=43){
  386.         ThingSound(light_spotid,"IBMEFF1",127);
  387.         for(i=0;i<4;i++){
  388.             thing_remove(light_id);
  389.             SpawnSpot(phase_light_name[i],light_spotid,light_id,0);
  390.             delay(5);
  391.         }light_spotid++;
  392.         light_id++;
  393.         delay(35);
  394.     }generator2=1;
  395.     acs_execute(34,0,generator1*10+generator2,0,0);
  396.     delay(150);
  397.     Light_changetovalue(80,255);
  398.     Light_changetovalue(81,255);
  399.     acs_execute(42,0,1);
  400. }
  401.  
  402. script 20 (int door){//Super Shotgun Little Door open
  403.     activatorsound("EFF11",255);
  404.     delay(35);
  405.     if(door==1)
  406.         door_open(146,30);
  407.     else{
  408.         door_open(69,13);
  409.         spawnspot("fakedoubleshotgun",68,0,0);
  410.     }
  411. }
  412.  
  413. int script_21[2]={"YES","NO"};
  414.  
  415. script 22 open {//End Selector can spawn one or two soulspheres
  416.     int victim=0;
  417.     int ending=random(0,100);
  418.     INT GETOUT2=FALSE;
  419.     int soul_hatee=0;
  420.     int i=0,j=0;
  421.     int shorter_distance;
  422.     int k=0;
  423.     delay(1);
  424.     total_players=HumanCounter();
  425.     if(ending<=30)//if ending <= 30% do
  426.     {
  427.         while(getout2==FALSE)
  428.         {
  429.             if(Game_info_round_timer==0);//Fix a bug when the zombies don't come
  430.             else  if(Game_info_round_timer<=120 && thingcount(T_NONE,100)==0){//Spawn if timer is 2:00 and if there're no more ghouls ingame
  431.                 getout2=TRUE;  
  432.                 Music_Played=SOULSPHERE_MUSIC;
  433.                 SetMusic("ibmsnd7");  
  434.             }
  435.             delay(35);
  436.         }
  437.         delay(350);
  438.         if(((humancounter()+zombiecounter())*100)/total_players>=90){//Total of players ingame/total of players on map start >=90% , spawn 2 soul spheres
  439.             SpawnSpot ("ghouldemon",25,114,24);
  440.         }
  441.         SpawnSpot ("ghouldemon",76,114,24);
  442.         while(true){
  443.             i=0;
  444.             shorter_distance=2147483647;
  445.             while(i<32){
  446.                 if(thingcount(t_none,i+600)==1){
  447.                     j=ibm_distance (100,i+600);
  448.                         if(j<shorter_distance){
  449.                             shorter_distance=j;
  450.                             soul_hatee=i+600;
  451.                         }
  452.                 }
  453.                 delay(1);
  454.                 i++;
  455.             }
  456.             Thing_Hate(114,soul_hatee,6);
  457.             if(CheckActorInventory(soul_hatee,"zombiemaker")) {soulsphere_damage=random(188,225); SetActorProperty(114,APROP_Speed,36.0);}
  458.             else {soulsphere_damage=random(4,7); SetActorProperty(114,APROP_Speed,24.0);}
  459.             while(thingcount(T_NONE,soul_hatee)==1) {delay(35);}
  460.         delay(1);
  461.         }
  462.     }
  463. }
  464.  
  465. script 23 (int type, int arg1, int arg2) clientside{//Update the clientside from who called the debug command
  466.     if(type==1){
  467.         user_ghoulactivesound=arg1;
  468.         user_invisible=arg2;
  469.     }else if(type==2){
  470.         script_test=arg1;
  471.         ghoul_invtest=arg2;
  472.     }else if(type==3){
  473.         stuck_test=arg1;  
  474.         script_test=arg2;
  475.     }else if(type==4){
  476.         ghoul_hate=arg1;  
  477.         sound_toplay=arg2;
  478.     }else if(type==5){
  479.         ghoul_target=arg1;
  480.         ghoul_target_distance=arg2;
  481.     }else if(type==6){
  482.         soulsphere_damage=arg1;    
  483.         generator1=arg2;
  484.     }else if(type==7){
  485.         generator2=arg1;
  486.         dev=arg2;
  487.     }else if(type==8){
  488.         weather=arg1;
  489.         debug_zm09=arg2;
  490.        
  491.     }
  492. }
  493.  
  494. script 24 open clientside{//INTRO
  495.     zm09_update_settings();
  496.     printbold(s:"============================================================\n|ZM09 - ABANDONED MINES - CREATED BY IBM5155\n============================================================\n                 /!\ OpenGL required /!\ \n                  \!/ Playable on soft\!/ \nZM09 V1.0 FINAL VERSION");
  497.     printbold(s:"SPECIAL THANKS TO:\n-ESTAR\n-Ijon Tichy\n-Slave2theLight\n-Torn City author\n-Ivan Zanotti\n-Dusk\n-IVAN\n-HexaDoken\n-Cruduxy\n-Popsoap\n-Mr.Fiat\n-Mr.Man\n-'Monolith' for the piano sound\n-'Mojang' for the rain sound\n-'Imscared - A Pixelated Nightmare' for the white face idea");
  498.     printbold(s:"");
  499.     printbold(s:"FAST HELP\n-The red key card spawn randomly everywhere, there'll be no specific place for spawn\n-on the computer room on the red door sector, there'll be sometimes a display with number, this number have a secret code, if you discover the secret of the code you'll know the right code to put on the switches\n-One of the third floor rooms are haunted, so look out when entering there\n-To activate NEDM you'll need to make the right code outside, and then press 2 switches inside cade X times\n-Ravishing and White-Face don't kill zombies, so have fun being a zombie\n-Soulphere is as dangerous for humans as for zombies\n-if you're laging, down the map settings writing puke 48 here");
  500.     printbold(s:"");
  501.     HudMessagebold(s:"\czmap settings can be configured writing \cjpuke 48\cf on console"; HUDMSG_FADEINOUT, 544, CR_UNTRANSLATED, 0.5, 0.8,15.1,0, 0.3);
  502.     delay(200);
  503.     setfont("bigfont");
  504.     HudMessageBold(s:"ABANDONED MINES"; HUDMSG_FADEINOUT, 0, CR_RED, 0.85, 0.25, 9.0,3.0, 1.5);
  505.     delay(70);
  506.     setfont("bigfont");
  507.     HudMessageBold(s:"AUTHOR:IBM5155"; HUDMSG_FADEINOUT, 0, CR_WHITE, 0.84, 0.27, 7.0,3.0, 1.5);
  508. }
  509.  
  510. script 25 open clientside{//Flicker blue computer room
  511.     int brightlevel=255;
  512.     while(true){
  513.         if(generator1==1 && generator2==0){
  514.             if(brightlevel>100) brightlevel=random(0,100);
  515.             else brightlevel=random(101,255);
  516.             Light_ChangeToValue(80,brightlevel);
  517.             Light_changetovalue(81,brightlevel);
  518.         }else if(generator1==0 && generator2==0){
  519.             Light_ChangeToValue(80,112);
  520.             Light_changetovalue(81,112);
  521.         }else{
  522.             Light_ChangeToValue(80,255);
  523.             Light_changetovalue(81,255);
  524.         }delay(random(1,10));
  525.     }
  526. }
  527. int ibmnu_text[5]={"ibmnu1","ibmnu2","ibmnu3","ibmnu4","ibmnu1"};
  528.  
  529. script 26 open{//Update server side functions to clientside
  530.     while(true){
  531.         acs_execute(23,0,1,user_ghoulactivesound,user_invisible);
  532.         delay(1);
  533.         acs_execute(23,0,2,script_test,ghoul_invtest);
  534.         delay(1);
  535.         acs_execute(23,0,3,stuck_test,script_test);
  536.         delay(1);
  537.         acs_execute(23,0,4,ghoul_hate,sound_toplay);
  538.         delay(1);
  539.         acs_execute(23,0,5,ghoul_target,ghoul_target_distance);
  540.         delay(1);
  541.         acs_execute(23,0,6,soulsphere_damage,generator1);
  542.         delay(1);
  543.         acs_execute(23,0,7,generator2,dev);
  544.         delay(1);
  545.         acs_execute(23,0,8,weather,ibm_distance(100,ghoul_target));
  546.         delay(10);
  547.     }
  548. }
  549. script 27 open {//Switch Code display core
  550.     int comm=0;
  551.     int num_pos=0;
  552.     int s_exit=FALSE;
  553.     while(s_exit==FALSE){
  554.         if(comm==0 && secret[8]+secret[9]+82!=86) {SetLineTexture(secret[8]+secret[9]+82,SIDE_FRONT,TEXTURE_MIDDLE,"ibmnu5"); comm++;}
  555.         else if (secret[8]+secret[9]+82!=86) {SetLineTexture(secret[8]+secret[9]+82,SIDE_FRONT,TEXTURE_MIDDLE,"ibmnu6"); comm--;}
  556.         else s_exit=true;
  557.         num_pos=secret[secret[8]+secret[9]+3];//receive the actual number;
  558.         if(num_pos!=0)SetLineTexture(secret[8]+secret[9]+81,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[num_pos-1]);
  559.         delay(10);
  560.     }
  561. }
  562.  
  563. int nedm_digit1='-',nedm_digit2='-',nedm_digit3='-',nedm_digit4='-', nedm_digit5='-', nedm_digit6='-';
  564. bool nedm_digit_lock=false;
  565.  
  566. int mcdonald=0;
  567. int pos_z_nedm;
  568. script 29 (int input){//Nedm Script: Switch counter to allow nedm
  569.     bool script_lock=false;
  570.    
  571.     pos_z_nedm=getactorz(PlayerNumber()+600);
  572.     if(input==6){
  573.         if(pos_z_nedm<140.0){
  574.             script_lock=true;
  575.     }   }
  576.     else if(input==2){
  577.         if(pos_z_nedm<110.0){
  578.             script_lock=true;
  579.     }   }
  580.     else if(input==3){
  581.         if(pos_z_nedm<230.0){
  582.             script_lock=true;
  583.     }   }
  584.     if(nedm_digit_lock==false && script_lock==false && script_lock==false){
  585.         if(nedm_digit1=='-') {nedm_digit1=input; print(s:"NEDM SWITCH CODE\n",d:nedm_digit1,s:" - - - - -");}
  586.         else if(nedm_digit2=='-') {nedm_digit2=input; print(s:"NEDM SWITCH CODE\n",d:nedm_digit1,s:" ",d:nedm_digit2,s:" - - - -");}
  587.         else if(nedm_digit3=='-') {nedm_digit3=input; print(s:"NEDM SWITCH CODE\n",d:nedm_digit1,s:" ",d:nedm_digit2,s:" ",d:nedm_digit3,s:" - - -");}
  588.         else if(nedm_digit4=='-') {nedm_digit4=input; print(s:"NEDM SWITCH CODE\n",d:nedm_digit1,s:" ",d:nedm_digit2,s:" ",d:nedm_digit3,s:" ",d:nedm_digit4,s:" - -");}
  589.         else if(nedm_digit5=='-') {nedm_digit5=input; print(s:"NEDM SWITCH CODE\n",d:nedm_digit1,s:" ",d:nedm_digit2,s:" ",d:nedm_digit3,s:" ",d:nedm_digit4,s:" ",d:nedm_digit5,s:" -");}
  590.         else if(nedm_digit6=='-') {nedm_digit6=input; print(s:"NEDM SWITCH CODE\n",d:nedm_digit1,s:" ",d:nedm_digit2,s:" ",d:nedm_digit3,s:" ",d:nedm_digit4,s:" ",d:nedm_digit5,s:" ",d:nedm_digit6);}
  591.     }else if(input!=0) print(s:"locked");
  592.     if(nedm_digit6!='-'){
  593.         if(nedm_code==0){
  594.             if(nedm_digit1==1 && nedm_digit2==2 && nedm_digit3==3 && nedm_digit4==4 && nedm_digit5==5 && nedm_digit6==6){
  595.                 printbold(n:0, s:" found the right code for active nedm!!!");
  596.                 ceiling_raisebyvalue(91,1,8);
  597.                 nedm_digit_lock=true;
  598.                 nedm_digit6='-';
  599.             }
  600.             else{
  601.                 nedm_digit1='-'; nedm_digit2='-'; nedm_digit3='-'; nedm_digit4='-'; nedm_digit5='-'; nedm_digit6='-';
  602.                 print(s:"wrong code");
  603.             }
  604.         }else if(nedm_code==1){
  605.             if(nedm_digit1==6 && nedm_digit2==5 && nedm_digit3==4 && nedm_digit4==3 && nedm_digit5==2 && nedm_digit6==1){
  606.                 printbold(n:0, s:" found the right code for active nedm!!!");
  607.                 ceiling_raisebyvalue(91,1,8);
  608.                 nedm_digit_lock=true;
  609.                 nedm_digit6='-';
  610.             }
  611.             else{
  612.                 nedm_digit1='-'; nedm_digit2='-'; nedm_digit3='-'; nedm_digit4='-'; nedm_digit5='-'; nedm_digit6='-';
  613.                 print(s:"wrong code11");
  614.             }
  615.         }else if(nedm_code==2){
  616.             if(nedm_digit1==1 && nedm_digit2==1 && nedm_digit3==1 && nedm_digit4==6 && nedm_digit5==6 && nedm_digit6==6){
  617.                 printbold(n:0, s:" found the right code for active nedm!!!");
  618.                 ceiling_raisebyvalue(91,1,8);
  619.                 nedm_digit_lock=true;
  620.                 nedm_digit6='-';
  621.             }
  622.             else{
  623.                 nedm_digit1='-'; nedm_digit2='-'; nedm_digit3='-'; nedm_digit4='-'; nedm_digit5='-'; nedm_digit6='-';
  624.                 print(s:"wrong code");
  625.             }
  626.         }else{
  627.             if(nedm_digit1==6 && nedm_digit2==6 && nedm_digit3==6 && nedm_digit4==1 && nedm_digit5==1 && nedm_digit6==1){
  628.                 printbold(n:0, s:" found the right code for active nedm!!!");
  629.                 ceiling_raisebyvalue(91,1,8);
  630.                 nedm_digit_lock=true;
  631.                 nedm_digit6='-';
  632.             }
  633.             else{
  634.                 nedm_digit1='-'; nedm_digit2='-'; nedm_digit3='-'; nedm_digit4='-'; nedm_digit5='-'; nedm_digit6='-';
  635.                 print(s:"wrong code");
  636.             }
  637.  
  638.         }
  639.     }
  640.     //-------------------------------------------------------------------------------------------------
  641.     if(input==0) {mcdonald++;}
  642.     if(mcdonald==55){
  643.         ceiling_lowerbyvalue(91,100,8);
  644.         ceiling_raisebyvalue(92,1,8);
  645.     }
  646.     else if(mcdonald==105){
  647.         acs_execute(30,0,0,0,0);
  648.         ceiling_lowerbyvalue(92,100,8);
  649.         delay(353);
  650.         floor_lowerbyvalue(89,200,200);
  651.         floor_lowerbyvalue(90,200,200);
  652.         tagwait(90);
  653.         Floor_Waggle(89, 2000, 100, 0, 0);
  654.         delay(100);
  655.         Floor_Waggle(90, 2000, 100, 0, 0);
  656.     }
  657. }
  658.  
  659.  
  660.        
  661. int nedm_desactive=false;
  662.  
  663. script 30 (void) clientside{//NEDM code spam
  664.     int counter=0;
  665.     int posy=-3.0;
  666.     while(posy<=0.05){
  667.         SetFont("NEDML");
  668.         if(nedm_desactive==false)HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, 0.5, posy,0.1,0, 0.3);
  669.         posy+=0.01;
  670.         delay(1);
  671.     }SetFont("NEDML");
  672.     if(nedm_desactive==false)HudMessagebold(s:"A"; HUDMSG_PLAIN , 800, counter, 0.5, posy,1.5,0, 0);
  673.     Music_Played=NEDM_MUSIC;
  674.     if(nedm_desactive==false)setmusic("NEDM",0,0);
  675.     delay(35);
  676.     if(nedm_desactive==false)spawnspot("FlareDisco",87,132,0);
  677.     ACS_Suspend(34,0);
  678.     acs_execute(31,0);
  679.     if(nedm_desactive==false)acs_execute(33,0);
  680.     while(true){
  681.         if(nedm_desactive==false){
  682.             SetFont("NEDML");
  683.             HudMessagebold(s:"A"; HUDMSG_PLAIN , 800, counter, 0.5, posy,0.1,0, 0);
  684.         }delay(1);
  685.     }
  686. }
  687.  
  688. script 31 (void) clientside{//Nedm Code:Cat see
  689.     int posx1=0.1;
  690.     int posx2=0.9;
  691.     int posy=0.9;
  692.     while(true){
  693.         while(posy>=0.1){
  694.             if(nedm_desactive==false){
  695.                 SetFont("NEDMCAT");
  696.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx1, posy,0.1,0, 0.2);
  697.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx2, posy,0.1,0, 0.2);
  698.             }
  699.             posy-=0.010;  
  700.             delay(3);
  701.         }while(posx1<=0.9){
  702.             if(nedm_desactive==false){
  703.                 SetFont("NEDMCAT");
  704.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx1, posy,0.1,0, 0.2);
  705.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx2, posy,0.1,0, 0.2);
  706.             }
  707.             posx2=1.0-posx1;
  708.             posx1+=0.010;
  709.             delay(3);
  710.         }while(posy<=0.9){
  711.             if(nedm_desactive==false){
  712.                 SetFont("NEDMCAT");
  713.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx1, posy,0.1,0, 0.2);
  714.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx2, posy,0.1,0, 0.2);
  715.             }
  716.             posy+=0.010;
  717.             delay(3);
  718.         }while(posx1>=0.1){
  719.             if(nedm_desactive==false){
  720.                 SetFont("NEDMCAT");
  721.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx1, posy,0.1,0, 0.2);
  722.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx2, posy,0.1,0, 0.2);
  723.             }
  724.             posx2=1.0-posx1;
  725.             posx1-=0.010;
  726.             delay(3);
  727.         }
  728.         delay(1);
  729.     }
  730. }
  731. script 32 (int x) NET clientside
  732. {
  733.     if(thingcount(t_none,playernumber()+600)==0)
  734.         changecamera(100,playernumber(),0);
  735. }
  736. script 33 (int light, int var) clientside{//Nedm colored lights
  737.     int arg1,arg2,arg3;
  738.     int posy,i;
  739.     if(light==2){
  740.         For(i=49;i<=52;i++)    Thing_SetSpecial(i,0,var,var,var);
  741.         Thing_SetSpecial(86,0,var,var,var);
  742.         Thing_SetSpecial(88,0,var,var,var);
  743.     }
  744.     else{
  745.         while(TRUE){
  746.             posy=random(0,6);
  747.             switch(posy){
  748.             case 0:
  749.                 arg1=random(70,255);
  750.                 arg2=random(70,255);
  751.                 arg3=random(70,255);
  752.                 break;
  753.             case 1:
  754.                 arg1=random(0,100);
  755.                 arg2=random(0,100);
  756.                 arg3=random(100,255);
  757.                 break;
  758.             case 2:
  759.                 arg1=random(0,100);
  760.                 arg2=random(100,255);
  761.                 arg3=random(0,100);
  762.                 break;
  763.             case 3:
  764.                 arg1=random(100,255);
  765.                 arg2=random(0,100);
  766.                 arg3=random(0,100);
  767.                 break;
  768.             case 4:
  769.                 arg1=random(100,255);
  770.                 arg2=random(100,255);
  771.                 arg3=random(0,100);
  772.                 break;
  773.             case 5:
  774.                 arg1=random(100,255);
  775.                 arg2=random(0,100);
  776.                 arg3=random(100,255);
  777.                 break;
  778.             case 6:
  779.                 arg1=random(0,100);
  780.                 arg2=random(100,255);
  781.                 arg3=random(100,255);
  782.                 break;
  783.             }
  784.             for(i=49;i<53;i++) Thing_SetSpecial(i,0,arg1,arg2,arg3);
  785.             Thing_SetSpecial(86,0,arg1,arg2,arg3);
  786.             Thing_SetSpecial(88,0,arg1,arg2,arg3);
  787.             delay(3);
  788.         }
  789.     }
  790. }
  791. int script_34_adress[10]={49,50,51,52,86,88,145,125,126,103};
  792. script 34 (int action) clientside{//LIGHT effected by ravishing, lava and generator on
  793.     int arg1=100,arg2=100,arg3=100;
  794.     int posy;
  795.     int i=122,j=0;
  796.     int effect=0;
  797.     if(getplayerrender()==OPENGL_PLAYER){
  798.             if(action==1){
  799.                 while(true){/*--------------------------------------------------------------------
  800.                     while(arg1<=135)
  801.                     {
  802.                         j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,arg1,arg2,arg3); j++;}
  803.                         arg1+=5;arg2+=5;arg3+=5;
  804.                         delay(1);      
  805.                     }
  806.                     while(arg1>=30)
  807.                     {
  808.                         j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,arg1,arg2,arg3); j++;}
  809.                         arg1-=5;arg2-=5;arg3-=5;
  810.                         delay(1);      
  811.                     }
  812.                 delay(1);
  813.                 }--------------------------------------------------------------------*/
  814.                     effect=random(0,1000);
  815.                     if(effect<=300 || effect>=400){
  816.                         arg1=random(0,50);
  817.                         for(j=0;j<=6;j++){
  818.                             Thing_SetSpecial(script_34_adress[j],0,arg1,arg1,arg1);
  819.                         }delay(random(1,9));
  820.                         arg1=random(50,160);
  821.                         for(j=0;j<=6;j++){Thing_SetSpecial(script_34_adress[j],0,arg1,arg1,arg1);}
  822.                         delay(random(1,9));
  823.                     }else if(effect<=350){
  824.                         for(j=0;j<=6;j++){Thing_SetSpecial(script_34_adress[j],0,0,0,0);}
  825.                         delay(random(15,50));
  826.                     }
  827.                     else{
  828.                         for(j=0;j<=6;j++){Thing_SetSpecial(script_34_adress[j],0,0,0,0);}
  829.                         delay(random(60,150));
  830.                     }
  831.                 }
  832.                 while(arg1<=135)
  833.                     {
  834.                         j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,arg1,arg2,arg3); j++;}
  835.                         arg1+=5;arg2+=5;arg3+=5;
  836.                         delay(1);      
  837.                     }
  838.                 //----------------------------------------------------NEW
  839.             }
  840.             else if(action==11){
  841.                     arg1=255;arg2=255;arg3=255;
  842.                     j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,arg1,arg2,arg3); j++;}
  843.                     generator2=1;
  844.             }
  845.             else if(action==0){
  846.                     j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,0,0,0); j++;}
  847.             }
  848.             else;
  849.             delay(1);
  850.     }else{
  851.              if(action==true){
  852.                 while(true){
  853.                     while(arg1<=135){
  854.                         for(i=7;i<10;i++, arg1+=5)Light_ChangeToValue(script_34_adress[i],arg1);
  855.                         delay(1);      
  856.                     }
  857.                     while(arg1>=30){
  858.                         for(i=7;i<10;i++, arg1-=5)Light_ChangeToValue(script_34_adress[i],arg1);
  859.                         delay(1);      
  860.                     }
  861.                 delay(1);
  862.                 }
  863.             }
  864.             else if(action==11){
  865.                     arg1=255;
  866.                     for(i=7;i<10;i++)Light_ChangeToValue(script_34_adress[i],arg1);
  867.                     generator2=1;
  868.             }
  869.             else if(action==0){
  870.                     for(i=7;i<10;i++, arg1-=5)Light_ChangeToValue(script_34_adress[i],arg1);
  871.             }
  872.             delay(1);
  873.         }
  874. }
  875. script 35 (void){//White Face Script
  876.     int rnd=0;
  877.     int snd=0;
  878.     int i=0;
  879.     delay(5);
  880.     ReplaceTextures("CONS1_5","ITEX20");
  881.     ReplaceTextures("ITEXE10","ITEXE33");
  882.     ReplaceTextures("ITEXE11","ITEXE33");
  883.     ReplaceTextures("ITEXE12","ITEXE29");
  884.     ReplaceTextures("ITEXE13","ITEXE41");
  885.     ReplaceTextures("ITEXE14","ITEXE41");
  886.     ReplaceTextures("IBMNU6","ITEX25");
  887.     ReplaceTextures("IBMNU5","ITEX25");
  888.     ReplaceTextures("IBMNU4","ITEX25");
  889.     ReplaceTextures("IBMNU3","ITEX25");
  890.     ReplaceTextures("IBMNU2","ITEX25");
  891.     ReplaceTextures("IBMNU1","ITEX25");
  892.     ReplaceTextures("COMPTALL","ITEXE45");
  893.     SetActorProperty(100,APROP_RenderStyle,STYLE_Translucent);
  894.     while(true){
  895.         rnd=random(0,100);
  896.         if(rnd<=15){
  897.             ThingSound(100,"ELAUGHT",127);
  898.             while(i<=1.0){
  899.                 SetActorProperty(100,APROP_Alpha,i);
  900.                 i+=6553;
  901.                 delay(2);
  902.             }while(i>=0){
  903.                 SetActorProperty(100,APROP_Alpha,i);
  904.                 i-=6553;
  905.                 delay(2);
  906.             }
  907.         }else if(rnd>=90){
  908.             SetActorProperty(100,APROP_Speed,12.0);
  909.             while(snd<=23){
  910.                 snd++;
  911.                 ThingSound(100,"KIDSND",127);
  912.                 while(i<=1.0){
  913.                     SetActorProperty(100,APROP_Alpha,i);
  914.                     i+=6553;
  915.                     delay(2);
  916.                 }while(i>0){
  917.                     SetActorProperty(100,APROP_Alpha,i);
  918.                     i-=6553;
  919.                     delay(2);
  920.                 }
  921.             }SetActorProperty(100,APROP_Speed,3.0);
  922.             SetActorProperty(100,APROP_Alpha,0.0);
  923.             snd=0;
  924.        }else{
  925.             ThingSound(100,"GDSEE",127);
  926.             rnd=random(0,100);
  927.             if(rnd>49){
  928.                 SetActorProperty(100,APROP_Alpha,0.3);
  929.                 delay(12);
  930.                 SetActorProperty(100,APROP_Alpha,0.0);
  931.             }
  932.        }delay(50);
  933.    }
  934. }
  935.  
  936.  
  937. script 38 (int x) clientside{//Miners dead description
  938.     if(x==1)    print(s:"Ravick\nwa born in 08/04/1980\nDead in 06/03/2007\nUnknow death, his body was founded on the mine, with a mensage to not going back or others would die, the suspects are it was James spirit that killed he, with a hellish pet");
  939.     else if(x==2)    print(s:"735 miners died with unknow reasons on the mines and on the houses near mine, all the dead bodies were buried inside a little wood room, and it was sealed with land, noone could enter on it\nFor dangerous reasons, all the mines areas and houses were evacuated and abandoned to avoid more deaths");  
  940.     else    print(s:"James\nWas born in 06/05/1975\nDead in 06/03/1983\nSuicide\nchildren with mental problens");
  941. }
  942.  
  943. script 39 (void){//Remove water on blue key door
  944.     Ceiling_lowerbyvalue(104,30,1248);
  945. }
  946.  
  947. script 40 (int qnt){//Kid Laught in some areas
  948.     int i=0;
  949.     int k;
  950.     while(i<=qnt){
  951.         k=random(0,100);
  952.         if(k==50){
  953.             activatorsound("ELAUGHT",255);
  954.             i=qnt;
  955.         }
  956.         else{
  957.             k=random(0,100);
  958.         }
  959.         i++;
  960.     }
  961. }
  962.  
  963.  
  964.  
  965. script 41 (int X) clientside{//White Face scirpt: Change the map + Ravishing vision
  966.     int i=0;
  967.     int k=90;
  968.     int j;
  969.     if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
  970.     if(x==1){//I´m scared kill
  971.         ACS_Terminate(30,0);
  972.         ACS_Terminate(31,0);
  973.         ACS_Terminate(32,0);
  974.         ACS_Terminate(33,0);
  975.         ACS_Terminate(34,0);
  976.         generator1=0;
  977.         generator2=0;
  978.         ReplaceTextures("ITEX20","ITEX24");
  979.         ReplaceTextures("ITEXE29","ITEXE50");
  980.         ReplaceTextures("ITEXE33","ITEXE51");
  981.         ReplaceTextures("ITEXE45","ITEXE53");
  982.         ReplaceTextures("ITEXE41","ITEXE52");
  983.         SetLineTexture(157,SIDE_FRONT ,TEXTURE_BOTTOM ,"ITEXE55");
  984.         SetLineTexture(134,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  985.         SetLineTexture(135,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  986.         SetLineTexture(136,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  987.         SetLineTexture(137,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  988.         SetLineTexture(158,SIDE_FRONT ,TEXTURE_MIDDLE   ,"ITEXE54");
  989.         SetLineTexture(83,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  990.         SetLineTexture(84,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  991.         SetLineTexture(85,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  992.         SetLineTexture(159,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  993.         HudMessagebold(s:""; HUDMSG_PLAIN , 800, 0, 0.5, 0,0,0, 0);
  994.         delay(35*5);
  995.         SetMusic("suicide");
  996.         Music_Played=IMSCARED_MUSIC;
  997.         delay(35);
  998.         SetFont("BIGFONT");
  999.         HudMessageBold(s:"I am sorry, I just wanted a new friend You and I are going to be greatfriends !!!"; HUDMSG_FADEINOUT, 0, CR_YELLOW, 0.5, 0.3, 13.5, 1.5,3.0);
  1000.         HudMessageBold(s:"Well, this is my bedroom"; HUDMSG_FADEINOUT, 0, CR_YELLOW, 0.5, 0.32, 13.5, 4.5,3.0);
  1001.         HudMessageBold(s:"I died on this chair hanged by myself"; HUDMSG_FADEINOUT, 0, CR_YELLOW, 0.5, 0.34, 13.5, 7.5,3.0);
  1002.         HudMessageBold(s:"but this does not care more"; HUDMSG_FADEINOUT, 0, CR_YELLOW, 0.5, 0.36, 13.5, 10.5,3.0);
  1003.         HudMessageBold(s:"Please watch me playing the hunter game with the rest of that unsightly humans"; HUDMSG_FADEINOUT, 0, CR_YELLOW, 0.5, 0.38, 13.5, 13.5,3.0);
  1004.         HudMessageBold(s:"Dont worry, I will only kill that ugly humans"; HUDMSG_FADEINOUT, 0, CR_YELLOW, 0.5, 0.40, 13.5, 16.5,3.0);
  1005.         HudMessageBold(s:"but not zombies,because they are not fun to kill and will want your brain, AND JUST ME CAN TOUCH YOUR BRAIN!!!"; HUDMSG_FADEINOUT, 0, CR_YELLOW, 0.5, 0.43, 13.5, 19.5,3.0);
  1006.         delay(35*9);
  1007.         x=2;
  1008.         for(x=49;x<=53;x++){
  1009.             thing_remove(x);
  1010.             Thing_SetSpecial(x,0,255,0,0);
  1011.         }Thing_SetSpecial(86,0,255,0,0);
  1012.         Thing_SetSpecial(88,0,255,0,0);
  1013.         spawnspot("IMSCARED",132,0,0);
  1014.         thing_remove(132);
  1015.         x=0;
  1016.         while(x<200){        
  1017.             if(x!=131 && x!=100 && x!=1) Light_ChangeToValue(x,-100);
  1018.             x++;
  1019.             delay(1);
  1020.         }
  1021.         Thing_SetSpecial(138,0,255,0,0);
  1022.         while(true){
  1023.             x=random(0,7);
  1024.             if(x==0)     spawn("DeadMarine",random(-2263.18,-367.978),random(-1199.85,-429.914),300.0,151,0);//red key spam place
  1025.             else if(x==1)spawn("DeadMarine",random(-3218.18,792.0),random(-4871.85,-429.914),300.0,151,0);//Outside area + second/fist floor red house
  1026.             else if(x==2)spawn("DeadMarine",random(0.18,2500.0),random(1000.85,1500.914),385.0,151,0);//Big generator
  1027.             else if(x==3)spawn("DeadMarine",random(2143.18,4000.0),random(2400.85,3790.914),450.0,151,0);//Hell area
  1028.             else if(x==4)spawn("DeadMarine",random(-1009.18,-460.0),random(-225.85,720.914),66.0,151,0);//Entering cave
  1029.             else if(x==5)spawn("DeadMarine",random(-90.18,2668.0),random(1000.85,1500.914),520.0,151,0);//Big generator
  1030.             else if(x==6)spawn("DeadMarine",random(-320.18,1700.0),random(320.85,850.914),300.0,151,0);//Blue key spot
  1031.             else if(x==7)spawn("DeadMarine",random(3947.18,5727.0),random(-2000.85,-230.914),402.0,151,0);//Third floor
  1032.             thingsound(151,"player/male/death1",255);
  1033.             delay(170);
  1034.             thing_changetid(151,0);
  1035.         }
  1036.     }else if(x==2){//ravishing kill
  1037.         changecamera(100,1,0);
  1038.         fadeto(255,255,255,1.0,0.5);
  1039.         delay(35);
  1040.         changecamera(100,0,0);
  1041.         fadeto(255,255,255,0.0,0.5);
  1042.         delay(35*3);
  1043.         changecamera(100,1,0);
  1044.     }else if(x==4){//White face scary spam
  1045.         x=random(0,1000);
  1046.         if(x>=500 && x<=570) acs_execute(43,0,0,0,0);
  1047.     }
  1048. }
  1049. script 42 (int x) clientside{//Software Render lights
  1050.     if(getplayerrender()==SOFTWARE_PLAYER){
  1051.         if(x==false){
  1052.             Light_ChangeToValue(125,255);
  1053.             Light_ChangeToValue(126,166);
  1054.             Light_ChangeToValue(103,166);
  1055.             ChangeFloor(3,"FLAT20");
  1056.             SetFont("BIGFONT");
  1057.             HudMessageBold(s:"IT IS BETTER TO TURN OPENGL ON SINCE NOT ALL THE EFFECTS(dynamic lights, reflective floors,...) WILL BE DISPLAYED ON SOFTWARE"; HUDMSG_FADEINOUT, 0, CR_YELLOW, 0.5, 0.40, 10.5, 0,3.0);
  1058.         }
  1059.         else if(x==true) Light_ChangeToValue(47,255);
  1060.     }
  1061. }
  1062.  
  1063. script 43 (int spot) clientside{//White Face third floor trick
  1064.     int k=90;
  1065.     int i=100;
  1066.     int j;
  1067.     int TEXT1,TEXT2,TEXT3;
  1068.     int light1,light2,light3;
  1069.     if(spot==true){
  1070.         TEXT1="JNROCK13"; TEXT2="BBRWZ04"; TEXT3="WOODN2";
  1071.         light1=119;light2=118;light3=113;
  1072.     }else{
  1073.         TEXT1="ITEXE17"; TEXT2="N_ROCK13"; TEXT3="BROCK41";
  1074.         light1=139;light2=140;light3=141;
  1075.         i=random(0,300);
  1076.         if(i<100 || i>=125) terminate;
  1077.     }if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
  1078.     if(k>=90){
  1079.         ReplaceTextures(TEXT1,"SP_FACE2");
  1080.         ReplaceTextures(TEXT2,"FIREBLU2");
  1081.         ReplaceTextures(TEXT3,"N_SKIN03");
  1082.         spawnspot("imscared",115,116,0);
  1083.         spawnspot("Dead_Baby",117,200,0);
  1084.         localsetmusic("FUCKED");
  1085.         while(k<=237){
  1086.             if(i>=59){
  1087.                 thingsound(117,"KIDSND",255);
  1088.                 i=-1;
  1089.             }j=random(0,255);
  1090.             Light_ChangeToValue(light1,j);
  1091.             Light_ChangeToValue(light2,j);
  1092.             Light_ChangeToValue(light3,j);
  1093.             k++;
  1094.             i++;
  1095.             delay(1);
  1096.         }
  1097.         Local_SetLastMusic();
  1098.         ReplaceTextures("SP_FACE2",TEXT1);
  1099.         ReplaceTextures("FIREBLU2",TEXT2);
  1100.         ReplaceTextures("N_SKIN03",TEXT3);
  1101.         if(spot==true){
  1102.         Light_ChangeToValue(light1,112);        Light_ChangeToValue(light2,104);        Light_ChangeToValue(light3,112);
  1103.         }else{
  1104.             Light_ChangeToValue(light1,104);            Light_ChangeToValue(light2,96);            Light_ChangeToValue(light3,88);
  1105.         }thing_remove(116);
  1106.         thing_remove(200);
  1107.         delay(70);
  1108.         activatorsound("ELAUGHT",255);
  1109.     }  
  1110. }
  1111.  
  1112. script 44 (void){//White Face attack script
  1113.     SetHudSize(640,480,1);
  1114.     SetFont("ISCAR");
  1115.     activatorsound("SOULFUCK",255);
  1116.     HudMessage(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, 0.5, 0.5,5.0,0, 0.2);
  1117.     teleport(102,0,0);
  1118.     acs_execute(41,0,1,0,0);
  1119.     SetFont("SMALLFONT");
  1120. }
  1121.  
  1122. script 45 (void){//Third floor table room random events
  1123.     int x=random(0,100);
  1124.     switch(x){
  1125.     case 0:
  1126.     case 15:
  1127.     case 20:
  1128.     case 25:
  1129.     case 30:
  1130.         acs_execute(43,0,1,0,0);
  1131.         break;
  1132.     case 35:
  1133.     case 40:
  1134.             giveinventory("IMSCAREDACTIVE",1);
  1135.             break;
  1136.     case 45:
  1137.     case 46:
  1138.     case 47:
  1139.     case 48:
  1140.         ambientsound("ELAUGHT",255);
  1141.         break;
  1142.     }
  1143. }
  1144. script 47 (void) clientside{//Rainfall script
  1145.     int X_SPOT=0, Y_SPOT=0, X_MIN=0, X_MAX=0, Y_MIN=0, Y_MAX=0, VAR_SPOT=250.0;
  1146.     int z_heigh,y_heigh, x_heigh;
  1147.     int a=0,b=0,c=0;
  1148.     int MAX2;
  1149.     int tid=122;
  1150.     int x, y, z ;
  1151.     int tid2=unusedTID(1000,2000);
  1152.     int player_tid2;
  1153.     if(rain_sound==1)thing_activate(144);
  1154.     while(true){
  1155.    player_tid2=consoleplayernumber()+PLAYER_TID;
  1156.         a=getactorx(player_tid2);//getactorx(ConsolePlayerNumber());
  1157.         b=getactory(player_tid2);//getactory(ConsolePlayerNumber());
  1158.         c=getactorz(player_tid2);//getactorz(ConsolePlayerNumber());
  1159.    if(weather_quality==-1)      {X_MIN=-250.0; X_MAX=250.0; Y_MIN=-500.0; Y_MAX=250.0; VAR_SPOT=250.0;}  
  1160.         else if(weather_quality==0)      {X_MIN=-1000.0; X_MAX=1000.0; Y_MIN=-1000.0; Y_MAX=1000.0; VAR_SPOT=500.0;}
  1161.         else if(weather_quality==1) {X_MIN=-2000.0; X_MAX=2000.0; Y_MIN=-2000.0; Y_MAX=2000.0; VAR_SPOT=500.0;}
  1162.         else if(weather_quality==2) {X_MIN=-2500.0; X_MAX=2500.0; Y_MIN=-2500.0; Y_MAX=2500.0; VAR_SPOT=500.0;}
  1163.         else if(weather_quality==3) {X_MIN=-3000.0; X_MAX=3000.0; Y_MIN=-3000.0; Y_MAX=3000.0; VAR_SPOT=500.0;}
  1164.         else if(weather_quality==4) {X_MIN=-3500.0; X_MAX=3500.0; Y_MIN=-3500.0; Y_MAX=3500.0; VAR_SPOT=300.0;}
  1165.         X_SPOT=X_MIN; Y_SPOT=Y_MIN;
  1166.         while(Y_SPOT<=Y_MAX){
  1167.             while(X_SPOT<=X_MAX){
  1168.                 x_heigh=random(a+X_SPOT,a+X_SPOT+VAR_SPOT); y_heigh=random(b+Y_SPOT,b+Y_SPOT+VAR_SPOT);
  1169.                 z_heigh=GetActorCeilingZ(PLAYER_TID + PlayerNumber())-16.0;
  1170.                 spawn("mapspot",x_heigh,y_heigh,z_heigh  ,tid,0);
  1171.                 if (thingcount(t_none,tid)==0){
  1172.                     spawn("mapspot",x_heigh,y_heigh,c+10.0  ,tid,0);
  1173.                     if(thingcount(t_none,tid)==0){
  1174.                         spawn("mapspot",x_heigh,y_heigh,GetSectorCeilingZ(0,x_heigh /1.0,y_heigh /1.0)-20.0,tid,0);
  1175.                         if(thingcount(t_none,tid)==0){
  1176.                             spawn("mapspot",x_heigh,y_heigh,c+74.0  ,tid,0);
  1177.                                 if(thingcount(t_none,tid)==0) spawn("mapspot",x_heigh,y_heigh,c+274.0  ,tid,0);
  1178.                 }   }   }
  1179.                 if (CheckActorCeilingTexture(tid, "F_SKY1")){    
  1180.                     z_heigh=GetHigherCeiling(tid)-16.0;
  1181.                     thing_remove(tid);
  1182.                     spawn("mapspot",x_heigh,y_heigh,z_heigh,tid,0);
  1183.                     if(rain_detail==0)spawnspot("raindrop",tid,0,0);
  1184.                     else if(rain_detail==1)spawnspot("raindrop2",tid,0,0);
  1185.                     else spawnspot("raindrop3",tid,0,0);
  1186.                 }
  1187.                 X_SPOT+=VAR_SPOT;
  1188.                 thing_remove(tid);
  1189.       if(weather_quality==-1) delay(1);
  1190.             }
  1191.             X_SPOT=X_MIN;
  1192.             Y_SPOT+=VAR_SPOT;
  1193.         }
  1194.         delay(1);
  1195.     }
  1196. }
  1197.  
  1198. script 48 (void) NET clientside{//Rainfall menu
  1199.     int menu=0;
  1200.     int i=0;
  1201.     zm09_update_settings();
  1202.    
  1203.     while(true){
  1204.         i=0;
  1205.         menu_zm09=menu;
  1206.         while(i<5){i++;}
  1207.             SETFONT("SMALLFONT");
  1208.             HudMessagebold(s:"ZM09 SETTING"; HUDMSG_PLAIN, 544, CR_UNTRANSLATED, 0.5, 0.44,0,0, 0);
  1209.             SETFONT("SMALLFONT");
  1210.             HudMessagebold(s:"To exit the menu press \cf-use- \n\nControlls \cfleft & right \ccto set the value of the setting\n\cfup & down \ccto select another setting\n\clWARNING\cc: you will not be able to close the menu or control the menu if you are pressing others keys (like crouch, jump,fire,...)"; HUDMSG_PLAIN, 551, CR_GRAY, 0.5, 0.56,0,0, 0);
  1211.             zm09_menu_print();
  1212.             if(menu==0){
  1213.                 menu_zm09=1;
  1214.                 menu=1;
  1215.                 zm09_menu_print();
  1216.                 AmbientSound("menu/activate",127);
  1217.             }
  1218.         else if(menu==-1){
  1219.                 SETFONT("SMALLFONT");
  1220.                 HudMessagebold(s:""; HUDMSG_PLAIN, 544, CR_UNTRANSLATED, 0.5, 0.5,15.1,0, 0);
  1221.                 HudMessagebold(s:""; HUDMSG_PLAIN, 545, CR_UNTRANSLATED, 0.5, 0.48,15.1,0, 0);
  1222.                 HudMessagebold(s:""; HUDMSG_PLAIN, 546, CR_UNTRANSLATED, 0.5, 0.46,15.1,0, 0);
  1223.                 HudMessagebold(s:""; HUDMSG_PLAIN, 547, CR_UNTRANSLATED, 0.44, 0.5,15.1,0, 0);
  1224.                 HudMessagebold(s:""; HUDMSG_PLAIN, 548, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1225.                 HudMessagebold(s:""; HUDMSG_PLAIN, 549, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1226.                 HudMessagebold(s:""; HUDMSG_PLAIN, 550, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1227.                 HudMessagebold(s:""; HUDMSG_PLAIN, 551, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1228.                 //activatorsound("menu/choose",127);DSSWTCHX
  1229.                 AmbientSound("switches/exitbutn",127);
  1230.                 menu=0;
  1231.                 SetCvar("x_zh_zm09",(rain_detail+2)*1000+(rain_sound+2)*100+(weather_quality+2)*10+(nedm_desactive+2+reflection_actived*2));
  1232.                 terminate;
  1233.         }
  1234.         if(menu==1){
  1235.             while(menu==1){
  1236.                 zm09_menu_print();
  1237.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
  1238.                     weather_quality--;
  1239.                     if(weather_quality==-2) weather_quality=-1;
  1240.                     AmbientSound("menu/change",127);
  1241.                     delay(5);
  1242.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
  1243.                     weather_quality++;
  1244.                     if(weather_quality==4) weather_quality=3;
  1245.                     AmbientSound("menu/change",127);
  1246.                     delay(20);
  1247.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1248.                     menu=2;
  1249.                     AmbientSound("menu/cursor",127);
  1250.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE) menu=-1;
  1251.                 delay(1);
  1252.             }
  1253.             delay(5);
  1254.         }
  1255.         else if(menu==2){
  1256.             while(menu==2){
  1257.                 zm09_menu_print();
  1258.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
  1259.                     if(rain_sound==1){ rain_sound=0;
  1260.                     thing_deactivate(144);
  1261.                     }
  1262.                 AmbientSound("menu/change",127);
  1263.                 delay(5);
  1264.             }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
  1265.                 if(rain_sound==0){ rain_sound=1;
  1266.                     if(rainfall_actived==true)thing_activate(144);
  1267.                 }AmbientSound("menu/change",127);
  1268.                 delay(5);
  1269.             }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1270.                 menu=3;
  1271.                 AmbientSound("menu/cursor",127);
  1272.             }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1273.                 menu=1;
  1274.                 AmbientSound("menu/cursor",127);
  1275.             }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE) menu=-1;
  1276.                 delay(1);
  1277.             }delay(5);
  1278.         }else if(menu==3){
  1279.             while(menu==3){
  1280.                 zm09_menu_print();
  1281.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
  1282.                     rain_detail--;
  1283.                     if(rain_detail==-1) rain_detail=0;
  1284.                     AmbientSound("menu/change",127);
  1285.                     delay(5);
  1286.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
  1287.                     rain_detail++;
  1288.                     if(rain_detail==3) rain_detail=2;
  1289.                     AmbientSound("menu/change",127);
  1290.                     delay(5);
  1291.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1292.                     menu=2;
  1293.                     AmbientSound("menu/cursor",127);
  1294.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1295.                     menu=4;
  1296.                     AmbientSound("menu/cursor",127);
  1297.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE) menu=-1;
  1298.                 delay(1);
  1299.             }
  1300.             delay(5);///////////////////////////////
  1301.         }else if(menu==4){
  1302.             while(menu==4){
  1303.                 zm09_menu_print();
  1304.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
  1305.                     nedm_desactive--;
  1306.                     Local_SetLastMusic();
  1307.                     if(Music_Played==NEDM_MUSIC) spawnspot("FlareDisco",87,132,0);
  1308.                     if(nedm_desactive==-1) nedm_desactive=false;
  1309.                     AmbientSound("menu/change",127);
  1310.                     delay(5);
  1311.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
  1312.                     nedm_desactive++;
  1313.                     if(Music_Played==NEDM_MUSIC) {setmusic("D_NULL");thing_remove(132);}
  1314.                     if(nedm_desactive==2) nedm_desactive=true;
  1315.                     AmbientSound("menu/change",127);
  1316.                     delay(5);
  1317.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1318.                     menu=3;
  1319.                     AmbientSound("menu/cursor",127);
  1320.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
  1321.                     menu=-1;
  1322.                     delay(1);
  1323.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1324.                     AmbientSound("menu/cursor",127);
  1325.                     menu=5;
  1326.                 }delay(1);
  1327.             }
  1328.             delay(5);
  1329.         }else if(menu==5){
  1330.             while(menu==5){
  1331.                 zm09_menu_print();
  1332.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
  1333.                     reflection_actived--;
  1334.                     if(reflection_actived==-1) reflection_actived=false;
  1335.                     Sector_SetPlaneReflection (149, 0, 0);
  1336.                     Sector_SetPlaneReflection (3, 0, 0);
  1337.                     Sector_SetPlaneReflection (153, 0, 0);
  1338.                     AmbientSound("menu/change",127);
  1339.                     delay(5);
  1340.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
  1341.                     reflection_actived++;
  1342.                     if(reflection_actived==2) reflection_actived=true;
  1343.                     Sector_SetPlaneReflection (149, 66, 0);
  1344.                     Sector_SetPlaneReflection (3, 44, 0);
  1345.                     Sector_SetPlaneReflection (153, 44, 0);
  1346.                     AmbientSound("menu/change",127);
  1347.                     delay(5);
  1348.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1349.                     menu=4;
  1350.                     AmbientSound("menu/cursor",127);
  1351.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
  1352.                     menu=-1;
  1353.                     delay(1);
  1354.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1355.                     menu=5;
  1356.                     //activatorsound("menu/cursor",127);
  1357.                 }
  1358.             delay(5);
  1359.             }
  1360.         }
  1361.     delay(1);
  1362.     }
  1363. }
  1364. script 49 open {//Weather selector
  1365.     delay(50);
  1366.     weather=random(1,100);
  1367.     if(weather>=50 && weather<=65){
  1368.         rainfall_actived=true;
  1369.         SETFONT("SMALLFONT");
  1370.         //Thing_ChangeTID(0, PLAYER_TID+PlayerNumber());
  1371.         Light_ChangeToValue(23,90);
  1372.         Sector_Setcolor(23,128,128,128);
  1373.         Light_ChangeToValue(142,90);
  1374.         Sector_Setcolor(142,128,128,128);
  1375.         Light_ChangeToValue(143,64);
  1376.         Sector_Setcolor(143,128,128,128);
  1377.         ReplaceTextures("IBMTE2","SKYFOG0",NOT_MIDDLE);
  1378.         Light_ForceLightning(0);
  1379.         acs_execute(47,0,0,0,0);
  1380.     }
  1381. }
  1382. script 50 LIGHTNING {//RAIN SCRIPT
  1383.     Delay(Random(20, 200));
  1384.     AmbientSound("thunder",127);
  1385. }
  1386. int piano_touched=0;
  1387.  
  1388. script 51 (void){//Piano script
  1389.     int i=random(0,10);
  1390.     if(piano_touched>=random(20,50)){
  1391.         thingsound(150,"riff3",127);
  1392.         print(s:"\cfahhhhh, this sound is so annoying, I will make you stop ");
  1393.         delay(45);
  1394.         thingsound(150,"ELAUGHT",127);
  1395.         delay(100);
  1396.         giveinventory("IMSCAREDACTIVE",1);
  1397.         piano_touched=0;
  1398.     }else{
  1399.        
  1400.         if(i<=5) thingsound(150,"riff1",127);
  1401.         else thingsound(150,"riff2",127);
  1402.         piano_touched++;
  1403.     }if(piano_touched==24) door_open(146,30);
  1404.     delay(90);
  1405. }
  1406.  
  1407. Script 52 (void) clientside{//Generic Locked Door Mensage/Sound
  1408.     if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
  1409.     Print(s:"Noone can enter on Igor's abandoned castle");
  1410.     ActivatorSound("DRLOCKED", 127);
  1411.     delay(15);
  1412. }
  1413.  
  1414. script 53 open clientside{//Abandoned Igor's Castle"
  1415.     while(true){
  1416.         delay(200);
  1417.         thingsound(160,"LORDIGOR",255);
  1418.         delay(1);
  1419.     }
  1420. }
  1421. script 54 open clientside{//Abandoned Igor's Castle"
  1422.     int i=0;
  1423.     while(true){
  1424.         i=random(0,255);
  1425.         if(i<60){
  1426.             i=random(1,3);
  1427.             switch(i){
  1428.             case 1:thingsound(160,"TCLTFIR1",255);break;
  1429.             case 2:thingsound(160,"TCLTFIR2",255);break;
  1430.             case 3:thingsound(160,"TCLTFIR3",255);break;
  1431.             }
  1432.         }
  1433.         delay(random(200,300));
  1434.     }
  1435. }
  1436.  
  1437. function void secret_select(void){
  1438.     int a;
  1439.     a=random(1,21);
  1440.     if(a==1){       secret[0]=1;secret[1]=2;secret[2]=3;secret[3]=4;
  1441.     }else if(a==2){ secret[0]=2;secret[1]=1;secret[2]=4;secret[3]=3;
  1442.     }else if(a==3){ secret[0]=2;secret[1]=3;secret[2]=1;secret[3]=4;
  1443.     }else if(a==4){ secret[0]=2;secret[1]=3;secret[2]=4;secret[3]=1;
  1444.     }else if(a==5){ secret[0]=1;secret[1]=3;secret[2]=2;secret[3]=4;
  1445.     }else if(a==6){ secret[0]=1;secret[1]=3;secret[2]=4;secret[3]=2;
  1446.     }else if(a==7){ secret[0]=3;secret[1]=1;secret[2]=2;secret[3]=4;
  1447.     }else if(a==8){ secret[0]=1;secret[1]=2;secret[2]=4;secret[3]=3;
  1448.     }else if(a==9){ secret[0]=4;secret[1]=1;secret[2]=2;secret[3]=3;
  1449.     }else if(a==10){secret[0]=1;secret[1]=4;secret[2]=2;secret[3]=3;
  1450.     }else if(a==11){secret[0]=3;secret[1]=4;secret[2]=1;secret[3]=2;
  1451.     }else if(a==12){secret[0]=4;secret[1]=3;secret[2]=2;secret[3]=1;
  1452.     }else if(a==13){secret[0]=1;secret[1]=4;secret[2]=3;secret[3]=2;
  1453.     }else if(a==14){secret[0]=4;secret[1]=2;secret[2]=3;secret[3]=1;
  1454.     }else if(a==15){secret[0]=3;secret[1]=2;secret[2]=4;secret[3]=1;
  1455.     }else if(a==16){secret[0]=3;secret[1]=2;secret[2]=1;secret[3]=4;
  1456.     }else if(a==17){secret[0]=4;secret[1]=3;secret[2]=1;secret[3]=2;
  1457.     }else if(a==18){secret[0]=4;secret[1]=1;secret[2]=3;secret[3]=2;
  1458.     }else if(a==19){secret[0]=2;secret[1]=1;secret[2]=4;secret[3]=3;
  1459.     }else if(a==20){secret[0]=2;secret[1]=4;secret[2]=3;secret[3]=1;
  1460.     }else if(a==21){secret[0]=3;secret[1]=4;secret[2]=2;secret[3]=1;}
  1461. }
  1462.  
  1463. function void test_secret(int switchh){
  1464.     selected++;
  1465.     secret[selected+3]=switchh;
  1466.     if(secret[selected+3]==secret[selected-1]) secret[9]++;
  1467.     else secret[8]++;
  1468.     if(secret[9]==2 && selected==4){
  1469.         selected=random(0,5);
  1470.         print_code();
  1471.         if(selected>3){//50% right code
  1472.             SetFont("BIGFONT");
  1473.             HudMessageBold(s:"a door has been unlocked"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
  1474.             AmbientSound("REVEAL",127);
  1475.             door_open(62,24);
  1476.         }else{//50% right code + ravishing
  1477.             SetFont("BIGFONT");
  1478.             HudMessageBold(s:"a door has been opened"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
  1479.             AmbientSound("REVEAL",127);
  1480.             door_open(11,24);
  1481.             ravishing_selector(100);
  1482.         }AmbientSound("REVEAL",127);
  1483.     }if(secret[9]==4){   // 100% right code
  1484.             print_code();
  1485.             selected=random(0,100);
  1486.             if(selected<50){
  1487.                 SetFont("BIGFONT");
  1488.                 AmbientSound("achievement/unlocked",127);
  1489.                 HudMessageBold(s:"a  wall has been opened"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
  1490.                 AmbientSound("REVEAL",127);
  1491.                 door_open(5,18);
  1492.             }else if(selected<70){
  1493.                 SetFont("BIGFONT");
  1494.                 AmbientSound("achievement/unlocked",127);
  1495.                 AmbientSound("REVEAL",127);
  1496.                 HudMessageBold(s:"everyone won a item!!!"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
  1497.                 AmbientSound("REVEAL",127);
  1498.                 Acs_executeAlways(999,0,0,0,0);
  1499.                 Acs_executeAlways(999,0,0,0,0);
  1500.             }else{
  1501.                 SetFont("BIGFONT");
  1502.                 HudMessageBold(n:0,s:" Opened all the secret passages!!!"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
  1503.                 AmbientSound("REVEAL",127);
  1504.                 AmbientSound("achievement/unlocked",127);
  1505.                 door_open(11,24);
  1506.                 door_open(62,24);
  1507.                 door_open(5,18);
  1508.             }
  1509.     }if(secret[8]==4){// 0% right code
  1510.         selected=random(0,10);
  1511.         if(selected>=7){//White Face script
  1512.             acs_execute(35,0,0,0,0);
  1513.             acs_execute(4,0,0,0,0);
  1514.             SpawnSpot ("IMSCARED2",25,100,24);
  1515.             HudMessageBold(s:"Thanks ", n:0, s:" Now I'm free again!!!"; HUDMSG_FADEOUT, 919, CR_GREEN, 0.5, 0.6, 5.5, 0.5);
  1516.         }else ACS_Execute(6,0,0,0,0);
  1517.         print_code();
  1518.     }
  1519.     else if(secret[8]==3 && secret[9]==1){
  1520.         print_code();
  1521.         ravishing_selector(35);
  1522.         Acs_ExecuteAlways(164, 0, PlayerNumber(), 0, 0);
  1523.     }
  1524. }
  1525.  
  1526. function void red_keyspawn(void){
  1527.     switch(random(0,10)){
  1528.     case 0:spawn("mapspot",random(-721.0,-409.0),random(1873.0,2711.0),632.0,350,0); TeleportOther(36,350,1);break;
  1529.     case 1:spawn("mapspot",random(4528.0,5135.0),random(-1664.0,-1361.0),400.0,350,0); TeleportOther(36,350,1);break;
  1530.     case 2:spawn("mapspot",random(5623.0,5807.0),random(-783.0,-497.0),472.0,350,0); TeleportOther(36,350,1);break;
  1531.     case 3:spawn("mapspot",random(2080.0,4079.0),random(2448.0,3823.0),463.0,350,0); TeleportOther(36,350,1);break;
  1532.     case 4:spawn("mapspot",random(-3088.0,-2553.0),random(-1776.0,-1281.0),112.0,350,0); TeleportOther(36,350,1);break;
  1533.     case 5:spawn("mapspot",random(1114.0,1775.0),random(392.0,825.0),318.0,350,0); TeleportOther(36,350,1);break;
  1534.     case 6:spawn("mapspot",random(-1856.0,-1169.0),random(2125.0,2351.0),327.0,350,0); TeleportOther(36,350,1);break;
  1535.     case 7:spawn("mapspot",random(4416.0,4471.0),random(-2004.0,-1961.0),400.0,350,0); TeleportOther(36,350,1);break;
  1536.     case 8:spawn("mapspot",random(-2512.0,879.0),random(-1716.0,-449.0),362.0,350,0); TeleportOther(36,350,1);break;
  1537.     case 9:spawn("mapspot",random(4550.0,4719.0),random(-1246.0,-1169.0),465.0,350,0); TeleportOther(36,350,1);break;
  1538.     case 10:spawn("mapspot",random(-1808.0,-1585.0),random(-2320.0,-2052.0),72.0,350,0); TeleportOther(36,350,1);break;
  1539.     }
  1540. }
  1541.  
  1542. function void ravishing_selector(int lucky){
  1543.     int test=random(0,lucky);
  1544.     if(test<=15)  acs_execute(13,0,0,0);
  1545. }
  1546.  
  1547. function void winery_key_spawn(void){
  1548.     int test=random(1,7);
  1549.     if(test<=4){
  1550.         switch(test){
  1551.             case 1:
  1552.                 TeleportOther(70,71,0);
  1553.                 break;
  1554.             case 2:
  1555.                 TeleportOther(70,72,0);
  1556.                 break;
  1557.             case 3:
  1558.                 TeleportOther(70,73,0);
  1559.                 break;
  1560.             case 4:
  1561.                 TeleportOther(70,74,0);
  1562.                 break;
  1563.         }
  1564.     }
  1565. }
  1566.  
  1567. function void print_code(void){
  1568.     HudMessageBold(n:0, s:" activated the code"; HUDMSG_FADEOUT, 997, CR_RED, 0.5, 0.5, 9.5, 0.5);
  1569.     HudMessageBold(s:"the right code is:",d:secret[0],d:secret[1],d:secret[2],d:secret[3]; HUDMSG_FADEOUT, 996, CR_RED, 0.5, 0.52, 9.5, 0.5);
  1570.     HudMessageBold(n:0, s:" code is:",d:secret[4],d:secret[5],d:secret[6],d:secret[7]; HUDMSG_FADEOUT, 995, CR_RED, 0.5, 0.54, 9.5, 0.5);
  1571.     HudMessageBold(s:"the code is ",d:100-25*secret[8],s:"% right"; HUDMSG_FADEOUT, 985, CR_RED, 0.5, 0.56, 9.5, 0.5);
  1572. }
  1573.  
  1574. function int GetPlayerRender(void) {return GetCVar ("vid_renderer");}
  1575.  
  1576.  
  1577.  
  1578. function void Local_SetLastMusic(void){
  1579.     localsetmusic(Local_musicstore[Music_Played]);
  1580. }
  1581.  
  1582. function void secret_select_help(void)
  1583. {
  1584.     int i=random(0,100);
  1585.     int x=random(0,100);
  1586.     int secret_help1=secret[0];
  1587.     int secret_help2=secret[1];
  1588.     int secret_help3=secret[2];
  1589.     int secret_help4=secret[3];
  1590.     if(i>50) secret_help1+=1;
  1591.     i=random(0,100);
  1592.     if(i<50) secret_help2+=1;
  1593.     i=random(0,100);
  1594.     if(i>50) secret_help3+=1;
  1595.     i=random(0,100);
  1596.     if(i<50) secret_help4+=1;
  1597.     if(secret_help1==secret[0] && secret_help2==secret[1] && secret_help3==secret[2]  && secret_help3==secret[3]){
  1598.         if(random(0,100)>50){
  1599.             secret_help1+=1;
  1600.             secret_help2+=1;
  1601.             secret_help3+=1;
  1602.             secret_help4+=1;}
  1603.     }
  1604.     if(zombieCounter()+HumanCounter()<5){
  1605.         x=random(0,100);
  1606.         if(x>10)   print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
  1607.     }else if(zombieCounter()+HumanCounter()<10){
  1608.         x=random(0,100);
  1609.         if(x>25) print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
  1610.     }else if(zombieCounter()+HumanCounter()<15){
  1611.         x=random(0,100);
  1612.         if(x>30)  print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
  1613.     }else if(zombieCounter()+HumanCounter()<20){
  1614.         x=random(0,100);
  1615.         if(x>45)  print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
  1616.     }else if(zombieCounter()+HumanCounter()<25){
  1617.         x=random(0,100);
  1618.         if(x>50) print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
  1619.     }else if(zombieCounter()+HumanCounter()<30){
  1620.         x=random(0,100);
  1621.         if(x>60)  print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
  1622.     }
  1623. }
  1624. function void print_secret_select_help(int secret_help1, int secret_help2,int secret_help3,int secret_help4){
  1625.     SetLineTexture(134,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[secret_help1-1]);
  1626.     SetLineTexture(135,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[secret_help2-1]);
  1627.     SetLineTexture(136,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[secret_help3-1]);
  1628.     SetLineTexture(137,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[secret_help4-1]);
  1629. }
  1630.  
  1631.  
  1632. function int unusedTID(int start, int end)//THIS PART WAS CREATED BY Ijon Tichy
  1633. {
  1634.     int ret = start - 1;
  1635.     int tidNum;
  1636.     if (start > end) { start ^= end; end ^= start; start ^= end; }
  1637.     while (ret++ != end){  
  1638.         if (ThingCount(0, ret) == 0)  return ret;
  1639.     }  
  1640.     return -1;
  1641. }
  1642.  
  1643. function int GetHigherCeiling(int tid2) {//THIS PART WAS CREATED BY Ijon Tichy and edited  by IBM5155
  1644.    int posx=getactorx(tid2);
  1645.     int posy=getactory(tid2);
  1646.     int posz=GetActorCeilingZ(tid2);//504
  1647.     int z=posz+25.0;
  1648.     int test=0;
  1649.     int tid=unusedTID(1000, 2000);
  1650.     spawn("mapspot",posx,posy,z,tid,0);
  1651.     while(GetActorCeilingZ(tid)!=0){
  1652.         z=z+25.0;//850.0
  1653.         thing_remove(tid);
  1654.         spawn("mapspot",posx,posy,z,tid,0);
  1655.         test++;
  1656.     }if(test==0){
  1657.         thing_remove(tid);
  1658.         z=posz;
  1659.     }else{
  1660.         thing_remove(tid);
  1661.         spawn("mapspot",posx,posy,z-27.0,tid,0);
  1662.         z=GetActorCeilingZ(tid);
  1663.         thing_remove(tid);
  1664.     }return z;
  1665. }
  1666.  
  1667. function int secret_in(int position){
  1668.     return secret[position];
  1669. }
  1670.  
  1671. function int sqrt2 (int x){
  1672.     int r;
  1673.     x = x + 1 >> 1;
  1674.     while (x > r)
  1675.         x -= r++;
  1676.     return r;
  1677. }
  1678.  
  1679. function int ibm_distance (int tid1, int tid2){
  1680.     int x, y, z, d;
  1681.     x = (GetActorX(tid1) - GetActorX(tid2))/65536;
  1682.     y = (GetActorY(tid1) - GetActorY(tid2))/65536;
  1683.     z = (GetActorZ(tid1) - GetActorZ(tid2))/65536;
  1684.     d = sqrt2( x*x + y*y + z*z );
  1685.     return d;
  1686. }
  1687. function void zm09_menu_print(void){
  1688.     SETFONT("SMALLFONT");
  1689.  HudMessagebold(s:zm09_menu_print_color(1),s:"Rain Distance:",s:zm09_strsettings[weather_quality+1]; HUDMSG_PLAIN, 545, CR_UNTRANSLATED, 0.5, 0.46+hud_resize(),0,0, 0);
  1690.     SETFONT("SMALLFONT");
  1691.  HudMessagebold(s:zm09_menu_print_color(2),s:"Rain Sound:",s:zm09_strsettings[7-rain_sound]; HUDMSG_PLAIN, 546, CR_UNTRANSLATED, 0.5, 0.48+hud_resize()*2,0,0, 0);
  1692.     SETFONT("SMALLFONT");
  1693.  HudMessagebold(s:zm09_menu_print_color(3),s:"Rain Quality:",s:zm09_strsettings[rain_detail+1]; HUDMSG_PLAIN, 547, CR_UNTRANSLATED, 0.5, 0.5+hud_resize()*3,0,0, 0);
  1694.     SETFONT("SMALLFONT");
  1695.  HudMessagebold(s:zm09_menu_print_color(4),s:"NEDM Enable:",s:zm09_strsettings[nedm_desactive+6]; HUDMSG_PLAIN, 548, CR_UNTRANSLATED, 0.5, 0.52+hud_resize()*4,0,0, 0);
  1696.     SETFONT("SMALLFONT");
  1697.  HudMessagebold(s:zm09_menu_print_color(5),s:"Reflection Enable:",s:zm09_strsettings[7-reflection_actived]; HUDMSG_PLAIN, 549, CR_UNTRANSLATED, 0.5, 0.54+hud_resize()*5,0,0, 0);
  1698. }
  1699.  
  1700. function int zm09_menu_print_color(int menu_hor){
  1701.     if(menu_zm09==menu_hor)
  1702.         return("\cf");
  1703.     return("\cg");
  1704.  
  1705. }
  1706.  
  1707. function void zm09_update_settings(void){
  1708. int i=0;
  1709. int j=0;
  1710. int input=GetCvar("x_zh_zm09");
  1711.  
  1712.     if(input!=0){
  1713.         i=input/10;//226
  1714.         i=i*10;//2260
  1715.         i=input-i;//1
  1716.         switch(i){
  1717.             case 2: nedm_desactive=false; reflection_actived=false; break;
  1718.             case 3: nedm_desactive=true;  reflection_actived=false;break;
  1719.             case 4: nedm_desactive=false; reflection_actived=true; break;
  1720.             default: nedm_desactive=true;  reflection_actived=true; break;
  1721.         }
  1722.            
  1723.         i=input/100;//22
  1724.         i=i*10;//220
  1725.         j=input/10;//226
  1726.         i=j-i;//6
  1727.         if(i<1 || i>6) weather_quality=0;
  1728.         else weather_quality=i-2;
  1729.        
  1730.         i=input/1000;//2
  1731.         i=i*10;//20
  1732.         j=input/100;//22
  1733.         i=j-i;//2
  1734.         if(i<2 || i>3) rain_sound=0;
  1735.         else rain_sound=i-2;
  1736.        
  1737.         i=input/1000;//2
  1738.         if(i<2 || i>5) rain_detail=0;
  1739.         else rain_detail=i-2;
  1740.     }
  1741.     if(reflection_actived==true){
  1742.         Sector_SetPlaneReflection (153, 44, 0);
  1743.         Sector_SetPlaneReflection (149, 66, 0);
  1744.         Sector_SetPlaneReflection (3, 44, 0);
  1745.     }
  1746. }
  1747.  
  1748. function int hud_resize(void){
  1749.     int x=get_screenx();
  1750.     int y=get_screeny();
  1751.     int output=0;
  1752.     if(x<=320) output=0.02;
  1753.     if(x<=640) output=0.01;
  1754.     return output;
  1755.  
  1756. }
  1757. function int get_screeny(void){
  1758.     return getcvar("vid_defheight");
  1759. }
  1760.  
  1761. function int get_screenx(void){
  1762.     return getcvar("vid_defwidth");
  1763. }
Advertisement
Add Comment
Please, Sign In to add comment