Guest User

New ZM09 Scripts

a guest
Feb 21st, 2014
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 98.80 KB | None | 0 0
  1. /*
  2. -Fixed: Piano sounds were not being played when it rains
  3. -Fixed: the zm09 menu are better acesseed.
  4. -Fixed: white face tracker script, for some reason he got stucked :s
  5. -Fixed: Menu '>' symbol is overwritten by '-' when there're more than 1 player.
  6. -Failed scale the menu for fit better on low resolutions/high
  7. -Fixed: rainfall always on the map
  8. -Fixed: reflective effect isn´t disable when the map starts and your setting is reflective off
  9. -Modified:Ravishing flicker lights are more intensive.
  10. -Modified:Dynamic lights inside the house.
  11. */
  12.  
  13.  
  14. #include "zcommon.acs"
  15. #import "ZMGAME.acs"
  16. #import "FUNCTION.ACS"
  17. #import "MODCVARS.acs"
  18. #define PLAYER_TID 600
  19. #define SPAWN_LAVA 0
  20. #define SPAWN_LAVA_SOUND 1
  21. #define OPENGL_PLAYER 1
  22. #define SOFTWARE_PLAYER 0
  23. #define THEME_MUSIC 0
  24. #define RAVISHING_MUSIC 1
  25. #define LAST_HUMAN_MUSIC 2
  26. #define NEDM_MUSIC 3
  27. #define SOULSPHERE_MUSIC  4
  28. #define IMSCARED_MUSIC 5
  29. #define RAVISHING 1
  30. #define WHITE_FACE 2
  31. #define SOUL_SPHERE 3
  32. #define active true
  33.  
  34. int secret[10],selected;
  35. int debug_zm09;
  36. int tele_x,tele_y,tele_z,tele_active=0;
  37. int user_ghoulactivesound=0;
  38. int user_ghoulinvisible=0;
  39. int user_ghoulinvisiblecount=0;
  40. int user_invisible=0;
  41. int out_invisible=0;
  42. int sound_toplay=0;
  43. int timer_GHOUL=0;
  44. int script_test=0;
  45. int ghoul_invtest=0;
  46. int stuck_test=0;
  47. int dev=0;
  48. int ghoul_hate=0;
  49. int Music_Played=0;
  50. int weather=0;
  51. int generator1=1,generator2;
  52. int weather_quality=0;
  53. bool music_quality=false;
  54. bool rain_sound=true;
  55. int  rain_detail=0;
  56. int soulsphere_damage=2.0;
  57. bool rainfall_actived=false;
  58. int nedm_code=0;
  59. int reflection_actived=true;
  60. int total_players=0;
  61. int menu_zm09;
  62. int ghoul_target;
  63. int ghoul_target_distance=0;
  64. int used_tids[11]={49,50,51,52,59,62,63,66,114,116,122};
  65. int Local_musicstore[6]={"IBMSND3","IBMSND2","IBMSND6","NEDM","IBMSND7","SUICIDE"};
  66. int Local_musicstoreHQ[6]={"IBMHQ017","IBMSND2","ibmhq002","ibmhq004","ibmhq003","SUICIDE"};
  67. int zm09_strsettings[8]={"ULTRA LOW","LOW","MEDIUM","HIGH","ULTRA","EXTREME","ON","OFF"};
  68. bool debug_locker=0;
  69.  
  70.  script 1 open{//MAIN SCRIPT
  71.     int getout=FALSE;    
  72.     int i=0;
  73.     i=GetCvar("x_zh_zm09_cn");
  74.     SetCvar("x_zh_zm09_cn",i+1);
  75.     i=0;
  76.     nedm_code=random(0,3);
  77.     while(i<=10){
  78.         thing_remove(used_tids[i]);i++;
  79.     }Thing_Deactivate(44);
  80.     thing_deactivate(144);
  81.     secret_select();
  82.     secret_select_help();
  83.     red_keyspawn();
  84.     winery_key_spawn();
  85.     acs_execute(42,0,0,0,0);
  86.     while(getout==FALSE){
  87.         if(HumanCounter()==1 && zombieCounter()>=1){
  88.                 getout=TRUE;  
  89.                 Music_Played=LAST_HUMAN_MUSIC;
  90.                 play_zm09_music();
  91.         }delay(35);
  92.     }while(Game_info_round_timer>=0)delay(35);
  93.     if(zombieCounter()==0){
  94.         getout=GetCvar("x_zh_zm09_hw");
  95.         SetCvar("x_zh_zm09_hw",getout+1);
  96.     }
  97.     else{
  98.         getout=GetCvar("x_zh_zm09_ww");
  99.         SetCvar("x_zh_zm09_ww",getout+1);
  100.     }
  101. }
  102.  
  103. script 2 (int x){//Red door Switches
  104.     test_secret(x);
  105. }
  106.  
  107. script 3 OPEN clientside
  108. {//spark enable/disable
  109.     if(generator1==true || generator2==true)
  110.  {
  111.     Thing_Activate (154);
  112.     if(generator2==false)
  113.         Thing_Activate (155);
  114.  }
  115.     delay(70);
  116.     restart;
  117. }
  118.  
  119. script 4 (int who, int code){// White Face/Ravishing AI core
  120.     int safe_tid=ActivatorTID();
  121.     int wface_hatee=0;//Code 1414325 was removed, it would release whiteface and call script 35
  122.     int i=0,j=0;
  123.     int shorter_distance;
  124.     int farest_distance=0;
  125.     while(humancounter()>=1){
  126.         i=0;
  127.         wface_hatee=0;
  128.         farest_distance=0;
  129.         shorter_distance=2147483647;
  130.         while(i<32){
  131.             if(thingcount(t_none,i+600)==1){
  132.                 if(CheckActorInventory(i+600,"zombiemaker")==0){
  133.                     if(i+600!=safe_tid || humancounter()==1){
  134.                         j=ibm_distance (100,i+600);
  135.                         if(who==1){ //RAVISHING
  136.                             if(j<shorter_distance){
  137.                                 shorter_distance=j;
  138.                                 wface_hatee=i+600;
  139.                             }
  140.                         }else{//WHITE FACE
  141.                             if(j>farest_distance){
  142.                                 farest_distance=j;
  143.                                 wface_hatee=i+600;
  144.                             }
  145.                         }
  146.                     }
  147.                 }
  148.             }
  149.             i++;
  150.             delay(1);
  151.         }
  152.         ghoul_target=wface_hatee;
  153.         if(shorter_distance==2147483647)ghoul_target_distance=wface_hatee;
  154.         else  ghoul_target_distance=shorter_distance;
  155.         Thing_Hate(100,wface_hatee,6);
  156.         while(thingcount(T_NONE,wface_hatee)==1){
  157.             if(CheckActorInventory(wface_hatee,"zombiemaker")==1) break;
  158.             if(dev==0 && who==1){acs_execute(12,0,0,0,0); acs_execute (11,0,0,0,0);}
  159.             dev=0;
  160.             delay(35);
  161.         }
  162.         delay(1);
  163.     }
  164. }
  165.  
  166. SCRIPT 5 (void){
  167.     spawn("ShortGreenColumn",-2677.0, -3169.0, 211.0,0,0);
  168. }
  169. int lava_del_tids[8]={44,49,50,51,52,53,72,86};
  170. script 6 (void){//Lava Script
  171.     int time_delay=0;
  172.     tele_active=1;
  173.     time_delay=random(0,30);
  174.     if(time_delay>0) delay(35*time_delay);
  175.     Thing_ChangeTID(500, 66);
  176.     acs_execute(15,0,SPAWN_LAVA,0,0);//text effect
  177.     ThingSound(15,"IBMSND1",255);
  178.     Radius_Quake(random(5,9), 12*35, 0, 16, 15);
  179.     delay(255);
  180.     Ceiling_LowerAndCrush(4,7,6553);
  181.     Ceiling_LowerAndCrush(10,7,65536);
  182.     Ceiling_LowerAndCrush(94,4,65536);
  183.     Ceiling_LowerAndCrush(14,7,65536);
  184.     Ceiling_LowerAndCrush(18,7,65536);
  185.     Ceiling_LowerAndCrush(124,7,65536);
  186.     delay(350);
  187.     ceiling_raisebyvalue(9,10,335);
  188.     ceiling_raisebyvalue(48,10,464);
  189.     acs_execute(15,0,SPAWN_LAVA_SOUND,0,0);//text effect
  190.     delay(350);
  191.     door_close(4,7);    door_close(10,7);    door_close(94,4);    door_close(14,7);    door_close(18,7);    door_close(124,7);
  192.     acs_execute(17,0,0,0,0);
  193.     time_delay=0;while(time_delay<8){
  194.         thing_remove(lava_del_tids[time_delay]);time_delay++;
  195.     }generator2=0;
  196.     acs_execute(34,0,generator1*10+generator2,0,0);
  197.     Light_ChangeToValue(80,80);
  198.     Light_changetovalue(81,80);
  199.     Thing_ChangeTID(66, 500);
  200.     Sector_SetDamage(7,MOD_LAVA,MOD_LAVA);
  201.     delay(random(350,3500));
  202.     acs_execute(13,0,0,0,0);
  203. }
  204.  
  205. script 7 (void){//50% Right code door open on cave
  206.     floor_lowerbyvalue(29,25,320);
  207.     floor_lowerbyvalue(26,25,256);
  208.     floor_lowerbyvalue(24,25,192);
  209.     floor_LOWERbyvalue(17,25,128);
  210.     floor_lowerbyvalue(16,25,64);
  211. }
  212.  
  213. int ravishing_script;
  214. script 8 (void){//Ravishing Script : Attack
  215.     ravishing_script=8;
  216.     dev=8;
  217.     stuck_test=0;
  218.     ghoul_invtest=0;
  219.     user_ghoulactivesound=0;
  220.     timer_GHOUL=0;
  221.     user_invisible=0;
  222.     user_ghoulinvisible=0;
  223.     timer_GHOUL=0;
  224.     user_ghoulinvisible=0;
  225.     if(out_invisible==0) out_invisible=50;
  226.     SetActorProperty(100,APROP_Speed,16.0);
  227. }
  228.  
  229. script 9 (int x){//Ravishing Script : Check monster require change status
  230.     ravishing_script=9;
  231.     ghoul_hate=x;
  232.     dev=9;
  233.     script_test=1;
  234.     if(user_invisible==true && user_ghoulinvisible==false && ghoul_invtest==false)
  235.     {
  236.         user_ghoulinvisible=true;
  237.         ghoul_invtest=true;
  238.         SetActorProperty(100,APROP_Speed,26.0);
  239.     }
  240.     else if(user_invisible==0 && user_ghoulinvisible==0 && ghoul_invtest==1)
  241.     {
  242.         user_ghoulinvisible=2;
  243.         ghoul_invtest=false;
  244.         SetActorProperty(100,APROP_Speed,16.0);
  245.     }
  246.     setresultvalue(user_ghoulinvisible);
  247.     delay(1);
  248.     user_ghoulinvisible=false;
  249.    
  250. }
  251. script 10 (VOID){//Ravishing Script: Dormaint script
  252.     ravishing_script=10;
  253.     dev=10;
  254.     stuck_test=0;
  255.     user_ghoulactivesound=0;
  256.     ghoul_invtest=0;
  257.     timer_GHOUL=0;
  258.     user_invisible=0;
  259.     timer_GHOUL=0;
  260.     user_ghoulinvisible=0;
  261.     SetActorProperty(100,APROP_Speed,16.0);
  262. }
  263.  
  264. script 11 (void){//Ravishing Script: main code
  265.     ravishing_script=11;
  266.     int pos_x=0,pos_y=0,pos_z=0;
  267.     while(true){
  268.         dev=true;
  269.         if(pos_x==getactorx(100) && pos_y==getactory(100) && pos_z==getactorz(100)){
  270.             stuck_test++;
  271.         }else{  
  272.             stuck_test=0;
  273.             pos_x=getactorx(100);
  274.             pos_y=getactory(100);
  275.             pos_z=getactorz(100);
  276.         }if(stuck_test==50){
  277.             user_invisible=1;
  278.             user_ghoulinvisible=0;
  279.             ghoul_invtest=0;
  280.             timer_GHOUL=0;
  281.            
  282.         }if(out_invisible>0){
  283.             SetActorProperty(100,APROP_Speed,16.0);
  284.         }if(timer_GHOUL>=16 && user_invisible==true){
  285.             user_invisible=false;
  286.             timer_GHOUL=0;
  287.             SetActorProperty(100,APROP_Speed,16.0);
  288.         }else if(timer_GHOUL>=7 && user_invisible==false){
  289.             timer_GHOUL=0;
  290.             user_invisible=true;
  291.         }if(user_invisible==true)
  292.         {
  293.             sound_toplay=1;
  294.         }else sound_toplay=0;
  295.         if(out_invisible>0) out_invisible--;
  296.         script_test=0;
  297.         delay(1);    
  298.     }
  299. }
  300.  
  301. script 12 (void){//Ravishing Script: Sound Effects
  302.    while(true){
  303.        ravishing_script=12;
  304.        if(sound_toplay==0){
  305.             while(user_ghoulactivesound<4 && user_invisible==0){
  306.                   user_ghoulactivesound++;
  307.                   delay(35);
  308.             }
  309.             timer_GHOUL++;
  310.             user_ghoulactivesound=false;
  311.             if(user_invisible==true) ThingSound(100,"EFF5",127);
  312.             else if(user_ghoulinvisible==false) ThingSound(100,"EFF10",127);
  313.         }
  314.         else{
  315.             while(user_ghoulactivesound<2 && user_invisible==true){
  316.                user_ghoulactivesound++;
  317.                delay(35);
  318.             }
  319.             timer_GHOUL++;
  320.             user_ghoulactivesound=0;
  321.            if(user_invisible==true) ThingSound(100,"EFF5",127);
  322.            else if(user_ghoulinvisible==false) ThingSound(100,"EFF10",127);
  323.        }
  324.        delay(1);
  325.      }
  326. }
  327.  
  328. script 13 (void){//Ravishing Script: Summon ravishing and other resources
  329.     int input=GetCvar("x_zh_zm09_ra");
  330.     SetCvar("x_zh_zm09_ra",input+1);
  331.     ravishing_script=13;
  332.     delay(random(350,700));
  333.     SetFont("BIGFONT");
  334.     ThingSound(77,"IBMEFF3",127);
  335.     generator1=0;
  336.     acs_execute(34,0,generator1*10+generator2,0,0);
  337.     Thing_remove(96);
  338.     HudMessageBold(s:"\nPRIMARY GENERATOR IS NOW DESTROYED"; HUDMSG_FADEOUT, 980, CR_RED, 0.5, 0.2, 9.8, 0.5);
  339.     delay(50);
  340.     ThingSound(97,"IBMEFF3",127);
  341.     delay(50);
  342.     ThingSound(97,"IBMEFF2",127);
  343.     Music_Played=RAVISHING_MUSIC;
  344.     play_zm09_music();
  345.     SpawnSpot ("ravishing",25,100,24);
  346.     acs_execute(4,0,1,0,0);
  347.     delay(35);
  348.     acs_execute(11,0,0,0,0);
  349.     ACS_EXECUTE(12,0,0,0,0);//RAVISHING SOUND CODE
  350.     while(Game_info_round_timer==0) delay(1);
  351.     while(true){
  352.         if(Game_info_round_timer==0 || zombieCounter()==0 || HumanCounter()==0) Thing_Deactivate(100);
  353.         delay(1);
  354.     }
  355. }
  356. int teste=0;
  357.  
  358. Script 14 (void) clientside{//Generic Locked Door Mensage/Sound
  359.     if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
  360.     Print(s:"That door is locked.");
  361.     ActivatorSound("DRLOCKED", 127);
  362.     delay(15);
  363. }
  364.  
  365. script 15 (int action) clientside{//Lava Script: Mensage/sound Effect
  366.     if(action==SPAWN_LAVA){
  367.         int i=0;
  368.         while(i<17){
  369.             SetFont("BIGFONT");
  370.             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);
  371.             i++;
  372.             delay(35);
  373.         }
  374.         delay(random(400,800));
  375.         delay(200);
  376.     }else{
  377.         while(true){//Replace with ambientsound
  378.             ThingSound(15,"ibmlava1",255);
  379.             delay(67);
  380. }   }   }
  381.  
  382. script 16 (void){//Teleport script, avoid telefrag
  383.     if(ThingCountSector(T_NONE,0,28)==2) teleport(38,0,0);
  384. }
  385.  
  386. script 17 (void){//Unlock Teleport Door
  387.     if(tele_active==1){
  388.         tele_active++;
  389.         SetFont("BIGFONT");
  390.         HudMessageBold(s:"a door is now unlocked"; HUDMSG_FADEOUT, 998, CR_YELLOW, 0.5, 0.5, 5.5, 0.5);
  391.         AmbientSound("REVEAL",127);
  392.         door_open(64,25);
  393.     }
  394. }
  395.  
  396. script 18 (void) setresultvalue(soulsphere_damage);
  397.  
  398.  
  399. int phase_light_name[4]={"phaselight1","phaselight3","phaselight1","phaselight2"};
  400. script 19 (void){//Generator Script
  401.     int light_spotid=40,i;
  402.     int light_id=49;
  403.     Thing_Activate(44);
  404.     spawnspot("steamspawner",130,0,0);
  405.     ThingSound(40,"IBMEFF2",127);
  406.     ThingSound(40,"IBMEFF1",127);
  407.     teleportother(53,44,0);
  408.     while(light_Spotid<=43){
  409.         ThingSound(light_spotid,"IBMEFF1",127);
  410.         for(i=0;i<4;i++){
  411.             thing_remove(light_id);
  412.             SpawnSpot(phase_light_name[i],light_spotid,light_id,0);
  413.             delay(5);
  414.         }light_spotid++;
  415.         light_id++;
  416.         delay(35);
  417.     }generator2=1;
  418.     acs_execute(34,0,generator1*10+generator2,0,0);
  419.     delay(150);
  420.     Light_changetovalue(80,255);
  421.     Light_changetovalue(81,255);
  422.     acs_execute(42,0,1);
  423. }
  424.  
  425. script 20 (int door){//Super Shotgun Little Door open
  426.     activatorsound("EFF11",255);
  427.     delay(35);
  428.     if(door==1)
  429.         door_open(146,30);
  430.     else{
  431.         door_open(69,13);
  432.         spawnspot("fakedoubleshotgun",68,0,0);
  433.     }
  434. }
  435.  
  436. int script_21[2]={"YES","NO"};
  437.  
  438. script 22 open {//End Selector can spawn one or two soulspheres
  439.     int victim=0;
  440.     int ending=random(0,100);
  441.     INT GETOUT2=FALSE;
  442.     int soul_hatee=0;
  443.     int i=0,j=0;
  444.     int shorter_distance;
  445.     int k=0;
  446.     int input=0;
  447.     delay(1);
  448.     total_players=HumanCounter();
  449.     k=GetCvar("x_zh_zm09_to");
  450.     SetCvar("x_zh_zm09_to",k+total_players);
  451.     if(ending<=30)//if ending <= 30% do
  452.     {
  453.         while(getout2==FALSE)
  454.         {
  455.             if(Game_info_round_timer==0);//Fix a bug when the zombies don't come
  456.             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
  457.                 getout2=TRUE;
  458.                     if(((humancounter()+zombiecounter())*100)/total_players>=70){
  459.                     Music_Played=SOULSPHERE_MUSIC;
  460.                     play_zm09_music();  
  461.                 }
  462.             }
  463.             delay(35);
  464.         }
  465.         delay(350);
  466.         input=GetCvar("x_zh_zm09_sf");
  467.         if(((humancounter()+zombiecounter())*100)/total_players>=70){//Total of players ingame/total of players on map start >=90% , spawn 2 soul spheres
  468.             if(humancounter()+zombiecounter()>=20){
  469.                 SpawnSpot ("ghouldemon",25,114,24);
  470.                 input++;
  471.             }SpawnSpot ("ghouldemon",76,114,24);
  472.             SetCvar("x_zh_zm09_sf",input+1);
  473.             while(true){
  474.                 i=0;
  475.                 shorter_distance=2147483647;
  476.                 while(i<32){
  477.                     if(thingcount(t_none,i+600)==1){
  478.                         j=ibm_distance (100,i+600);
  479.                             if(j<shorter_distance){
  480.                                 shorter_distance=j;
  481.                                 soul_hatee=i+600;
  482.                             }
  483.                     }
  484.                     delay(1);
  485.                     i++;
  486.                 }
  487.                 ghoul_target=soul_hatee;
  488.                 Thing_Hate(114,soul_hatee,6);
  489.                 if(CheckActorInventory(soul_hatee,"zombiemaker")) {soulsphere_damage=random(188,225); SetActorProperty(114,APROP_Speed,36.0);}
  490.                 else {soulsphere_damage=random(4,7); SetActorProperty(114,APROP_Speed,24.0);}
  491.                 while(thingcount(T_NONE,soul_hatee)==1) {delay(35);}
  492.             delay(1);
  493.             }
  494.         }
  495.     }
  496. }
  497.  
  498. script 23 (int type, int arg1, int arg2) clientside{//Update the clientside from who called the debug command
  499.     if(type==1){
  500.         user_ghoulactivesound=arg1;
  501.         user_invisible=arg2;
  502.     }else if(type==2){
  503.         script_test=arg1;
  504.         ghoul_invtest=arg2;
  505.     }else if(type==3){
  506.         stuck_test=arg1;  
  507.         script_test=arg2;
  508.     }else if(type==4){
  509.         ghoul_hate=arg1;  
  510.         sound_toplay=arg2;
  511.     }else if(type==5){
  512.         ghoul_target=arg1;
  513.         ghoul_target_distance=arg2;
  514.     }else if(type==6){
  515.         soulsphere_damage=arg1;    
  516.         generator1=arg2;
  517.     }else if(type==7){
  518.         generator2=arg1;
  519.         dev=arg2;
  520.     }else if(type==8){
  521.         weather=arg1;
  522.         debug_zm09=arg2;
  523.        
  524.     }
  525. }
  526.  
  527. script 24 open clientside{//INTRO
  528.     zm09_update_settings();
  529.     printbold(s:"============================================================\n|ZM09 - ABANDONED MINES - CREATED BY IBM5155\n============================================================\n                 /!\ OpenGL required /!\ \n                  \!/ Playable on soft\!/ \nZM09 V1.1 FINAL VERSION");
  530.     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-FUSED\n-'Monolith' for the piano sound\n-'Mojang' for the rain sound\n-'Imscared - A Pixelated Nightmare' for the white face idea");
  531.     printbold(s:"");
  532.     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");
  533.     printbold(s:"");
  534.     HudMessagebold(s:"\czmap settings can be configured writing \cjpuke 48\cf on console\n\czmap tutorial can be acessed writing \cjpuke 62\cf on console (offline only)"; HUDMSG_FADEINOUT, 544, CR_UNTRANSLATED, 0.5, 0.8,15.1,0, 0.3);
  535.     delay(200);
  536.     setfont("bigfont");
  537.     HudMessageBold(s:"ABANDONED MINES"; HUDMSG_FADEINOUT, 0, CR_RED, 0.85, 0.25, 9.0,3.0, 1.5);
  538.     delay(70);
  539.     setfont("bigfont");
  540.     HudMessageBold(s:"AUTHOR:IBM5155"; HUDMSG_FADEINOUT, 0, CR_WHITE, 0.84, 0.29+hud_resize(), 7.0,3.0, 1.5);
  541. }
  542.  
  543. script 25 open clientside{//Flicker blue computer room
  544.     int brightlevel=255;
  545.     while(true){
  546.         if(generator1==1 && generator2==0){
  547.             if(brightlevel>100) brightlevel=random(0,100);
  548.             else brightlevel=random(101,255);
  549.             Light_ChangeToValue(80,brightlevel);
  550.             Light_changetovalue(81,brightlevel);
  551.         }else if(generator1==0 && generator2==0){
  552.             Light_ChangeToValue(80,112);
  553.             Light_changetovalue(81,112);
  554.         }else{
  555.             Light_ChangeToValue(80,255);
  556.             Light_changetovalue(81,255);
  557.         }delay(random(1,10));
  558.     }
  559. }
  560. int ibmnu_text[5]={"ibmnu1","ibmnu2","ibmnu3","ibmnu4","ibmnu1"};
  561.  
  562.  
  563. script 26 open{//Update server side functions to clientside
  564.     while(true){
  565.         acs_execute(23,0,1,user_ghoulactivesound,user_invisible);
  566.         delay(1);
  567.         acs_execute(23,0,2,script_test,ghoul_invtest);
  568.         delay(1);
  569.         acs_execute(23,0,3,stuck_test,script_test);
  570.         delay(1);
  571.         acs_execute(23,0,4,ghoul_hate,sound_toplay);
  572.         delay(1);
  573.         acs_execute(23,0,5,ghoul_target,ghoul_target_distance);
  574.         delay(1);
  575.         acs_execute(23,0,6,soulsphere_damage,generator1);
  576.         delay(1);
  577.         acs_execute(23,0,7,generator2,dev);
  578.         delay(1);
  579.         acs_execute(23,0,8,weather,ibm_distance(100,ghoul_target));
  580.         delay(10);
  581.     }
  582. }
  583. script 27 open {//Switch Code display core
  584.     int comm=0;
  585.     int num_pos=0;
  586.     int s_exit=FALSE;
  587.     while(s_exit==FALSE){
  588.         if(comm==0 && secret[8]+secret[9]+82!=86) {SetLineTexture(secret[8]+secret[9]+82,SIDE_FRONT,TEXTURE_MIDDLE,"ibmnu5"); comm++;}
  589.         else if (secret[8]+secret[9]+82!=86) {SetLineTexture(secret[8]+secret[9]+82,SIDE_FRONT,TEXTURE_MIDDLE,"ibmnu6"); comm--;}
  590.         else s_exit=true;
  591.         num_pos=secret[secret[8]+secret[9]+3];//receive the actual number;
  592.         if(num_pos!=0)SetLineTexture(secret[8]+secret[9]+81,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[num_pos-1]);
  593.         delay(10);
  594.     }
  595. }
  596.  
  597. int nedm_digit1='-',nedm_digit2='-',nedm_digit3='-',nedm_digit4='-', nedm_digit5='-', nedm_digit6='-';
  598. bool nedm_digit_lock=false;
  599.  
  600. int mcdonald=0;
  601. int pos_z_nedm;
  602. script 29 (int input){//Nedm Script: Switch counter to allow nedm
  603.     bool script_lock=false;
  604.    
  605.     pos_z_nedm=getactorz(PlayerNumber()+600);
  606.     if(input==6){
  607.         if(pos_z_nedm<140.0){
  608.             script_lock=true;
  609.     }   }
  610.     else if(input==2){
  611.         if(pos_z_nedm<110.0){
  612.             script_lock=true;
  613.     }   }
  614.     else if(input==3){
  615.         if(pos_z_nedm<230.0){
  616.             script_lock=true;
  617.     }   }
  618.     if(nedm_digit_lock==false && script_lock==false && script_lock==false){
  619.         if(nedm_digit1=='-') {nedm_digit1=input; print(s:"NEDM SWITCH CODE\n",d:nedm_digit1,s:" - - - - -");}
  620.         else if(nedm_digit2=='-') {nedm_digit2=input; print(s:"NEDM SWITCH CODE\n",d:nedm_digit1,s:" ",d:nedm_digit2,s:" - - - -");}
  621.         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:" - - -");}
  622.         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:" - -");}
  623.         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:" -");}
  624.         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);}
  625.     }else if(input!=0) print(s:"locked");
  626.     if(nedm_digit6!='-'){
  627.         if(nedm_code==0){
  628.             if(nedm_digit1==1 && nedm_digit2==2 && nedm_digit3==3 && nedm_digit4==4 && nedm_digit5==5 && nedm_digit6==6){
  629.                 printbold(n:0, s:" found the right code for active nedm!!!");
  630.                 ceiling_raisebyvalue(91,1,8);
  631.                 nedm_digit_lock=true;
  632.                 nedm_digit6='-';
  633.             }
  634.             else{
  635.                 nedm_digit1='-'; nedm_digit2='-'; nedm_digit3='-'; nedm_digit4='-'; nedm_digit5='-'; nedm_digit6='-';
  636.                 print(s:"wrong code");
  637.             }
  638.         }else if(nedm_code==1){
  639.             if(nedm_digit1==6 && nedm_digit2==5 && nedm_digit3==4 && nedm_digit4==3 && nedm_digit5==2 && nedm_digit6==1){
  640.                 printbold(n:0, s:" found the right code for active nedm!!!");
  641.                 ceiling_raisebyvalue(91,1,8);
  642.                 nedm_digit_lock=true;
  643.                 nedm_digit6='-';
  644.             }
  645.             else{
  646.                 nedm_digit1='-'; nedm_digit2='-'; nedm_digit3='-'; nedm_digit4='-'; nedm_digit5='-'; nedm_digit6='-';
  647.                 print(s:"wrong code11");
  648.             }
  649.         }else if(nedm_code==2){
  650.             if(nedm_digit1==1 && nedm_digit2==1 && nedm_digit3==1 && nedm_digit4==6 && nedm_digit5==6 && nedm_digit6==6){
  651.                 printbold(n:0, s:" found the right code for active nedm!!!");
  652.                 ceiling_raisebyvalue(91,1,8);
  653.                 nedm_digit_lock=true;
  654.                 nedm_digit6='-';
  655.             }
  656.             else{
  657.                 nedm_digit1='-'; nedm_digit2='-'; nedm_digit3='-'; nedm_digit4='-'; nedm_digit5='-'; nedm_digit6='-';
  658.                 print(s:"wrong code");
  659.             }
  660.         }else{
  661.             if(nedm_digit1==6 && nedm_digit2==6 && nedm_digit3==6 && nedm_digit4==1 && nedm_digit5==1 && nedm_digit6==1){
  662.                 printbold(n:0, s:" found the right code for active nedm!!!");
  663.                 ceiling_raisebyvalue(91,1,8);
  664.                 nedm_digit_lock=true;
  665.                 nedm_digit6='-';
  666.             }
  667.             else{
  668.                 nedm_digit1='-'; nedm_digit2='-'; nedm_digit3='-'; nedm_digit4='-'; nedm_digit5='-'; nedm_digit6='-';
  669.                 print(s:"wrong code");
  670.             }
  671.  
  672.         }
  673.     }
  674.     //-------------------------------------------------------------------------------------------------
  675.     if(input==0) {mcdonald++;}
  676.     if(mcdonald==55){
  677.         ceiling_lowerbyvalue(91,100,8);
  678.         ceiling_raisebyvalue(92,1,8);
  679.     }
  680.     else if(mcdonald==105){
  681.         acs_execute(30,0,0,0,0);
  682.         ceiling_lowerbyvalue(92,100,8);
  683.         delay(353);
  684.         floor_lowerbyvalue(89,200,200);
  685.         floor_lowerbyvalue(90,200,200);
  686.         tagwait(90);
  687.         Floor_Waggle(89, 2000, 100, 0, 0);
  688.         delay(100);
  689.         Floor_Waggle(90, 2000, 100, 0, 0);
  690.     }
  691. }
  692.  
  693.  
  694.        
  695. int nedm_desactive=false;
  696.  
  697. script 30 (void) clientside{//NEDM code spam
  698.     int counter=0;
  699.     int posy=-3.0;
  700.     while(posy<=0.05){
  701.         SetFont("NEDML");
  702.         if(nedm_desactive==false)HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, 0.5, posy,0.1,0, 0.3);
  703.         posy+=0.01;
  704.         delay(1);
  705.     }SetFont("NEDML");
  706.     if(nedm_desactive==false)HudMessagebold(s:"A"; HUDMSG_PLAIN , 800, counter, 0.5, posy,1.5,0, 0);
  707.     Music_Played=NEDM_MUSIC;
  708.     if(nedm_desactive==false)play_zm09_music();
  709.     delay(35);
  710.     if(nedm_desactive==false)spawnspot("FlareDisco",87,132,0);
  711.     ACS_Suspend(34,0);
  712.     acs_execute(31,0);
  713.     if(nedm_desactive==false)acs_execute(33,0);
  714.     while(true){
  715.         if(nedm_desactive==false){
  716.             SetFont("NEDML");
  717.             HudMessagebold(s:"A"; HUDMSG_PLAIN , 800, counter, 0.5, posy,0.1,0, 0);
  718.         }delay(1);
  719.     }
  720. }
  721.  
  722. script 31 (void) clientside{//Nedm Code:Cat see
  723.     int posx1=0.1;
  724.     int posx2=0.9;
  725.     int posy=0.9;
  726.     while(true){
  727.         while(posy>=0.1){
  728.             if(nedm_desactive==false){
  729.                 SetFont("NEDMCAT");
  730.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx1, posy,0.1,0, 0.2);
  731.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx2, posy,0.1,0, 0.2);
  732.             }
  733.             posy-=0.010;  
  734.             delay(3);
  735.         }while(posx1<=0.9){
  736.             if(nedm_desactive==false){
  737.                 SetFont("NEDMCAT");
  738.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx1, posy,0.1,0, 0.2);
  739.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx2, posy,0.1,0, 0.2);
  740.             }
  741.             posx2=1.0-posx1;
  742.             posx1+=0.010;
  743.             delay(3);
  744.         }while(posy<=0.9){
  745.             if(nedm_desactive==false){
  746.                 SetFont("NEDMCAT");
  747.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx1, posy,0.1,0, 0.2);
  748.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx2, posy,0.1,0, 0.2);
  749.             }
  750.             posy+=0.010;
  751.             delay(3);
  752.         }while(posx1>=0.1){
  753.             if(nedm_desactive==false){
  754.                 SetFont("NEDMCAT");
  755.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx1, posy,0.1,0, 0.2);
  756.                 HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx2, posy,0.1,0, 0.2);
  757.             }
  758.             posx2=1.0-posx1;
  759.             posx1-=0.010;
  760.             delay(3);
  761.         }
  762.         delay(1);
  763.     }
  764. }
  765. script 32 (int x) NET clientside
  766. {
  767.     if(thingcount(t_none,playernumber()+600)==0)
  768.         changecamera(100,playernumber(),0);
  769. }
  770. script 33 (int light, int var) clientside{//Nedm colored lights
  771.     int arg1,arg2,arg3;
  772.     int posy,i;
  773.     if(light==2){
  774.         For(i=49;i<=52;i++)    Thing_SetSpecial(i,0,var,var,var);
  775.         Thing_SetSpecial(86,0,var,var,var);
  776.         Thing_SetSpecial(88,0,var,var,var);
  777.     }
  778.     else{
  779.         while(TRUE){
  780.             posy=random(0,6);
  781.             switch(posy){
  782.             case 0:
  783.                 arg1=random(70,255);
  784.                 arg2=random(70,255);
  785.                 arg3=random(70,255);
  786.                 break;
  787.             case 1:
  788.                 arg1=random(0,100);
  789.                 arg2=random(0,100);
  790.                 arg3=random(100,255);
  791.                 break;
  792.             case 2:
  793.                 arg1=random(0,100);
  794.                 arg2=random(100,255);
  795.                 arg3=random(0,100);
  796.                 break;
  797.             case 3:
  798.                 arg1=random(100,255);
  799.                 arg2=random(0,100);
  800.                 arg3=random(0,100);
  801.                 break;
  802.             case 4:
  803.                 arg1=random(100,255);
  804.                 arg2=random(100,255);
  805.                 arg3=random(0,100);
  806.                 break;
  807.             case 5:
  808.                 arg1=random(100,255);
  809.                 arg2=random(0,100);
  810.                 arg3=random(100,255);
  811.                 break;
  812.             case 6:
  813.                 arg1=random(0,100);
  814.                 arg2=random(100,255);
  815.                 arg3=random(100,255);
  816.                 break;
  817.             }
  818.             for(i=49;i<53;i++) Thing_SetSpecial(i,0,arg1,arg2,arg3);
  819.             Thing_SetSpecial(86,0,arg1,arg2,arg3);
  820.             Thing_SetSpecial(88,0,arg1,arg2,arg3);
  821.             delay(3);
  822.         }
  823.     }
  824. }
  825. int script_34_adress[10]={49,50,51,52,86,88,145,125,126,103};
  826. script 34 (int action) clientside{//LIGHT effected by ravishing, lava and generator on
  827.     int arg1=100,arg2=100,arg3=100;
  828.     int posy;
  829.     int i=122,j=0;
  830.     int effect=0;
  831.     if(getplayerrender()==OPENGL_PLAYER){
  832.             if(action==1){
  833.                 while(true){/*--------------------------------------------------------------------
  834.                     while(arg1<=135)
  835.                     {
  836.                         j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,arg1,arg2,arg3); j++;}
  837.                         arg1+=5;arg2+=5;arg3+=5;
  838.                         delay(1);      
  839.                     }
  840.                     while(arg1>=30)
  841.                     {
  842.                         j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,arg1,arg2,arg3); j++;}
  843.                         arg1-=5;arg2-=5;arg3-=5;
  844.                         delay(1);      
  845.                     }
  846.                 delay(1);
  847.                 }--------------------------------------------------------------------*/
  848.                     effect=random(0,1000);
  849.                     if(effect<=300 || effect>=400){
  850.                         arg1=random(0,50);
  851.                         for(j=0;j<=6;j++){
  852.                             Thing_SetSpecial(script_34_adress[j],0,arg1,arg1,arg1);
  853.                         }delay(random(1,9));
  854.                         arg1=random(50,160);
  855.                         for(j=0;j<=6;j++){Thing_SetSpecial(script_34_adress[j],0,arg1,arg1,arg1);}
  856.                         delay(random(1,9));
  857.                     }else if(effect<=350){
  858.                         for(j=0;j<=6;j++){Thing_SetSpecial(script_34_adress[j],0,0,0,0);}
  859.                         delay(random(15,50));
  860.                     }
  861.                     else{
  862.                         for(j=0;j<=6;j++){Thing_SetSpecial(script_34_adress[j],0,0,0,0);}
  863.                         delay(random(60,150));
  864.                     }
  865.                 }
  866.                 while(arg1<=135)
  867.                     {
  868.                         j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,arg1,arg2,arg3); j++;}
  869.                         arg1+=5;arg2+=5;arg3+=5;
  870.                         delay(1);      
  871.                     }
  872.                 //----------------------------------------------------NEW
  873.             }
  874.             else if(action==11){
  875.                     arg1=255;arg2=255;arg3=255;
  876.                     j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,arg1,arg2,arg3); j++;}
  877.                     generator2=1;
  878.             }
  879.             else if(action==0){
  880.                     j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,0,0,0); j++;}
  881.             }
  882.             else;
  883.             delay(1);
  884.     }else{
  885.              if(action==true){
  886.                 while(true){
  887.                     while(arg1<=135){
  888.                         for(i=7;i<10;i++, arg1+=5)Light_ChangeToValue(script_34_adress[i],arg1);
  889.                         delay(1);      
  890.                     }
  891.                     while(arg1>=30){
  892.                         for(i=7;i<10;i++, arg1-=5)Light_ChangeToValue(script_34_adress[i],arg1);
  893.                         delay(1);      
  894.                     }
  895.                 delay(1);
  896.                 }
  897.             }
  898.             else if(action==11){
  899.                     arg1=255;
  900.                     for(i=7;i<10;i++)Light_ChangeToValue(script_34_adress[i],arg1);
  901.                     generator2=1;
  902.             }
  903.             else if(action==0){
  904.                     for(i=7;i<10;i++, arg1-=5)Light_ChangeToValue(script_34_adress[i],arg1);
  905.             }
  906.             delay(1);
  907.         }
  908. }
  909. script 35 (void){//White Face Script
  910.     int rnd=0;
  911.     int snd=0;
  912.     int i=0;
  913.     delay(5);
  914.     ReplaceTextures("CONS1_5","ITEX20");
  915.     ReplaceTextures("ITEXE10","ITEXE33");
  916.     ReplaceTextures("ITEXE11","ITEXE33");
  917.     ReplaceTextures("ITEXE12","ITEXE29");
  918.     ReplaceTextures("ITEXE13","ITEXE41");
  919.     ReplaceTextures("ITEXE14","ITEXE41");
  920.     ReplaceTextures("IBMNU6","ITEX25");
  921.     ReplaceTextures("IBMNU5","ITEX25");
  922.     ReplaceTextures("IBMNU4","ITEX25");
  923.     ReplaceTextures("IBMNU3","ITEX25");
  924.     ReplaceTextures("IBMNU2","ITEX25");
  925.     ReplaceTextures("IBMNU1","ITEX25");
  926.     ReplaceTextures("COMPTALL","ITEXE45");
  927.     SetActorProperty(100,APROP_RenderStyle,STYLE_Translucent);
  928.     while(true){
  929.         rnd=random(0,100);
  930.         if(rnd<=15){
  931.             ThingSound(100,"ELAUGHT",127);
  932.             while(i<=1.0){
  933.                 SetActorProperty(100,APROP_Alpha,i);
  934.                 i+=6553;
  935.                 delay(2);
  936.             }while(i>=0){
  937.                 SetActorProperty(100,APROP_Alpha,i);
  938.                 i-=6553;
  939.                 delay(2);
  940.             }
  941.         }else if(rnd>=90){
  942.             SetActorProperty(100,APROP_Speed,12.0);
  943.             while(snd<=23){
  944.                 snd++;
  945.                 ThingSound(100,"KIDSND",127);
  946.                 while(i<=1.0){
  947.                     SetActorProperty(100,APROP_Alpha,i);
  948.                     i+=6553;
  949.                     delay(2);
  950.                 }while(i>0){
  951.                     SetActorProperty(100,APROP_Alpha,i);
  952.                     i-=6553;
  953.                     delay(2);
  954.                 }
  955.             }SetActorProperty(100,APROP_Speed,3.0);
  956.             SetActorProperty(100,APROP_Alpha,0.0);
  957.             snd=0;
  958.        }else{
  959.             ThingSound(100,"GDSEE",127);
  960.             rnd=random(0,100);
  961.             if(rnd>49){
  962.                 SetActorProperty(100,APROP_Alpha,0.3);
  963.                 delay(12);
  964.                 SetActorProperty(100,APROP_Alpha,0.0);
  965.             }
  966.        }delay(50);
  967.    }
  968. }
  969.  
  970.  
  971. script 38 (int x) clientside{//Miners dead description
  972.     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");
  973.     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");  
  974.     else    print(s:"James\nWas born in 06/05/1975\nDead in 06/03/1983\nSuicide\nchildren with mental problens");
  975. }
  976.  
  977. script 39 (void){//Remove water on blue key door
  978.     Ceiling_lowerbyvalue(104,30,1248);
  979. }
  980.  
  981. script 40 (int qnt){//Kid Laught in some areas
  982.     int i=0;
  983.     int k;
  984.     while(i<=qnt){
  985.         k=random(0,100);
  986.         if(k==50){
  987.             activatorsound("ELAUGHT",255);
  988.             i=qnt;
  989.         }
  990.         else{
  991.             k=random(0,100);
  992.         }
  993.         i++;
  994.     }
  995. }
  996.  
  997.  
  998.  
  999. script 41 (int X) clientside{//White Face scirpt: Change the map + Ravishing vision
  1000.     int i=0;
  1001.     int k=90;
  1002.     int j;
  1003.     if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
  1004.     if(x==1){//I´m scared kill
  1005.         ACS_Terminate(30,0);
  1006.         ACS_Terminate(31,0);
  1007.         ACS_Terminate(32,0);
  1008.         ACS_Terminate(33,0);
  1009.         ACS_Terminate(34,0);
  1010.         generator1=0;
  1011.         generator2=0;
  1012.         ReplaceTextures("ITEX20","ITEX24");
  1013.         ReplaceTextures("ITEXE29","ITEXE50");
  1014.         ReplaceTextures("ITEXE33","ITEXE51");
  1015.         ReplaceTextures("ITEXE45","ITEXE53");
  1016.         ReplaceTextures("ITEXE41","ITEXE52");
  1017.         SetLineTexture(157,SIDE_FRONT ,TEXTURE_BOTTOM ,"ITEXE55");
  1018.         SetLineTexture(134,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  1019.         SetLineTexture(135,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  1020.         SetLineTexture(136,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  1021.         SetLineTexture(137,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  1022.         SetLineTexture(158,SIDE_FRONT ,TEXTURE_MIDDLE   ,"ITEXE54");
  1023.         SetLineTexture(83,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  1024.         SetLineTexture(84,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  1025.         SetLineTexture(85,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  1026.         SetLineTexture(159,SIDE_FRONT ,TEXTURE_MIDDLE  ,"ITEXE54");
  1027.         HudMessagebold(s:""; HUDMSG_PLAIN , 800, 0, 0.5, 0,0,0, 0);
  1028.         delay(35*5);
  1029.         SetMusic("suicide");
  1030.         Music_Played=IMSCARED_MUSIC;
  1031.         delay(35);
  1032.         SetFont("BIGFONT");
  1033.         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);
  1034.         HudMessageBold(s:"Well, this is my bedroom"; HUDMSG_FADEINOUT, 0, CR_YELLOW, 0.5, 0.32, 13.5, 4.5,3.0);
  1035.         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);
  1036.         HudMessageBold(s:"but it doesn't matter anymore"; HUDMSG_FADEINOUT, 0, CR_YELLOW, 0.5, 0.36, 13.5, 10.5,3.0);
  1037.         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);
  1038.         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);
  1039.         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);
  1040.         delay(35*9);
  1041.         x=2;
  1042.         for(x=49;x<=53;x++){
  1043.             thing_remove(x);
  1044.             Thing_SetSpecial(x,0,255,0,0);
  1045.         }Thing_SetSpecial(86,0,255,0,0);
  1046.         Thing_SetSpecial(88,0,255,0,0);
  1047.         spawnspot("IMSCARED",132,0,0);
  1048.         thing_remove(132);
  1049.         x=0;
  1050.         while(x<200){        
  1051.             if(x!=131 && x!=100 && x!=1) Light_ChangeToValue(x,-100);
  1052.             x++;
  1053.             delay(1);
  1054.         }
  1055.         Thing_SetSpecial(138,0,255,0,0);
  1056.         while(true){
  1057.             x=random(0,7);
  1058.             if(x==0)     spawn("DeadMarine",random(-2263.18,-367.978),random(-1199.85,-429.914),300.0,151,0);//red key spam place
  1059.             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
  1060.             else if(x==2)spawn("DeadMarine",random(0.18,2500.0),random(1000.85,1500.914),385.0,151,0);//Big generator
  1061.             else if(x==3)spawn("DeadMarine",random(2143.18,4000.0),random(2400.85,3790.914),450.0,151,0);//Hell area
  1062.             else if(x==4)spawn("DeadMarine",random(-1009.18,-460.0),random(-225.85,720.914),66.0,151,0);//Entering cave
  1063.             else if(x==5)spawn("DeadMarine",random(-90.18,2668.0),random(1000.85,1500.914),520.0,151,0);//Big generator
  1064.             else if(x==6)spawn("DeadMarine",random(-320.18,1700.0),random(320.85,850.914),300.0,151,0);//Blue key spot
  1065.             else if(x==7)spawn("DeadMarine",random(3947.18,5727.0),random(-2000.85,-230.914),402.0,151,0);//Third floor
  1066.             thingsound(151,"player/male/death1",255);
  1067.             delay(170);
  1068.             thing_changetid(151,0);
  1069.         }
  1070.     }else if(x==2){//ravishing kill
  1071.         changecamera(100,1,0);
  1072.         fadeto(255,255,255,1.0,0.5);
  1073.         delay(35);
  1074.         changecamera(100,0,0);
  1075.         fadeto(255,255,255,0.0,0.5);
  1076.         delay(35*3);
  1077.         changecamera(100,1,0);
  1078.     }else if(x==4){//White face scary spam
  1079.         x=random(0,1000);
  1080.         if(x>=500 && x<=570) acs_execute(43,0,0,0,0);
  1081.     }
  1082. }
  1083. script 42 (int x) clientside{//Software Render lights
  1084.     if(getplayerrender()==SOFTWARE_PLAYER){
  1085.         if(x==false){
  1086.             Light_ChangeToValue(125,255);
  1087.             Light_ChangeToValue(126,166);
  1088.             Light_ChangeToValue(103,166);
  1089.             ChangeFloor(3,"FLAT20");
  1090.             SetFont("BIGFONT");
  1091.             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);
  1092.         }
  1093.         else if(x==true) Light_ChangeToValue(47,255);
  1094.     }
  1095. }
  1096.  
  1097. script 43 (int spot) clientside{//White Face third floor trick
  1098.     int k=90;
  1099.     int i=100;
  1100.     int j;
  1101.     int TEXT1,TEXT2,TEXT3;
  1102.     int light1,light2,light3;
  1103.     if(spot==true){
  1104.         TEXT1="JNROCK13"; TEXT2="BBRWZ04"; TEXT3="WOODN2";
  1105.         light1=119;light2=118;light3=113;
  1106.     }else{
  1107.         TEXT1="ITEXE17"; TEXT2="N_ROCK13"; TEXT3="BROCK41";
  1108.         light1=139;light2=140;light3=141;
  1109.         i=random(0,300);
  1110.         if(i<100 || i>=125) terminate;
  1111.     }if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
  1112.     if(k>=90){
  1113.         ReplaceTextures(TEXT1,"SP_FACE2");
  1114.         ReplaceTextures(TEXT2,"FIREBLU2");
  1115.         ReplaceTextures(TEXT3,"N_SKIN03");
  1116.         spawnspot("imscared",115,116,0);
  1117.         spawnspot("Dead_Baby",117,200,0);
  1118.         localsetmusic("FUCKED");
  1119.         while(k<=237){
  1120.             if(i>=59){
  1121.                 thingsound(117,"KIDSND",255);
  1122.                 i=-1;
  1123.             }j=random(0,255);
  1124.             Light_ChangeToValue(light1,j);
  1125.             Light_ChangeToValue(light2,j);
  1126.             Light_ChangeToValue(light3,j);
  1127.             k++;
  1128.             i++;
  1129.             delay(1);
  1130.         }
  1131.         Local_SetLastMusic();
  1132.         ReplaceTextures("SP_FACE2",TEXT1);
  1133.         ReplaceTextures("FIREBLU2",TEXT2);
  1134.         ReplaceTextures("N_SKIN03",TEXT3);
  1135.         if(spot==true){
  1136.         Light_ChangeToValue(light1,112);        Light_ChangeToValue(light2,104);        Light_ChangeToValue(light3,112);
  1137.         }else{
  1138.             Light_ChangeToValue(light1,104);            Light_ChangeToValue(light2,96);            Light_ChangeToValue(light3,88);
  1139.         }thing_remove(116);
  1140.         thing_remove(200);
  1141.         delay(70);
  1142.         activatorsound("ELAUGHT",255);
  1143.     }  
  1144. }
  1145.  
  1146. script 44 (void){//White Face attack script
  1147.     SetHudSize(640,480,1);
  1148.     SetFont("ISCAR");
  1149.     activatorsound("SOULFUCK",255);
  1150.     HudMessage(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, 0.5, 0.5,5.0,0, 0.2);
  1151.     teleport(102,0,0);
  1152.     acs_execute(41,0,1,0,0);
  1153.     SetFont("SMALLFONT");
  1154. }
  1155.  
  1156. script 45 (void){//Third floor table room random events
  1157.     int x=random(0,100);
  1158.     switch(x){
  1159.     case 0:
  1160.     case 15:
  1161.     case 20:
  1162.     case 25:
  1163.     case 30:
  1164.         acs_execute(43,0,1,0,0);
  1165.         break;
  1166.     case 35:
  1167.     case 40:
  1168.             giveinventory("IMSCAREDACTIVE",1);
  1169.             break;
  1170.     case 45:
  1171.     case 46:
  1172.     case 47:
  1173.     case 48:
  1174.         ambientsound("ELAUGHT",255);
  1175.         break;
  1176.     }
  1177. }
  1178. script 47 (void) clientside{//Rainfall script
  1179.     int X_SPOT=0, Y_SPOT=0, X_MIN=0, X_MAX=0, Y_MIN=0, Y_MAX=0, VAR_SPOT=250.0;
  1180.     int z_heigh,y_heigh, x_heigh;
  1181.     int a=0,b=0,c=0;
  1182.     int MAX2;
  1183.     int tid=122;
  1184.     int x, y, z ;
  1185.     int tid2=unusedTID(1000,2000);
  1186.     int player_tid2;
  1187.     if(rain_sound==1)thing_activate(144);
  1188.     while(true){
  1189.    player_tid2=consoleplayernumber()+PLAYER_TID;
  1190.         a=getactorx(player_tid2);//getactorx(ConsolePlayerNumber());
  1191.         b=getactory(player_tid2);//getactory(ConsolePlayerNumber());
  1192.         c=getactorz(player_tid2);//getactorz(ConsolePlayerNumber());
  1193.    if(weather_quality==-1)      {X_MIN=-250.0; X_MAX=250.0; Y_MIN=-500.0; Y_MAX=250.0; VAR_SPOT=250.0;}  
  1194.         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;}
  1195.         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;}
  1196.         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;}
  1197.         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;}
  1198.         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;}
  1199.         X_SPOT=X_MIN; Y_SPOT=Y_MIN;
  1200.         while(Y_SPOT<=Y_MAX){
  1201.             while(X_SPOT<=X_MAX){
  1202.                 x_heigh=random(a+X_SPOT,a+X_SPOT+VAR_SPOT); y_heigh=random(b+Y_SPOT,b+Y_SPOT+VAR_SPOT);
  1203.                 z_heigh=GetActorCeilingZ(PLAYER_TID + PlayerNumber())-16.0;
  1204.                 spawn("mapspot",x_heigh,y_heigh,z_heigh  ,tid,0);
  1205.                 if (thingcount(t_none,tid)==0){
  1206.                     spawn("mapspot",x_heigh,y_heigh,c+10.0  ,tid,0);
  1207.                     if(thingcount(t_none,tid)==0){
  1208.                         spawn("mapspot",x_heigh,y_heigh,GetSectorCeilingZ(0,x_heigh /1.0,y_heigh /1.0)-20.0,tid,0);
  1209.                         if(thingcount(t_none,tid)==0){
  1210.                             spawn("mapspot",x_heigh,y_heigh,c+74.0  ,tid,0);
  1211.                                 if(thingcount(t_none,tid)==0) spawn("mapspot",x_heigh,y_heigh,c+274.0  ,tid,0);
  1212.                 }   }   }
  1213.                 if (CheckActorCeilingTexture(tid, "F_SKY1")){    
  1214.                     z_heigh=GetHigherCeiling(tid)-16.0;
  1215.                     thing_remove(tid);
  1216.                     spawn("mapspot",x_heigh,y_heigh,z_heigh,tid,0);
  1217.                     if(rain_detail==0)spawnspot("raindrop",tid,0,0);
  1218.                     else if(rain_detail==1)spawnspot("raindrop2",tid,0,0);
  1219.                     else spawnspot("raindrop3",tid,0,0);
  1220.                 }
  1221.                 X_SPOT+=VAR_SPOT;
  1222.                 thing_remove(tid);
  1223.       if(weather_quality==-1) delay(1);
  1224.             }
  1225.             X_SPOT=X_MIN;
  1226.             Y_SPOT+=VAR_SPOT;
  1227.         }
  1228.         delay(1);
  1229.     }
  1230. }
  1231.  
  1232. script 48 (void) NET clientside{//Rainfall menu
  1233.     int menu=0;
  1234.     int i=0;
  1235.     zm09_update_settings();
  1236.    
  1237.     while(true){
  1238.         i=0;
  1239.         menu_zm09=menu;
  1240.         while(i<5){i++;}
  1241.             SETFONT("SMALLFONT");
  1242.             HudMessagebold(s:"ZM09 SETTING"; HUDMSG_PLAIN, 544, CR_UNTRANSLATED, 0.5, 0.44,0,0, 0);
  1243.             SETFONT("SMALLFONT");
  1244.             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.64+hud_resize(),0,0, 0);
  1245.             zm09_menu_print();
  1246.             if(menu==0){
  1247.                 menu_zm09=1;
  1248.                 menu=1;
  1249.                 zm09_menu_print();
  1250.                 AmbientSound("menu/activate",127);
  1251.             }
  1252.         else if(menu==-1){
  1253.                 SETFONT("SMALLFONT");
  1254.                 HudMessagebold(s:""; HUDMSG_PLAIN, 544, CR_UNTRANSLATED, 0.5, 0.5,15.1,0, 0);
  1255.                 HudMessagebold(s:""; HUDMSG_PLAIN, 545, CR_UNTRANSLATED, 0.5, 0.48,15.1,0, 0);
  1256.                 HudMessagebold(s:""; HUDMSG_PLAIN, 546, CR_UNTRANSLATED, 0.5, 0.46,15.1,0, 0);
  1257.                 HudMessagebold(s:""; HUDMSG_PLAIN, 547, CR_UNTRANSLATED, 0.44, 0.5,15.1,0, 0);
  1258.                 HudMessagebold(s:""; HUDMSG_PLAIN, 548, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1259.                 HudMessagebold(s:""; HUDMSG_PLAIN, 549, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1260.                 HudMessagebold(s:""; HUDMSG_PLAIN, 550, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1261.                 HudMessagebold(s:""; HUDMSG_PLAIN, 551, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1262.                 //activatorsound("menu/choose",127);DSSWTCHX
  1263.                 AmbientSound("switches/exitbutn",127);
  1264.                 menu=0;
  1265.                 SetCvar("x_zh_zm09",(music_quality+1)*10000+(rain_detail+2)*1000+(rain_sound+2)*100+(weather_quality+2)*10+(nedm_desactive+2+reflection_actived*2));
  1266.                 terminate;
  1267.         }
  1268.         if(menu==1){
  1269.             while(menu==1){
  1270.                 zm09_menu_print();
  1271.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
  1272.                     weather_quality--;
  1273.                     if(weather_quality==-2) weather_quality=-1;
  1274.                     AmbientSound("menu/change",127);
  1275.                     delay(5);
  1276.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
  1277.                     weather_quality++;
  1278.                     if(weather_quality==4) weather_quality=3;
  1279.                     AmbientSound("menu/change",127);
  1280.                     delay(20);
  1281.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1282.                     menu=2;
  1283.                     AmbientSound("menu/cursor",127);
  1284.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE) menu=-1;
  1285.                 delay(1);
  1286.             }
  1287.             delay(5);
  1288.         }
  1289.         else if(menu==2){
  1290.             while(menu==2){
  1291.                 zm09_menu_print();
  1292.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
  1293.                     if(rain_sound==1){ rain_sound=0;
  1294.                     thing_deactivate(144);
  1295.                     }
  1296.                 AmbientSound("menu/change",127);
  1297.                 delay(5);
  1298.             }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
  1299.                 if(rain_sound==0){ rain_sound=1;
  1300.                     if(rainfall_actived==true)thing_activate(144);
  1301.                 }AmbientSound("menu/change",127);
  1302.                 delay(5);
  1303.             }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1304.                 menu=3;
  1305.                 AmbientSound("menu/cursor",127);
  1306.             }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1307.                 menu=1;
  1308.                 AmbientSound("menu/cursor",127);
  1309.             }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE) menu=-1;
  1310.                 delay(1);
  1311.             }delay(5);
  1312.         }else if(menu==3){
  1313.             while(menu==3){
  1314.                 zm09_menu_print();
  1315.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
  1316.                     rain_detail--;
  1317.                     if(rain_detail==-1) rain_detail=0;
  1318.                     AmbientSound("menu/change",127);
  1319.                     delay(5);
  1320.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
  1321.                     rain_detail++;
  1322.                     if(rain_detail==3) rain_detail=2;
  1323.                     AmbientSound("menu/change",127);
  1324.                     delay(5);
  1325.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1326.                     menu=2;
  1327.                     AmbientSound("menu/cursor",127);
  1328.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1329.                     menu=4;
  1330.                     AmbientSound("menu/cursor",127);
  1331.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE) menu=-1;
  1332.                 delay(1);
  1333.             }
  1334.             delay(5);///////////////////////////////
  1335.         }else if(menu==4){
  1336.             while(menu==4){
  1337.                 zm09_menu_print();
  1338.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
  1339.                     nedm_desactive--;
  1340.                     Local_SetLastMusic();
  1341.                     if(Music_Played==NEDM_MUSIC) spawnspot("FlareDisco",87,132,0);
  1342.                     if(nedm_desactive==-1) nedm_desactive=false;
  1343.                     AmbientSound("menu/change",127);
  1344.                     delay(5);
  1345.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
  1346.                     nedm_desactive++;
  1347.                     if(Music_Played==NEDM_MUSIC) {setmusic("D_NULL");thing_remove(132);}
  1348.                     if(nedm_desactive==2) nedm_desactive=true;
  1349.                     AmbientSound("menu/change",127);
  1350.                     delay(5);
  1351.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1352.                     menu=3;
  1353.                     AmbientSound("menu/cursor",127);
  1354.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
  1355.                     menu=-1;
  1356.                     delay(1);
  1357.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1358.                     AmbientSound("menu/cursor",127);
  1359.                     menu=5;
  1360.                 }delay(1);
  1361.             }
  1362.             delay(5);
  1363.         }else if(menu==5){
  1364.             while(menu==5){
  1365.                 zm09_menu_print();
  1366.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
  1367.                     reflection_actived--;
  1368.                     if(reflection_actived==-1) reflection_actived=false;
  1369.                     Sector_SetPlaneReflection (149, 0, 0);
  1370.                     Sector_SetPlaneReflection (3, 0, 0);
  1371.                     Sector_SetPlaneReflection (153, 0, 0);
  1372.                     AmbientSound("menu/change",127);
  1373.                     delay(5);
  1374.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
  1375.                     reflection_actived++;
  1376.                     if(reflection_actived==2) reflection_actived=true;
  1377.                     Sector_SetPlaneReflection (149, 66, 0);
  1378.                     Sector_SetPlaneReflection (3, 44, 0);
  1379.                     Sector_SetPlaneReflection (153, 44, 0);
  1380.                     AmbientSound("menu/change",127);
  1381.                     delay(5);
  1382.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1383.                     menu=4;
  1384.                     AmbientSound("menu/cursor",127);
  1385.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
  1386.                     menu=-1;
  1387.                     delay(1);
  1388.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1389.                     menu=6;
  1390.                     activatorsound("menu/cursor",127);
  1391.                 }
  1392.             delay(5);
  1393.             }
  1394.         }else if(menu==6){
  1395.             while(menu==6){
  1396.                 zm09_menu_print();
  1397.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
  1398.                     music_quality=0;
  1399.                     play_zm09_music();
  1400.                     AmbientSound("menu/change",127);
  1401.                     delay(5);
  1402.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
  1403.                     music_quality=true;
  1404.                     play_zm09_music();
  1405.                     AmbientSound("menu/change",127);
  1406.                     delay(5);
  1407.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1408.                     menu=5;
  1409.                     AmbientSound("menu/cursor",127);
  1410.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
  1411.                     menu=-1;
  1412.                     delay(1);
  1413.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1414.                     menu=6;
  1415.                     //activatorsound("menu/cursor",127);
  1416.                 }
  1417.             delay(5);
  1418.             }        }
  1419.     delay(1);
  1420.     }
  1421. }
  1422. script 49 open {//Weather selector
  1423.     delay(50);
  1424.     weather=random(1,100);
  1425.     if(weather>=50 && weather<=65){
  1426.         rainfall_actived=true;
  1427.         SETFONT("SMALLFONT");
  1428.         //Thing_ChangeTID(0, PLAYER_TID+PlayerNumber());
  1429.         Light_ChangeToValue(23,90);
  1430.         Sector_Setcolor(23,128,128,128);
  1431.         Light_ChangeToValue(142,90);
  1432.         Sector_Setcolor(142,128,128,128);
  1433.         Light_ChangeToValue(143,64);
  1434.         Sector_Setcolor(143,128,128,128);
  1435.         ReplaceTextures("IBMTE2","SKYFOG0",NOT_MIDDLE);
  1436.         Light_ForceLightning(0);
  1437.         acs_execute(47,0,0,0,0);
  1438.     }
  1439. }
  1440. script 50 LIGHTNING {//RAIN SCRIPT
  1441.     Delay(Random(20, 200));
  1442.     AmbientSound("thunder",127);
  1443. }
  1444. int piano_touched=0;
  1445.  
  1446. script 51 (void){//Piano script
  1447.     int i=random(0,10);
  1448.     if(piano_touched>=random(20,50)){
  1449.         thingsound(150,"riff3",127);
  1450.         print(s:"\cfahhhhh, this sound is so annoying, I will make you stop ");
  1451.         delay(45);
  1452.         thingsound(150,"ELAUGHT",127);
  1453.         delay(100);
  1454.         giveinventory("IMSCAREDACTIVE",1);
  1455.         piano_touched=0;
  1456.     }else{
  1457.        
  1458.         if(i<=5) thingsound(150,"riff1",127);
  1459.         else thingsound(150,"riff2",127);
  1460.         piano_touched++;
  1461.     }if(piano_touched==24) door_open(146,30);
  1462.     delay(90);
  1463. }
  1464.  
  1465. Script 52 (void) clientside{//Generic Locked Door Mensage/Sound
  1466.     if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
  1467.     Print(s:"Noone can enter on Igor's abandoned castle");
  1468.     ActivatorSound("DRLOCKED", 127);
  1469.     delay(15);
  1470. }
  1471.  
  1472. script 53 open clientside{//Abandoned Igor's Castle"
  1473.     while(true){
  1474.         delay(200);
  1475.         thingsound(160,"LORDIGOR",255);
  1476.         delay(1);
  1477.     }
  1478. }
  1479. script 54 open clientside{//Abandoned Igor's Castle"
  1480.     int i=0;
  1481.     while(true){
  1482.         i=random(0,255);
  1483.         if(i<60){
  1484.             i=random(1,3);
  1485.             switch(i){
  1486.             case 1:thingsound(160,"TCLTFIR1",255);break;
  1487.             case 2:thingsound(160,"TCLTFIR2",255);break;
  1488.             case 3:thingsound(160,"TCLTFIR3",255);break;
  1489.             }
  1490.         }
  1491.         delay(random(200,300));
  1492.     }
  1493. }
  1494.  
  1495. script 55 (void){//TUTORIAL NEDM
  1496.     int i=0;
  1497.     //161 NEDM SWITCH 1
  1498.     //162 NEDM SWITCH 2
  1499.     //163 NEDM SWITCH 3
  1500.     //164 NEDM SWITCH 4
  1501.     //165 NEDM SWITCH 5
  1502.     //166 NEDM SWITCH 6
  1503.     //167 NEDM SWITCH 7
  1504.     //168 NEDM SWITCH 8
  1505.     //169 NEDM CAT SMILE
  1506.     do{
  1507.         nedm_code=0;//123456
  1508.         thing_remove(169);
  1509.         if(nedm_digit6==6 && nedm_digit5==5 && nedm_digit4==4 && nedm_digit3==3 && nedm_digit2==2 && nedm_digit1==1) i=7;
  1510.         else if(nedm_digit6==6)i=6;
  1511.         else if(nedm_digit5==5)i=5;
  1512.         else if(nedm_digit4==4)i=4;
  1513.         else if(nedm_digit3==3)i=3;  
  1514.         else if(nedm_digit2==2)i=2;
  1515.         else if(nedm_digit1==1)i=1;
  1516.         else i=0;
  1517.         spawnspot("NedmMarker",161+i,169,0);
  1518.         HudMessageBold(s:"go press the nedm switch number: ",d:i+1;HUDMSG_FADEOUT,444,CR_GREEN,0,0.5,1);
  1519.         HudMessageBold(s:"your distance from the next switch is:",d:ibm_distance(600,169);HUDMSG_FADEOUT,445,CR_GREEN,0,0.48,1);
  1520.         delay(1);
  1521.     }while(!nedm_digit_lock);
  1522.     thing_remove(169);
  1523.     spawnspot("NedmMarker",167,169,0);
  1524.     do{
  1525.         HudMessageBold(s:"go press the next nedm switch by :",d:55-mcdonald,s:" times";HUDMSG_FADEOUT,444,CR_GREEN,0,0.5,1);
  1526.         HudMessageBold(s:"your distance from switch is:",d:ibm_distance(600,167);HUDMSG_FADEOUT,445,CR_GREEN,0,0.48,1);
  1527.         delay(1);
  1528.     }while(mcdonald!=55);
  1529.     thing_remove(169);
  1530.     spawnspot("NedmMarker",168,169,0);
  1531.     do{
  1532.         HudMessageBold(s:"go press the next nedm switch by :",d:105-mcdonald,s:" times";HUDMSG_FADEOUT,444,CR_GREEN,0,0.5,1);
  1533.         HudMessageBold(s:"your distance from switch is:",d:ibm_distance(600,168);HUDMSG_FADEOUT,445,CR_GREEN,0,0.48,1);
  1534.         delay(1);
  1535.     }while(mcdonald!=105);
  1536. }
  1537.  
  1538. script 56 (void){//TUTORIAL RED KEY CARD
  1539.     print(s:"loading spots, please wait");
  1540.     for(int i=1;i<800;i++){
  1541.         switch(random(0,10)){
  1542.             case 0:spawn("RedKeyMarker",random(-721.0,-409.0),random(1873.0,2711.0),632.0,350,0); break;
  1543.             case 1:spawn("RedKeyMarker",random(4528.0,5135.0),random(-1664.0,-1361.0),400.0,350,0);break;
  1544.             case 2:spawn("RedKeyMarker",random(5623.0,5807.0),random(-783.0,-497.0),472.0,350,0);break;
  1545.             case 3:spawn("RedKeyMarker",random(2080.0,4079.0),random(2448.0,3823.0),463.0,350,0);break;
  1546.             case 4:spawn("RedKeyMarker",random(-3088.0,-2553.0),random(-1776.0,-1281.0),112.0,350,0);break;
  1547.             case 5:spawn("RedKeyMarker",random(1114.0,1775.0),random(392.0,825.0),318.0,350,0);break;
  1548.             case 6:spawn("RedKeyMarker",random(-1856.0,-1169.0),random(2125.0,2351.0),327.0,350,0);break;
  1549.             case 7:spawn("RedKeyMarker",random(4416.0,4471.0),random(-2004.0,-1961.0),400.0,350,0);break;
  1550.             case 8:spawn("RedKeyMarker",random(-2512.0,879.0),random(-1716.0,-449.0),362.0,350,0);break;
  1551.             case 9:spawn("RedKeyMarker",random(4550.0,4719.0),random(-1246.0,-1169.0),465.0,350,0);break;
  1552.             case 10:spawn("RedKeyMarker",random(-1808.0,-1585.0),random(-2320.0,-2052.0),72.0,350,0);break;
  1553.         }            print(s:"loading spots, please wait\n ",d:(i*100)/800,s:"% loaded");
  1554.  
  1555.         delay(1);
  1556.     }print(s:"loaded");
  1557.     do{
  1558.         HudMessageBold(s:"check your map to find where are the red key card spots...";HUDMSG_FADEOUT,444,CR_GREEN,0,0.5,1);
  1559.         HudMessageBold(s:"your distance from redkey is:",d:ibm_distance(600,36);HUDMSG_FADEOUT,445,CR_GREEN,0,0.48,1);
  1560.         delay(1);
  1561.     }while(true);
  1562. }
  1563.  
  1564. script 57 (void){//TUTORIAL WINERY KEY
  1565.     print(s:"check the map to see where the winery key can be :D");
  1566.     spawnspot("WinKeyMarker",71,0,0);
  1567.      spawnspot("WinKeyMarker",72,0,0);
  1568.       spawnspot("WinKeyMarker",73,0,0);
  1569.        spawnspot("WinKeyMarker",74,0,0);
  1570.        spawnspot("WinKeyMarker",70,0,0);
  1571. }
  1572.  
  1573. script 58 (void){//TUTORIAL: DISABLE NEDM
  1574.     HudMessageBold(s:"                     How to disable NEDM\n\cgWARNING:\cdthis function will not disable buildings dance";HUDMSG_FADEOUT,444,CR_GREEN,0.5,0.5,10.0);
  1575.     delay(35*10);
  1576.     do{
  1577.         do{
  1578.             HudMessageBold(s:"INSTRUCTIONS:\n1)GO TO CONSOLE\n2)TYPE \cfPUKE 48\n\cd3)PRESS ENTER\n4)SELECT NEDM ENABLED AND SET IT TO OFFn\n5)PRESS USE BUTTON TO GO OUT OF MENU AND NOW YOU WILL NEVER MORE SEE NEDM ON THIS MAP :)";HUDMSG_FADEOUT,444,CR_GREEN,0,0.8,1);
  1579.             delay(1);
  1580.        }while(GetPlayerInput(0, INPUT_BUTTONS)!=BT_USE);
  1581.        if(nedm_desactive==false){
  1582.             HudMessageBold(s:"NEDM was not disable, you may acidentaly pressed the use button before disable it, lets try again...";HUDMSG_FADEOUT,444,CR_GREEN,0,0.8,10.0);
  1583.             delay(10*35);
  1584.  
  1585.        }
  1586.     }while(nedm_desactive==false);    
  1587.     HudMessageBold(s:"Congratulations!!!, now you'll not see NEDM, if you missed some part of this tutorial, select again this tutorial...";HUDMSG_FADEOUT,444,CR_GREEN,0.5,0.5,10.0);
  1588.  
  1589. }
  1590.  
  1591.  
  1592.  
  1593. script 59 (void){//TUTORIAL HOW TO UP FRAMERATES DISABLING REFLECTION...
  1594.     HudMessageBold(s:"                     How to inscrease your frames";HUDMSG_FADEOUT,444,CR_GREEN,0.5,0.5,10.0);
  1595.     delay(35*10);
  1596.     do{
  1597.         do{
  1598.             HudMessageBold(s:"INSTRUCTIONS:\n1)GO TO CONSOLE\n2)TYPE \cfPUKE 48\n\cd3)PRESS ENTER\n4)SELECT REFLECTION ENABLED AND SET TO OFF\n5)PRESS USE BUTTON TO GO OUT OF MENU";HUDMSG_FADEOUT,444,CR_GREEN,0,0.8,1);
  1599.             delay(1);
  1600.        }while(GetPlayerInput(0, INPUT_BUTTONS)!=BT_USE);
  1601.        if(reflection_actived==true){
  1602.             HudMessageBold(s:"Reflection was not disable, you may acidentaly pressed the use button before disable it, lets try again...";HUDMSG_FADEOUT,444,CR_GREEN,0,0.8,10.0);
  1603.             delay(10*35);
  1604.  
  1605.        }
  1606.     }while(nedm_desactive==false);    
  1607.     HudMessageBold(s:"Congratulations!!!, you will have your frames higher...";HUDMSG_FADEOUT,444,CR_GREEN,0.5,0.5,10.0);
  1608. }
  1609.  
  1610. script 60 (void){//TUTORIAL HOW TO UP FRAMERATES LOWERING RAIN...
  1611.     HudMessageBold(s:"                     How to increase your frames when it's raining\n\cgWARNING:\cdif this tutorial still not help to up frames, try to lower the resolution and disabling fog!!!";HUDMSG_FADEOUT,444,CR_GREEN,0.5,0.5,15.0);
  1612.     int i=280;
  1613.     int j=280;
  1614.     delay(35*15);
  1615.     print(s:"if you want to rain move, crouch, press open button or fire. If not wait for 7 seconds for the tutorial start...");
  1616.     delay(50);
  1617.     do{
  1618.         if(GetPlayerInput(0, INPUT_BUTTONS)!=0){
  1619.             rainfall_actived=true;
  1620.             SETFONT("SMALLFONT");
  1621.             //Thing_ChangeTID(0, PLAYER_TID+PlayerNumber());
  1622.             Light_ChangeToValue(23,90);
  1623.             Sector_Setcolor(23,128,128,128);
  1624.             Light_ChangeToValue(142,90);
  1625.             Sector_Setcolor(142,128,128,128);
  1626.             Light_ChangeToValue(143,64);
  1627.             Sector_Setcolor(143,128,128,128);
  1628.             ReplaceTextures("IBMTE2","SKYFOG0",NOT_MIDDLE);
  1629.             Light_ForceLightning(0);
  1630.             acs_execute(47,0,0,0,0);
  1631.         }if(i-35<=j)j-=35;
  1632.         print(s:"if you want to rain move, crouch, press open button or fire. If not wait for ", d:j/35,s:" seconds for the tutorial start...");
  1633.         i--;
  1634.         delay(1);
  1635.        
  1636.     }while(GetPlayerInput(0, INPUT_BUTTONS)==0 && i>35);
  1637.     do{
  1638.         do{
  1639.             HudMessageBold(s:"INSTRUCTIONS:\n1)GO TO CONSOLE\n2)TYPE \cfPUKE 48\n\cd3)PRESS ENTER\n4)SELECT RAIN DISTANCE AND SET TO ULTRA LOW MOVING THE PLAYER TO LEFT\n5)SELECT RAIN QUALITY AND SET IT TO LOW\n6)PRESS USE BUTTON TO GO OUT OF MENU";HUDMSG_FADEOUT,444,CR_GREEN,0,0.8,1);
  1640.             delay(1);
  1641.        }while(GetPlayerInput(0, INPUT_BUTTONS)!=BT_USE);
  1642.        if(weather_quality>=0){
  1643.             HudMessageBold(s:"Rain Distance was not set in the lowest distance or you may acidentaly pressed the use button before disable it, lets try again...";HUDMSG_FADEOUT,444,CR_GREEN,0,0.8,10.0);
  1644.             delay(6*35);
  1645.        }else if(rain_detail>0){
  1646.             HudMessageBold(s:"Rain Quality was not set in the low or you may acidentaly pressed the use button before disable it, lets try again...";HUDMSG_FADEOUT,444,CR_GREEN,0,0.8,10.0);
  1647.             delay(6*35);
  1648.        }
  1649.     }while(weather_quality>=false || rain_detail>0);    
  1650.     HudMessageBold(s:"Congratulations!!!, you will have your frames higher when raining...";HUDMSG_FADEOUT,444,CR_GREEN,0.5,0.5,10.0);
  1651. }
  1652.  
  1653. script 61 (void){//TUTORIAL HOW TO MAKE THE RIGHT CODE
  1654.     teleport(169,0,false);
  1655.     HudMessageBold(s:"                     TUTORIAL:How to make the right code";HUDMSG_FADEOUT,444,CR_GREEN,0.5,0.5,20.0);
  1656.     delay(120);
  1657.     HudMessageBold(s:"part 1 of 5\nThis screen sometimes show the right code, but, sometimes it'll hide the right code...\nto discover if you're seeing the right code, there must not be no repeated, and sometimes when there's no repeated number, it may not be that code too";HUDMSG_FADEOUT,444,CR_GREEN,0.5,0.5,20.0);
  1658.     delay(550);
  1659.     HudMessageBold(s:"part 2 of 5\nthe logic is simple, there must not have a repeated number on the screen, and here's the tutorial for when you find two numbers repeated like 1123\n if you see 1123, one of the ones are not the real one but yes four, so it could be 4123 or 1423,example 2:4122 could be 3421 or 3412";HUDMSG_FADEOUT,444,CR_GREEN,0.5,0.5,20.0);
  1660.     delay(600);
  1661.     HudMessageBold(s:"part 3 of 5\nwhen you have two repeated numbers it's as hard to find the code as if you didn'y have the help code on, because instead of two codes, it could be four!!! example:1133 could be:1423,1432,4123,4132";HUDMSG_FADEOUT,444,CR_GREEN,0.5,0.5,20.0);
  1662.     delay(550);
  1663.     HudMessageBold(s:"part 4 of 5\nfinally, when you see a code without repeated numbers, it's 50% the change to be that code, or, that all that code is wrong, ex:1234 could be 1234 or 4123";HUDMSG_FADEOUT,444,CR_GREEN,0.5,0.5,20.0);
  1664.     delay(550);
  1665.     HudMessageBold(s:"part 5 of 5\nsometimes the right code screen doesn't appears, this happen more time when there's more players...\nending this tutorial the code that you see on that sceen could be right or it's he-1 ex: 4 = 4 or 3, 3 = 3 or 2, 2 = 2 or 1, 1 = 1 or 4...\nEND";HUDMSG_FADEOUT,444,CR_GREEN,0.5,0.5,20.0);
  1666. }
  1667.  
  1668. function void secret_select(void){
  1669.     int a;
  1670.     a=random(1,21);
  1671.     if(a==1){       secret[0]=1;secret[1]=2;secret[2]=3;secret[3]=4;
  1672.     }else if(a==2){ secret[0]=2;secret[1]=1;secret[2]=4;secret[3]=3;
  1673.     }else if(a==3){ secret[0]=2;secret[1]=3;secret[2]=1;secret[3]=4;
  1674.     }else if(a==4){ secret[0]=2;secret[1]=3;secret[2]=4;secret[3]=1;
  1675.     }else if(a==5){ secret[0]=1;secret[1]=3;secret[2]=2;secret[3]=4;
  1676.     }else if(a==6){ secret[0]=1;secret[1]=3;secret[2]=4;secret[3]=2;
  1677.     }else if(a==7){ secret[0]=3;secret[1]=1;secret[2]=2;secret[3]=4;
  1678.     }else if(a==8){ secret[0]=1;secret[1]=2;secret[2]=4;secret[3]=3;
  1679.     }else if(a==9){ secret[0]=4;secret[1]=1;secret[2]=2;secret[3]=3;
  1680.     }else if(a==10){secret[0]=1;secret[1]=4;secret[2]=2;secret[3]=3;
  1681.     }else if(a==11){secret[0]=3;secret[1]=4;secret[2]=1;secret[3]=2;
  1682.     }else if(a==12){secret[0]=4;secret[1]=3;secret[2]=2;secret[3]=1;
  1683.     }else if(a==13){secret[0]=1;secret[1]=4;secret[2]=3;secret[3]=2;
  1684.     }else if(a==14){secret[0]=4;secret[1]=2;secret[2]=3;secret[3]=1;
  1685.     }else if(a==15){secret[0]=3;secret[1]=2;secret[2]=4;secret[3]=1;
  1686.     }else if(a==16){secret[0]=3;secret[1]=2;secret[2]=1;secret[3]=4;
  1687.     }else if(a==17){secret[0]=4;secret[1]=3;secret[2]=1;secret[3]=2;
  1688.     }else if(a==18){secret[0]=4;secret[1]=1;secret[2]=3;secret[3]=2;
  1689.     }else if(a==19){secret[0]=2;secret[1]=1;secret[2]=4;secret[3]=3;
  1690.     }else if(a==20){secret[0]=2;secret[1]=4;secret[2]=3;secret[3]=1;
  1691.     }else if(a==21){secret[0]=3;secret[1]=4;secret[2]=2;secret[3]=1;}
  1692. }
  1693.  
  1694.  
  1695. script 62 (void) {//TUTORIAL
  1696.     int menu=0;
  1697.     int i=0;    
  1698.     while(true){
  1699.         i=0;
  1700.         menu_zm09=menu;
  1701.         while(i<5){i++;}
  1702.             SETFONT("SMALLFONT");
  1703.             HudMessagebold(s:"ZM09 TUTORIAL"; HUDMSG_PLAIN, 544, CR_UNTRANSLATED, 0.5, 0.44,0,0, 0);
  1704.             SETFONT("SMALLFONT");
  1705.             HudMessagebold(s:"To exit the TUTORIAL 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, 553, CR_GRAY, 0.5, 0.60+hud_resize(),0,0, 0);
  1706.             zm09_menu_print();
  1707.             if(menu==0){
  1708.                 menu_zm09=1;
  1709.                 menu=1;
  1710.                 zm09_menu_print();
  1711.                 AmbientSound("menu/activate",127);
  1712.             }
  1713.         else if(menu==-1){//
  1714.                 SETFONT("SMALLFONT");
  1715.                 HudMessagebold(s:""; HUDMSG_PLAIN, 544, CR_UNTRANSLATED, 0.5, 0.5,15.1,0, 0);
  1716.                 HudMessagebold(s:""; HUDMSG_PLAIN, 545, CR_UNTRANSLATED, 0.5, 0.48,15.1,0, 0);
  1717.                 HudMessagebold(s:""; HUDMSG_PLAIN, 546, CR_UNTRANSLATED, 0.5, 0.46,15.1,0, 0);
  1718.                 HudMessagebold(s:""; HUDMSG_PLAIN, 547, CR_UNTRANSLATED, 0.44, 0.5,15.1,0, 0);
  1719.                 HudMessagebold(s:""; HUDMSG_PLAIN, 548, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1720.                 HudMessagebold(s:""; HUDMSG_PLAIN, 549, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1721.                 HudMessagebold(s:""; HUDMSG_PLAIN, 550, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1722.                 HudMessagebold(s:""; HUDMSG_PLAIN, 551, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1723.                 HudMessagebold(s:""; HUDMSG_PLAIN, 552, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1724.                 HudMessagebold(s:""; HUDMSG_PLAIN, 553, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
  1725.                 //activatorsound("menu/choose",127);DSSWTCHX
  1726.                 AmbientSound("switches/exitbutn",127);
  1727.                 menu=0;
  1728.                 terminate;
  1729.         }
  1730.         if(menu==1){//TUTORIAL NEDM
  1731.             while(menu==1){
  1732.                 zm09_menu_print_tutorial();
  1733.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1734.                     menu=2;
  1735.                     AmbientSound("menu/cursor",127);
  1736.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
  1737.                     menu=-1;
  1738.                     acs_execute(55,0);
  1739.                 }
  1740.                 delay(1);
  1741.             }
  1742.             delay(5);
  1743.         }
  1744.         else if(menu==2){//TUTORIAL RED KEY
  1745.             while(menu==2){
  1746.                 zm09_menu_print_tutorial();
  1747.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1748.                     menu=3;
  1749.                     AmbientSound("menu/cursor",127);
  1750.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1751.                     menu=1;
  1752.                     AmbientSound("menu/cursor",127);
  1753.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
  1754.                     menu=-1;
  1755.                     acs_execute(56,0);
  1756.                 }delay(1);
  1757.             }delay(5);
  1758.         }else if(menu==3){//WINERY KEY
  1759.             while(menu==3){
  1760.                 zm09_menu_print_tutorial();
  1761.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1762.                     menu=2;
  1763.                     AmbientSound("menu/cursor",127);
  1764.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1765.                     menu=4;
  1766.                     AmbientSound("menu/cursor",127);
  1767.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
  1768.                     menu=-1;
  1769.                     acs_execute(57,0);
  1770.                 }delay(1);
  1771.             }
  1772.             delay(5);///////////////////////////////
  1773.         }else if(menu==4){//DISABLE NEDM
  1774.             while(menu==4){
  1775.                 zm09_menu_print_tutorial();
  1776.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1777.                     menu=3;
  1778.                     AmbientSound("menu/cursor",127);
  1779.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
  1780.                     menu=-1;
  1781.                     acs_execute(58,0);
  1782.                     delay(1);
  1783.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1784.                     AmbientSound("menu/cursor",127);
  1785.                     menu=5;
  1786.                 }delay(1);
  1787.             }
  1788.             delay(5);
  1789.         }else if(menu==5){//UP FPS 1
  1790.             while(menu==5){
  1791.                 zm09_menu_print_tutorial();
  1792.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1793.                     menu=4;
  1794.                     AmbientSound("menu/cursor",127);
  1795.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
  1796.                     menu=-1;
  1797.                     acs_execute(59,0);
  1798.                     delay(1);
  1799.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1800.                     menu=6;
  1801.                     activatorsound("menu/cursor",127);
  1802.                 }
  1803.             delay(5);
  1804.             }
  1805.         }else if(menu==6){//UP FPS 2
  1806.             while(menu==6){
  1807.                 zm09_menu_print_tutorial();
  1808.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1809.                     menu=5;
  1810.                     AmbientSound("menu/cursor",127);
  1811.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
  1812.                     menu=-1;
  1813.                     acs_execute(60,0);
  1814.                     delay(1);
  1815.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1816.                     menu=7;
  1817.                     activatorsound("menu/cursor",127);
  1818.                 }
  1819.             delay(5);
  1820.             }        
  1821.         }else if(menu==7){//MAKE THE RIGHT CODE
  1822.             while(menu==7){
  1823.                 zm09_menu_print_tutorial();
  1824.                 if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
  1825.                     menu=6;
  1826.                     AmbientSound("menu/cursor",127);
  1827.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
  1828.                     menu=-1;
  1829.                     acs_execute(61,0);
  1830.                     delay(1);
  1831.                 }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
  1832.                     menu=7;
  1833.                     //activatorsound("menu/cursor",127);
  1834.                 }
  1835.             delay(5);
  1836.             }        
  1837.         }
  1838.     delay(1);
  1839.     }
  1840. }
  1841. script 63 DEATH{//ZM09 STATISTICS
  1842.     int input;
  1843.     int input2;
  1844.     if(ghoul_target==playernumber()+600){
  1845.         if(ThingCountName ("ravishing",0)==1){
  1846.             input=GetCvar("x_zh_zm09_rk");
  1847.             SetCvar("x_zh_zm09_rk",input+1);
  1848.         }else if(ThingCountName ("imscared2",0)==1){
  1849.             input=GetCvar("x_zh_zm09_wk");
  1850.             SetCvar("x_zh_zm09_wk",input+1);
  1851.         }else if(ThingCountName ("ghouldemon",0)>=1){//pacman
  1852.             input=GetCvar("x_zh_zm09_sk");
  1853.             SetCvar("x_zh_zm09_sk",input+1);
  1854.         }
  1855.     }
  1856. }
  1857. script 64 (int who) DISCONNECT{//REGISTER IS SOMEONE DISCONNECTED
  1858.     int input=GetCvar("x_zh_zm09_di");
  1859.     SetCvar("x_zh_zm09_di",input+1);
  1860. }
  1861.  
  1862. script 65 (void) NET{//Update clientside statistics
  1863.     int a;
  1864.     int b;
  1865.     a=getcvar("x_zh_zm09_zw");
  1866.     b=getcvar("x_zh_zm09_hw");
  1867.     acs_execute(66,0,0,a,b);
  1868.     delay(10);
  1869.     a=getcvar("x_zh_zm09_to");
  1870.     b=getcvar("x_zh_zm09_cn");
  1871.     acs_execute(66,0,1,a,b);
  1872.     delay(10);
  1873.     a=getcvar("x_zh_zm09_di");
  1874.     b=getcvar("x_zh_zm09_wf");
  1875.     acs_execute(66,0,2,a,b);
  1876.     delay(10);
  1877.     a=getcvar("x_zh_zm09_ra");
  1878.     b=getcvar("x_zh_zm09_sf");
  1879.     acs_execute(66,0,3,a,b);
  1880.     delay(10);
  1881.     a=getcvar("x_zh_zm09_wk");
  1882.     b=getcvar("x_zh_zm09_rk");
  1883.     acs_execute(66,0,4,a,b);
  1884.     delay(10);
  1885.     a=getcvar("x_zh_zm09_sk");
  1886.     b=getcvar("x_zh_zm09_0");
  1887.     acs_execute(66,0,5,a,b);
  1888.     delay(10);
  1889.     a=getcvar("x_zh_zm09_25");
  1890.     b=getcvar("x_zh_zm09_50");
  1891.     acs_execute(66,0,6,a,b);
  1892.     delay(10);
  1893.     a=getcvar("x_zh_zm09_100");
  1894.     acs_execute(66,0,7,a,0);
  1895.     delay(10);
  1896. }
  1897.  
  1898. script 66 (int action,int data1,int data2) CLIENTSIDE{//update clientside statistics
  1899.     switch(action){
  1900.     case 0:
  1901.         setcvar("x_zh_zm09_zw",data1);
  1902.         setcvar("x_zh_zm09_hw",data2);
  1903.     break;
  1904.     case 1:
  1905.         setcvar("x_zh_zm09_to",data1);
  1906.         setcvar("x_zh_zm09_cn",data2);
  1907.     break;
  1908.     case 2:
  1909.         setcvar("x_zh_zm09_di",data1);
  1910.         setcvar("x_zh_zm09_wf",data2);
  1911.     break;
  1912.     case 3:
  1913.         setcvar("x_zh_zm09_ra",data1);
  1914.         setcvar("x_zh_zm09_sf",data2);
  1915.     break;
  1916.     case 4:
  1917.         setcvar("x_zh_zm09_wk",data1);
  1918.         setcvar("x_zh_zm09_rk",data2);
  1919.     break;
  1920.     case 5:
  1921.         setcvar("x_zh_zm09_sk",data1);
  1922.         setcvar("x_zh_zm09_0",data2);
  1923.     break;
  1924.     case 6:
  1925.         setcvar("x_zh_zm09_25",data1);
  1926.         setcvar("x_zh_zm09_50",data2);
  1927.     break;
  1928.     case 7:
  1929.         setcvar("x_zh_zm09_100",data1);
  1930.     break;
  1931.    
  1932.  
  1933.     }
  1934. }
  1935.  
  1936. script 67 (void) NET clientside{//show statistics
  1937.     int x_zh_zm09_zw;// zombies wins (ok) script 1
  1938.     int x_zh_zm09_hw;// humans wins (ok) script 1
  1939.     int x_zh_zm09_to;// total of players who played zm09 (ok) script 22
  1940.     int x_zh_zm09_cn;// how many times was zm09 played (ok) script 1
  1941.     int x_zh_zm09_di;// disconnected players on zm09 (OK) script 63
  1942.     int x_zh_zm09_wf;// how many times white face apeared (ok) test_secret function
  1943.     int x_zh_zm09_ra;// how many times ravishing apeared (ok) script 13
  1944.     int x_zh_zm09_sf;// how many times soulsphere apeared (ok) script 22
  1945.     int x_zh_zm09_wk;// how many kills did white face (ok) script 63
  1946.     int x_zh_zm09_rk;// how many kills did ravishing  (ok) script 63
  1947.     int x_zh_zm09_sk;// how many kills did soulsphere (ok) script 63
  1948.     int x_zh_zm09_0;//  0% right code (ok) test_secret function
  1949.     int x_zh_zm09_25;// 25% right code (ok) test secret function
  1950.     int x_zh_zm09_50;// 50% right code (ok) test_secret function
  1951.     int x_zh_zm09_100;// 100% right code (ok) test_secret function
  1952.     while(GetPlayerInput(-1, INPUT_BUTTONS)!=BT_USE){
  1953.         x_zh_zm09_zw=getcvar("x_zh_zm09_zw");
  1954.         x_zh_zm09_hw=getcvar("x_zh_zm09_hw");
  1955.         x_zh_zm09_to=getcvar("x_zh_zm09_to");
  1956.         x_zh_zm09_cn=getcvar("x_zh_zm09_cn");
  1957.         x_zh_zm09_di=getcvar("x_zh_zm09_di");
  1958.         x_zh_zm09_wf=getcvar("x_zh_zm09_wf");
  1959.         x_zh_zm09_ra=getcvar("x_zh_zm09_ra");
  1960.         x_zh_zm09_sf=getcvar("x_zh_zm09_sf");
  1961.         x_zh_zm09_wk=getcvar("x_zh_zm09_wk");
  1962.         x_zh_zm09_rk=getcvar("x_zh_zm09_rk");
  1963.         x_zh_zm09_sk=getcvar("x_zh_zm09_sk");
  1964.         x_zh_zm09_0=getcvar("x_zh_zm09_0");
  1965.         x_zh_zm09_25=getcvar("x_zh_zm09_25");
  1966.         x_zh_zm09_50=getcvar("x_zh_zm09_50");
  1967.         x_zh_zm09_100=getcvar("x_zh_zm09_100");
  1968.         SetFont("BIGFONT");
  1969.         HudMessageBold(s:"ZM09 STATISTICS, puke 65 to update your information"; HUDMSG_FADEOUT, 500, CR_GREEN, 0.5, 0.18, 5.5, 0.5);
  1970.         SetFont("SMALLFONT");
  1971.         HudMessageBold(s:"How many times people played this map:",d:x_zh_zm09_cn; HUDMSG_FADEOUT, 501, CR_RED, 0.3, 0.20, 5.5, 0.5);
  1972.         SetFont("SMALLFONT");
  1973.         HudMessageBold(s:"How many players played this map:",d:x_zh_zm09_to, s:" (",d:x_zh_zm09_to/x_zh_zm09_cn,s:" players per time)"; HUDMSG_FADEOUT, 502, CR_RED, 0.3, 0.22, 5.5, 0.5);
  1974.         SetFont("SMALLFONT");
  1975.         HudMessageBold(s:"How many players disconnected in this map:",d:x_zh_zm09_di,s:" (",d:((x_zh_zm09_di*100)/x_zh_zm09_to),s:"%)"; HUDMSG_FADEOUT, 503, CR_RED, 0.3, 0.24, 5.5, 0.5);
  1976.         SetFont("SMALLFONT");
  1977.         HudMessageBold(s:"How many times white face appeared in this map:",d:x_zh_zm09_wf,s:" (",d:(x_zh_zm09_wf*100)/x_zh_zm09_cn,s:"%)"; HUDMSG_FADEOUT, 504, CR_RED, 0.3, 0.26, 5.5, 0.5);
  1978.         SetFont("SMALLFONT");
  1979.         HudMessageBold(s:"How many times ravishing appeared in this map:",d:x_zh_zm09_ra,s:" (",d:(x_zh_zm09_ra*100)/x_zh_zm09_cn,s:"%)"; HUDMSG_FADEOUT, 505, CR_RED, 0.3, 0.28, 5.5, 0.5);
  1980.         SetFont("SMALLFONT");
  1981.         HudMessageBold(s:"How many times soul sphere appeared in this map:",d:x_zh_zm09_sf,s:" (",d:(x_zh_zm09_sf*100)/x_zh_zm09_cn,s:"%)"; HUDMSG_FADEOUT, 506, CR_RED, 0.3, 0.30, 5.5, 0.5);
  1982.         SetFont("SMALLFONT");
  1983.         HudMessageBold(s:"How many times there was no ghouls in this map:",d:x_zh_zm09_cn-x_zh_zm09_wf-x_zh_zm09_ra-x_zh_zm09_sf,s:" (",d:((x_zh_zm09_cn-(x_zh_zm09_wf+x_zh_zm09_ra+x_zh_zm09_sf))*100)/x_zh_zm09_cn,s:"%)"; HUDMSG_FADEOUT, 514, CR_RED, 0.3, 0.32, 5.5, 0.5);
  1984.         SetFont("SMALLFONT");
  1985.         HudMessageBold(s:"How many kills did white face in this map:",d:x_zh_zm09_wk,s:" (",d:(x_zh_zm09_wk*100)/(x_zh_zm09_wk+x_zh_zm09_rk+x_zh_zm09_sk),s:"%)"; HUDMSG_FADEOUT, 507, CR_RED, 0.3, 0.34, 5.5, 0.5);
  1986.         SetFont("SMALLFONT");
  1987.         HudMessageBold(s:"How many kills did Ravishing in this map:",d:x_zh_zm09_rk,s:" (",d:(x_zh_zm09_rk*100)/(x_zh_zm09_wk+x_zh_zm09_rk+x_zh_zm09_sk),s:"%)"; HUDMSG_FADEOUT, 508, CR_RED, 0.3, 0.36, 5.5, 0.5);
  1988.         SetFont("SMALLFONT");
  1989.         HudMessageBold(s:"How many kills did Soul Sphere in this map:",d:x_zh_zm09_sk,s:" (",d:(x_zh_zm09_sk*100)/(x_zh_zm09_wk+x_zh_zm09_rk+x_zh_zm09_sk),s:"%)"; HUDMSG_FADEOUT, 509, CR_RED, 0.3, 0.38, 5.5, 0.5);
  1990.         SetFont("SMALLFONT");
  1991.         HudMessageBold(s:"How many times the code typed was 0% correct:",d:x_zh_zm09_0,s:" (",d:(x_zh_zm09_0*100)/(x_zh_zm09_0+x_zh_zm09_25+x_zh_zm09_50+x_zh_zm09_100),s:"%)"; HUDMSG_FADEOUT, 510, CR_RED, 0.3, 0.40, 5.5, 0.5);
  1992.         SetFont("SMALLFONT");
  1993.         HudMessageBold(s:"How many times the code typed was 25% correct:",d:x_zh_zm09_25,s:" (",d:(x_zh_zm09_25*100)/(x_zh_zm09_0+x_zh_zm09_25+x_zh_zm09_50+x_zh_zm09_100),s:"%)"; HUDMSG_FADEOUT, 511, CR_RED, 0.3, 0.42, 5.5, 0.5);
  1994.         SetFont("SMALLFONT");
  1995.         HudMessageBold(s:"How many times the code typed was 50% correct:",d:x_zh_zm09_50,s:" (",d:(x_zh_zm09_50*100)/(x_zh_zm09_0+x_zh_zm09_25+x_zh_zm09_50+x_zh_zm09_100),s:"%)"; HUDMSG_FADEOUT, 512, CR_RED, 0.3, 0.44, 5.5, 0.5);
  1996.         SetFont("SMALLFONT");
  1997.         HudMessageBold(s:"How many times the code typed was 100% correct:",d:x_zh_zm09_100,s:" (",d:(x_zh_zm09_100*100)/(x_zh_zm09_0+x_zh_zm09_25+x_zh_zm09_50+x_zh_zm09_100),s:"%)"; HUDMSG_FADEOUT, 513, CR_RED, 0.3, 0.46, 5.5, 0.5);
  1998.         SetFont("SMALLFONT");
  1999.         HudMessageBold(s:"How many times the code  was used:",d:x_zh_zm09_100+x_zh_zm09_50+x_zh_zm09_25+x_zh_zm09_0,s:" (",d:(x_zh_zm09_100+x_zh_zm09_50+x_zh_zm09_25+x_zh_zm09_0*100)/(x_zh_zm09_cn),s:"%)"; HUDMSG_FADEOUT, 515, CR_RED, 0.3, 0.48, 5.5, 0.5);
  2000.  
  2001.         delay(1);
  2002.     }
  2003.         SetFont("BIGFONT");
  2004.         HudMessageBold(s:""; HUDMSG_FADEOUT, 500, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
  2005.         SetFont("SMALLFONT");
  2006.         HudMessageBold(s:""; HUDMSG_FADEOUT, 501, CR_RED, 0.3, 0.22, 5.5, 0.5);
  2007.         SetFont("SMALLFONT");
  2008.         HudMessageBold(s:""; HUDMSG_FADEOUT, 502, CR_RED, 0.3, 0.22, 5.5, 0.5);
  2009.         SetFont("SMALLFONT");
  2010.         HudMessageBold(s:""; HUDMSG_FADEOUT, 503, CR_RED, 0.3, 0.24, 5.5, 0.5);
  2011.         SetFont("SMALLFONT");
  2012.         HudMessageBold(s:""; HUDMSG_FADEOUT, 504, CR_RED, 0.3, 0.26, 5.5, 0.5);
  2013.         SetFont("SMALLFONT");
  2014.         HudMessageBold(s:""; HUDMSG_FADEOUT, 505, CR_RED, 0.3, 0.28, 5.5, 0.5);
  2015.         SetFont("SMALLFONT");
  2016.         HudMessageBold(s:""; HUDMSG_FADEOUT, 506, CR_RED, 0.3, 0.30, 5.5, 0.5);
  2017.         SetFont("SMALLFONT");
  2018.         HudMessageBold(s:""; HUDMSG_FADEOUT, 507, CR_RED, 0.3, 0.32, 5.5, 0.5);
  2019.         SetFont("SMALLFONT");
  2020.         HudMessageBold(s:""; HUDMSG_FADEOUT, 508, CR_RED, 0.3, 0.34, 5.5, 0.5);
  2021.         SetFont("SMALLFONT");
  2022.         HudMessageBold(s:""; HUDMSG_FADEOUT, 509, CR_RED, 0.3, 0.36, 5.5, 0.5);
  2023.         SetFont("SMALLFONT");
  2024.         HudMessageBold(s:""; HUDMSG_FADEOUT, 510, CR_RED, 0.3, 0.38, 5.5, 0.5);
  2025.         SetFont("SMALLFONT");
  2026.         HudMessageBold(s:""; HUDMSG_FADEOUT, 511, CR_RED, 0.3, 0.40, 5.5, 0.5);
  2027.         SetFont("SMALLFONT");
  2028.         HudMessageBold(s:""; HUDMSG_FADEOUT, 512, CR_RED, 0.3, 0.42, 5.5, 0.5);
  2029.         SetFont("SMALLFONT");
  2030.         HudMessageBold(s:""; HUDMSG_FADEOUT, 513, CR_RED, 0.3, 0.44, 5.5, 0.5);
  2031.         SetFont("SMALLFONT");
  2032.         HudMessageBold(s:""; HUDMSG_FADEOUT, 514, CR_RED, 0.3, 0.44, 5.5, 0.5);
  2033.         SetFont("SMALLFONT");
  2034.         HudMessageBold(s:""; HUDMSG_FADEOUT, 515, CR_RED, 0.3, 0.44, 5.5, 0.5);
  2035.  
  2036. }
  2037.  
  2038.  
  2039.  
  2040. function void test_secret(int switchh){
  2041.     selected++;
  2042.     secret[selected+3]=switchh;
  2043.     if(secret[selected+3]==secret[selected-1]) secret[9]++;
  2044.     else secret[8]++;
  2045.     if(secret[9]==2 && selected==4){
  2046.         selected=GetCvar("x_zh_zm09_50");
  2047.         SetCvar("x_zh_zm09_50",selected+1);
  2048.         selected=random(0,5);
  2049.         print_code();
  2050.         if(selected>3){//50% right code
  2051.             SetFont("BIGFONT");
  2052.             HudMessageBold(s:"a door has been unlocked"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
  2053.             AmbientSound("REVEAL",127);
  2054.             door_open(62,24);
  2055.         }else{//50% right code + ravishing
  2056.             SetFont("BIGFONT");
  2057.             HudMessageBold(s:"a door has been opened"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
  2058.             AmbientSound("REVEAL",127);
  2059.             door_open(11,24);
  2060.             ravishing_selector(100);
  2061.         }AmbientSound("REVEAL",127);
  2062.     }if(secret[9]==4){   // 100% right code
  2063.             selected=GetCvar("x_zh_zm09_100");
  2064.             SetCvar("x_zh_zm09_100",selected+1);
  2065.             print_code();
  2066.             selected=random(0,100);
  2067.             if(selected<50){
  2068.                 SetFont("BIGFONT");
  2069.                 AmbientSound("achievement/unlocked",127);
  2070.                 HudMessageBold(s:"a  wall has been opened"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
  2071.                 AmbientSound("REVEAL",127);
  2072.                 door_open(5,18);
  2073.             }else if(selected<70){
  2074.                 SetFont("BIGFONT");
  2075.                 AmbientSound("achievement/unlocked",127);
  2076.                 AmbientSound("REVEAL",127);
  2077.                 HudMessageBold(s:"everyone won a item!!!"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
  2078.                 AmbientSound("REVEAL",127);
  2079.                 Acs_executeAlways(999,0,0,0,0);
  2080.                 Acs_executeAlways(999,0,0,0,0);
  2081.             }else{
  2082.                 SetFont("BIGFONT");
  2083.                 HudMessageBold(n:0,s:" Opened all the secret passages!!!"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
  2084.                 AmbientSound("REVEAL",127);
  2085.                 AmbientSound("achievement/unlocked",127);
  2086.                 door_open(11,24);
  2087.                 door_open(62,24);
  2088.                 door_open(5,18);
  2089.             }
  2090.     }if(secret[8]==4){// 0% right code
  2091.         selected=GetCvar("x_zh_zm09_0");
  2092.         SetCvar("x_zh_zm09_0",selected+1);
  2093.         selected=random(0,10);
  2094.         if(selected>=7){//White Face script
  2095.             acs_execute(35,0,0,0,0);
  2096.             acs_execute(4,0,0,0,0);
  2097.             SpawnSpot ("IMSCARED2",25,100,24);
  2098.             HudMessageBold(s:"Thanks ", n:0, s:" Now I'm free again!!!"; HUDMSG_FADEOUT, 919, CR_GREEN, 0.5, 0.6, 5.5, 0.5);
  2099.             selected=GetCvar("x_zh_zm09_wf");
  2100.             SetCvar("x_zh_zm09_wf",selected+1);
  2101.         }else ACS_Execute(6,0,0,0,0);
  2102.         print_code();
  2103.     }
  2104.     else if(secret[8]==3 && secret[9]==1){//25% right code
  2105.         selected=GetCvar("x_zh_zm09_25");
  2106.         SetCvar("x_zh_zm09_25",selected+1);
  2107.         print_code();
  2108.         ravishing_selector(35);
  2109.         Acs_ExecuteAlways(164, 0, PlayerNumber(), 0, 0);
  2110.     }
  2111. }
  2112.  
  2113. function void red_keyspawn(void){
  2114.     switch(random(0,10)){
  2115.     case 0:spawn("mapspot",random(-721.0,-409.0),random(1873.0,2711.0),632.0,350,0); TeleportOther(36,350,1);break;
  2116.     case 1:spawn("mapspot",random(4528.0,5135.0),random(-1664.0,-1361.0),400.0,350,0); TeleportOther(36,350,1);break;
  2117.     case 2:spawn("mapspot",random(5623.0,5807.0),random(-783.0,-497.0),472.0,350,0); TeleportOther(36,350,1);break;
  2118.     case 3:spawn("mapspot",random(2080.0,4079.0),random(2448.0,3823.0),463.0,350,0); TeleportOther(36,350,1);break;
  2119.     case 4:spawn("mapspot",random(-3088.0,-2553.0),random(-1776.0,-1281.0),112.0,350,0); TeleportOther(36,350,1);break;
  2120.     case 5:spawn("mapspot",random(1114.0,1775.0),random(392.0,825.0),318.0,350,0); TeleportOther(36,350,1);break;
  2121.     case 6:spawn("mapspot",random(-1856.0,-1169.0),random(2125.0,2351.0),327.0,350,0); TeleportOther(36,350,1);break;
  2122.     case 7:spawn("mapspot",random(4416.0,4471.0),random(-2004.0,-1961.0),400.0,350,0); TeleportOther(36,350,1);break;
  2123.     case 8:spawn("mapspot",random(-2512.0,879.0),random(-1716.0,-449.0),362.0,350,0); TeleportOther(36,350,1);break;
  2124.     case 9:spawn("mapspot",random(4550.0,4719.0),random(-1246.0,-1169.0),465.0,350,0); TeleportOther(36,350,1);break;
  2125.     case 10:spawn("mapspot",random(-1808.0,-1585.0),random(-2320.0,-2052.0),72.0,350,0); TeleportOther(36,350,1);break;
  2126.     }
  2127. }
  2128.  
  2129. function void ravishing_selector(int lucky){
  2130.     int test=random(0,lucky);
  2131.     if(test<=15)  acs_execute(13,0,0,0);
  2132. }
  2133.  
  2134. function void winery_key_spawn(void){
  2135.     int test=random(1,7);
  2136.     if(test<=4){
  2137.         switch(test){
  2138.             case 1:
  2139.                 TeleportOther(70,71,0);
  2140.                 break;
  2141.             case 2:
  2142.                 TeleportOther(70,72,0);
  2143.                 break;
  2144.             case 3:
  2145.                 TeleportOther(70,73,0);
  2146.                 break;
  2147.             case 4:
  2148.                 TeleportOther(70,74,0);
  2149.                 break;
  2150.         }
  2151.     }
  2152. }
  2153.  
  2154. function void print_code(void){
  2155.     HudMessageBold(n:0, s:" activated the code"; HUDMSG_FADEOUT, 997, CR_RED, 0.5, 0.5, 9.5, 0.5);
  2156.     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);
  2157.     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);
  2158.     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);
  2159. }
  2160.  
  2161. function int GetPlayerRender(void) {return GetCVar ("vid_renderer");}
  2162.  
  2163.  
  2164.  
  2165. function void Local_SetLastMusic(void){
  2166.     localsetmusic(Local_musicstore[Music_Played]);
  2167. }
  2168.  
  2169. function void secret_select_help(void)
  2170. {
  2171.     int i=random(0,100);
  2172.     int x=random(0,100);
  2173.     int secret_help1=secret[0];
  2174.     int secret_help2=secret[1];
  2175.     int secret_help3=secret[2];
  2176.     int secret_help4=secret[3];
  2177.     if(i>50) secret_help1+=1;
  2178.     i=random(0,100);
  2179.     if(i<50) secret_help2+=1;
  2180.     i=random(0,100);
  2181.     if(i>50) secret_help3+=1;
  2182.     i=random(0,100);
  2183.     if(i<50) secret_help4+=1;
  2184.     if(secret_help1==secret[0] && secret_help2==secret[1] && secret_help3==secret[2]  && secret_help3==secret[3]){
  2185.         if(random(0,100)>50){
  2186.             secret_help1+=1;
  2187.             secret_help2+=1;
  2188.             secret_help3+=1;
  2189.             secret_help4+=1;}
  2190.     }
  2191.     if(zombieCounter()+HumanCounter()<5){
  2192.         x=random(0,100);
  2193.         if(x>10)   print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
  2194.     }else if(zombieCounter()+HumanCounter()<10){
  2195.         x=random(0,100);
  2196.         if(x>25) print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
  2197.     }else if(zombieCounter()+HumanCounter()<15){
  2198.         x=random(0,100);
  2199.         if(x>30)  print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
  2200.     }else if(zombieCounter()+HumanCounter()<20){
  2201.         x=random(0,100);
  2202.         if(x>45)  print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
  2203.     }else if(zombieCounter()+HumanCounter()<25){
  2204.         x=random(0,100);
  2205.         if(x>50) print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
  2206.     }else if(zombieCounter()+HumanCounter()<30){
  2207.         x=random(0,100);
  2208.         if(x>60)  print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
  2209.     }
  2210. }
  2211. function void print_secret_select_help(int secret_help1, int secret_help2,int secret_help3,int secret_help4){
  2212.     SetLineTexture(134,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[secret_help1-1]);
  2213.     SetLineTexture(135,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[secret_help2-1]);
  2214.     SetLineTexture(136,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[secret_help3-1]);
  2215.     SetLineTexture(137,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[secret_help4-1]);
  2216. }
  2217.  
  2218.  
  2219. function int unusedTID(int start, int end)//THIS PART WAS CREATED BY Ijon Tichy
  2220. {
  2221.     int ret = start - 1;
  2222.     int tidNum;
  2223.     if (start > end) { start ^= end; end ^= start; start ^= end; }
  2224.     while (ret++ != end){  
  2225.         if (ThingCount(0, ret) == 0)  return ret;
  2226.     }  
  2227.     return -1;
  2228. }
  2229.  
  2230. function int GetHigherCeiling(int tid2) {//THIS PART WAS CREATED BY Ijon Tichy and edited  by IBM5155
  2231.    int posx=getactorx(tid2);
  2232.     int posy=getactory(tid2);
  2233.     int posz=GetActorCeilingZ(tid2);//504
  2234.     int z=posz+25.0;
  2235.     int test=0;
  2236.     int tid=unusedTID(1000, 2000);
  2237.     spawn("mapspot",posx,posy,z,tid,0);
  2238.     while(GetActorCeilingZ(tid)!=0){
  2239.         z=z+25.0;//850.0
  2240.         thing_remove(tid);
  2241.         spawn("mapspot",posx,posy,z,tid,0);
  2242.         test++;
  2243.     }if(test==0){
  2244.         thing_remove(tid);
  2245.         z=posz;
  2246.     }else{
  2247.         thing_remove(tid);
  2248.         spawn("mapspot",posx,posy,z-27.0,tid,0);
  2249.         z=GetActorCeilingZ(tid);
  2250.         thing_remove(tid);
  2251.     }return z;
  2252. }
  2253.  
  2254. function int secret_in(int position){
  2255.     return secret[position];
  2256. }
  2257.  
  2258. function int sqrt2 (int x){
  2259.     int r;
  2260.     x = x + 1 >> 1;
  2261.     while (x > r)
  2262.         x -= r++;
  2263.     return r;
  2264. }
  2265.  
  2266. function int ibm_distance (int tid1, int tid2){
  2267.     int x, y, z, d;
  2268.     x = (GetActorX(tid1) - GetActorX(tid2))/65536;
  2269.     y = (GetActorY(tid1) - GetActorY(tid2))/65536;
  2270.     z = (GetActorZ(tid1) - GetActorZ(tid2))/65536;
  2271.     d = sqrt2( x*x + y*y + z*z );
  2272.     return d;
  2273. }
  2274. function void zm09_menu_print(void){
  2275.     SETFONT("SMALLFONT");
  2276.  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);
  2277.     SETFONT("SMALLFONT");
  2278.  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);
  2279.     SETFONT("SMALLFONT");
  2280.  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);
  2281.     SETFONT("SMALLFONT");
  2282.  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);
  2283.     SETFONT("SMALLFONT");
  2284.  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);
  2285.     SETFONT("SMALLFONT");
  2286.  HudMessagebold(s:zm09_menu_print_color(6),s:"Music Quality:",s:zm09_strsettings[(music_quality+1)*2-1],s:" need addon for high"; HUDMSG_PLAIN, 550, CR_UNTRANSLATED, 0.5, 0.56+hud_resize()*5,0,0, 0);
  2287. }
  2288.  
  2289. function void zm09_menu_print_tutorial(void){
  2290.     SETFONT("SMALLFONT");
  2291.  HudMessagebold(s:zm09_menu_print_color(1),s:"TUTORIAL: HOW TO ACTIVATE NEDM:"; HUDMSG_PLAIN, 545, CR_UNTRANSLATED, 0.5, 0.46+hud_resize(),0,0, 0);
  2292.     SETFONT("SMALLFONT");
  2293.  HudMessagebold(s:zm09_menu_print_color(2),s:"TUTORIAL: HOW TO FIND THE RED KEY CARD"; HUDMSG_PLAIN, 546, CR_UNTRANSLATED, 0.5, 0.48+hud_resize()*2,0,0, 0);
  2294.     SETFONT("SMALLFONT");
  2295.  HudMessagebold(s:zm09_menu_print_color(3),s:"TUTORIAL: HOW TO FIND THE WINERY KEY"; HUDMSG_PLAIN, 547, CR_UNTRANSLATED, 0.5, 0.5+hud_resize()*3,0,0, 0);
  2296.     SETFONT("SMALLFONT");
  2297.  HudMessagebold(s:zm09_menu_print_color(4),s:"TUTORIAL: HOW TO DISABLE NEDM"; HUDMSG_PLAIN, 548, CR_UNTRANSLATED, 0.5, 0.52+hud_resize()*4,0,0, 0);
  2298.     SETFONT("SMALLFONT");
  2299.  HudMessagebold(s:zm09_menu_print_color(5),s:"TUTORIAL: HOW TO INCREASE THE FPS 1"; HUDMSG_PLAIN, 549, CR_UNTRANSLATED, 0.5, 0.54+hud_resize()*5,0,0, 0);
  2300.     SETFONT("SMALLFONT");
  2301.  HudMessagebold(s:zm09_menu_print_color(6),s:"TUTORIAL: HOW TO INCREASE THE FPS 1"; HUDMSG_PLAIN, 550, CR_UNTRANSLATED, 0.5, 0.56+hud_resize()*5,0,0, 0);
  2302.     SETFONT("SMALLFONT");
  2303.  HudMessagebold(s:zm09_menu_print_color(7),s:"TUTORIAL: HOW TO MAKE THE RIGHT CODE"; HUDMSG_PLAIN, 551, CR_UNTRANSLATED, 0.5, 0.58+hud_resize()*5,0,0, 0);
  2304. }
  2305.  
  2306. function int zm09_menu_print_color(int menu_hor){
  2307.     if(menu_zm09==menu_hor)
  2308.         return("\cf");
  2309.     return("\cg");
  2310.  
  2311. }
  2312.  
  2313. function void zm09_update_settings(void){
  2314. int i=0;
  2315. int j=0;
  2316. int input=GetCvar("x_zh_zm09");
  2317.     if(input!=0){//input=22260
  2318.         i=input/10;//2226
  2319.         i=i*10;//22260
  2320.         i=input-i;//0
  2321.         switch(i){
  2322.             case 2: nedm_desactive=false; reflection_actived=false; break;
  2323.             case 3: nedm_desactive=true;  reflection_actived=false;break;
  2324.             case 4: nedm_desactive=false; reflection_actived=true; break;
  2325.             default: nedm_desactive=true;  reflection_actived=true; break;
  2326.         }
  2327.         //22260
  2328.         i=input/100;//222
  2329.         i=i*10;//2220
  2330.         j=input/10;//2226
  2331.         i=j-i;//2226-2220=6
  2332.         if(i<1 || i>6) weather_quality=0;
  2333.         else weather_quality=i-2;
  2334.         //22260
  2335.         i=input/1000;//22
  2336.         i=i*10;//220
  2337.         j=input/100;//222
  2338.         i=j-i;//222-220=2
  2339.         if(i<2 || i>3) rain_sound=0;
  2340.         else rain_sound=i-2;
  2341.         //22260
  2342.         i=input/10000;//2
  2343.         i=i*10;//20
  2344.         j=input/1000;//22
  2345.         i=j-i;//22-20=2
  2346.         if(i<2 || i>5) rain_detail=0;
  2347.         else rain_detail=i-2;
  2348.         i=input/10000;//2
  2349.         if(i==1)music_quality=false;
  2350.         else music_quality=true;
  2351.     }
  2352.     if(reflection_actived==true){
  2353.         Sector_SetPlaneReflection (153, 44, 0);
  2354.         Sector_SetPlaneReflection (149, 66, 0);
  2355.         Sector_SetPlaneReflection (3, 44, 0);
  2356.     }
  2357.     play_zm09_music();
  2358. }
  2359.  
  2360. function int hud_resize(void){
  2361.     int x=get_screenx();
  2362.     int y=get_screeny();
  2363.     int output=0;
  2364.     if(x<=320) output=0.02;
  2365.     else if(x<=640) output=0.01;
  2366.     else output=0;
  2367.     return output;
  2368.  
  2369. }
  2370. function int get_screeny(void){
  2371.     return getcvar("vid_defheight");
  2372. }
  2373.  
  2374. function int get_screenx(void){
  2375.     return getcvar("vid_defwidth");
  2376. }
  2377. function void play_zm09_music(void){
  2378.     if(!music_quality){
  2379.         setmusic(Local_musicstore[Music_Played]);
  2380.     }else{
  2381.         setmusic(Local_musicstoreHQ[Music_Played]);}
  2382. }
Advertisement
Add Comment
Please, Sign In to add comment