Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ZM09 SCRIPTS SOURCE CODE V1.0
- THE BIGGEST MAP SCRIPTS EVER SAW ON ZOMBIE HORDE MAPS :D
- HAVE FUN EATING WORDS :)
- */
- #include "zcommon.acs"
- #import "ZMGAME.acs"
- #import "FUNCTION.ACS"
- #import "MODCVARS.acs"
- #define PLAYER_TID 600
- #define SPAWN_LAVA 0
- #define SPAWN_LAVA_SOUND 1
- #define OPENGL_PLAYER 1
- #define SOFTWARE_PLA YER 0
- #define THEME_MUSIC 0
- #define RAVISHING_MUSIC 1
- #define LAST_HUMAN_MUSIC 2
- #define NEDM_MUSIC 3
- #define SOULSPHERE_MUSIC 4
- #define IMSCARED_MUSIC 5
- #define RAVISHING 1
- #define WHITE_FACE 2
- #define SOUL_SPHERE 3
- #define active true
- int secret[10],selected;
- int debug_zm09;
- int tele_x,tele_y,tele_z,tele_active=0;
- int user_ghoulactivesound=0;
- int user_ghoulinvisible=0;
- int user_ghoulinvisiblecount=0;
- int user_invisible=0;
- int out_invisible=0;
- int sound_toplay=0;
- int timer_GHOUL=0;
- int script_test=0;
- int ghoul_invtest=0;
- int stuck_test=0;
- int dev=0;
- int ghoul_hate=0;
- int Music_Played=0;
- int weather=0;
- int generator1=1,generator2;
- int weather_quality=0;
- bool rain_sound=true;
- int rain_detail=0;
- int soulsphere_damage=2.0;
- bool rainfall_actived=false;
- int nedm_code=0;
- int reflection_actived=true;
- int total_players=0;
- int menu_zm09;
- int ghoul_target;
- int ghoul_target_distance=0;
- int used_tids[11]={49,50,51,52,59,62,63,66,114,116,122};
- int Local_musicstore[6]={"IBMSND3","IBMSND2","IBMSND6","NEDM","IBMSND7","SUICIDE"};
- int zm09_strsettings[8]={"ULTRA LOW","LOW","MEDIUM","HIGH","ULTRA","EXTREME","ON","OFF"};
- bool debug_locker=0;
- script 1 open{//MAIN SCRIPT
- int getout=FALSE;
- int i=0;
- nedm_code=random(0,3);
- while(i<=10){
- thing_remove(used_tids[i]);i++;
- }Thing_Deactivate(44);
- thing_deactivate(144);
- secret_select();
- secret_select_help();
- red_keyspawn();
- winery_key_spawn();
- acs_execute(42,0,0,0,0);
- while(getout==FALSE){
- if(HumanCounter()==1 && zombieCounter()>=1){
- getout=TRUE;
- Music_Played=LAST_HUMAN_MUSIC;
- SetMusic("ibmsnd6");
- }delay(35);
- }
- }
- script 2 (int x){//Red door Switches
- test_secret(x);
- }
- script 3 OPEN clientside
- {//spark enable/disable
- if(generator1==true || generator2==true)
- {
- Thing_Activate (154);
- if(generator2==false)
- Thing_Activate (155);
- }
- delay(70);
- restart;
- }
- script 4 (int who, int code){// White Face/Ravishing AI core
- int safe_tid=ActivatorTID();
- int wface_hatee=0;//Code 1414325 was removed, it would release whiteface and call script 35
- int i=0,j=0;
- int shorter_distance;
- int farest_distance=0;
- while(humancounter()>=1){
- i=0;
- wface_hatee=0;
- farest_distance=0;
- shorter_distance=2147483647;
- while(i<32){
- if(thingcount(t_none,i+600)==1){
- if(CheckActorInventory(i+600,"zombiemaker")==0){
- if(i+600!=safe_tid || humancounter()==1){
- j=ibm_distance (100,i+600);
- if(who==1){ //RAVISHING
- if(j<shorter_distance){
- shorter_distance=j;
- wface_hatee=i+600;
- }
- }else{//WHITE FACE
- if(j>farest_distance){
- farest_distance=j;
- wface_hatee=i+600;
- }
- }
- }
- }
- }
- i++;
- delay(1);
- }
- ghoul_target=wface_hatee;
- if(shorter_distance==2147483647)ghoul_target_distance=wface_hatee;
- else ghoul_target_distance=shorter_distance;
- Thing_Hate(100,wface_hatee,6);
- while(thingcount(T_NONE,wface_hatee)==1){
- if(CheckActorInventory(wface_hatee,"zombiemaker")==1) break;
- if(dev==0 && who==1){acs_execute(12,0,0,0,0); acs_execute (11,0,0,0,0);}
- dev=0;
- delay(35);
- }
- delay(1);
- }
- }
- SCRIPT 5 (void){
- spawn("ShortGreenColumn",-2677.0, -3169.0, 211.0,0,0);
- }
- int lava_del_tids[8]={44,49,50,51,52,53,72,86};
- script 6 (void){//Lava Script
- int time_delay=0;
- tele_active=1;
- time_delay=random(0,30);
- if(time_delay>0) delay(35*time_delay);
- Thing_ChangeTID(500, 66);
- acs_execute(15,0,SPAWN_LAVA,0,0);//text effect
- ThingSound(15,"IBMSND1",255);
- Radius_Quake(random(5,9), 12*35, 0, 16, 15);
- delay(255);
- Ceiling_LowerAndCrush(4,7,6553);
- Ceiling_LowerAndCrush(10,7,65536);
- Ceiling_LowerAndCrush(94,4,65536);
- Ceiling_LowerAndCrush(14,7,65536);
- Ceiling_LowerAndCrush(18,7,65536);
- Ceiling_LowerAndCrush(124,7,65536);
- delay(350);
- ceiling_raisebyvalue(9,10,335);
- ceiling_raisebyvalue(48,10,464);
- acs_execute(15,0,SPAWN_LAVA_SOUND,0,0);//text effect
- delay(350);
- door_close(4,7); door_close(10,7); door_close(94,4); door_close(14,7); door_close(18,7); door_close(124,7);
- acs_execute(17,0,0,0,0);
- time_delay=0;while(time_delay<8){
- thing_remove(lava_del_tids[time_delay]);time_delay++;
- }generator2=0;
- acs_execute(34,0,generator1*10+generator2,0,0);
- Light_ChangeToValue(80,80);
- Light_changetovalue(81,80);
- Thing_ChangeTID(66, 500);
- Sector_SetDamage(7,MOD_LAVA,MOD_LAVA);
- delay(random(350,3500));
- acs_execute(13,0,0,0,0);
- }
- script 7 (void){//50% Right code door open on cave
- floor_lowerbyvalue(29,25,320);
- floor_lowerbyvalue(26,25,256);
- floor_lowerbyvalue(24,25,192);
- floor_LOWERbyvalue(17,25,128);
- floor_lowerbyvalue(16,25,64);
- }
- int ravishing_script;
- script 8 (void){//Ravishing Script : Attack
- ravishing_script=8;
- dev=8;
- stuck_test=0;
- ghoul_invtest=0;
- user_ghoulactivesound=0;
- timer_GHOUL=0;
- user_invisible=0;
- user_ghoulinvisible=0;
- timer_GHOUL=0;
- user_ghoulinvisible=0;
- if(out_invisible==0) out_invisible=50;
- SetActorProperty(100,APROP_Speed,16.0);
- }
- script 9 (int x){//Ravishing Script : Check monster require change status
- ravishing_script=9;
- ghoul_hate=x;
- dev=9;
- script_test=1;
- if(user_invisible==true && user_ghoulinvisible==false && ghoul_invtest==false)
- {
- user_ghoulinvisible=true;
- ghoul_invtest=true;
- SetActorProperty(100,APROP_Speed,26.0);
- }
- else if(user_invisible==0 && user_ghoulinvisible==0 && ghoul_invtest==1)
- {
- user_ghoulinvisible=2;
- ghoul_invtest=false;
- SetActorProperty(100,APROP_Speed,16.0);
- }
- setresultvalue(user_ghoulinvisible);
- delay(1);
- user_ghoulinvisible=false;
- }
- script 10 (VOID){//Ravishing Script: Dormaint script
- ravishing_script=10;
- dev=10;
- stuck_test=0;
- user_ghoulactivesound=0;
- ghoul_invtest=0;
- timer_GHOUL=0;
- user_invisible=0;
- timer_GHOUL=0;
- user_ghoulinvisible=0;
- SetActorProperty(100,APROP_Speed,16.0);
- }
- script 11 (void){//Ravishing Script: main code
- ravishing_script=11;
- int pos_x=0,pos_y=0,pos_z=0;
- while(true){
- dev=true;
- if(pos_x==getactorx(100) && pos_y==getactory(100) && pos_z==getactorz(100)){
- stuck_test++;
- }else{
- stuck_test=0;
- pos_x=getactorx(100);
- pos_y=getactory(100);
- pos_z=getactorz(100);
- }if(stuck_test==50){
- user_invisible=1;
- user_ghoulinvisible=0;
- ghoul_invtest=0;
- timer_GHOUL=0;
- }if(out_invisible>0){
- SetActorProperty(100,APROP_Speed,16.0);
- }if(timer_GHOUL>=16 && user_invisible==true){
- user_invisible=false;
- timer_GHOUL=0;
- SetActorProperty(100,APROP_Speed,16.0);
- }else if(timer_GHOUL>=7 && user_invisible==false){
- timer_GHOUL=0;
- user_invisible=true;
- }if(user_invisible==true)
- {
- sound_toplay=1;
- }else sound_toplay=0;
- if(out_invisible>0) out_invisible--;
- script_test=0;
- delay(1);
- }
- }
- script 12 (void){//Ravishing Script: Sound Effects
- while(true){
- ravishing_script=12;
- if(sound_toplay==0){
- while(user_ghoulactivesound<4 && user_invisible==0){
- user_ghoulactivesound++;
- delay(35);
- }
- timer_GHOUL++;
- user_ghoulactivesound=false;
- if(user_invisible==true) ThingSound(100,"EFF5",127);
- else if(user_ghoulinvisible==false) ThingSound(100,"EFF10",127);
- }
- else{
- while(user_ghoulactivesound<2 && user_invisible==true){
- user_ghoulactivesound++;
- delay(35);
- }
- timer_GHOUL++;
- user_ghoulactivesound=0;
- if(user_invisible==true) ThingSound(100,"EFF5",127);
- else if(user_ghoulinvisible==false) ThingSound(100,"EFF10",127);
- }
- delay(1);
- }
- }
- script 13 (void){//Ravishing Script: Summon ravishing and other resources
- ravishing_script=13;
- delay(random(350,700));
- SetFont("BIGFONT");
- ThingSound(77,"IBMEFF3",127);
- generator1=0;
- acs_execute(34,0,generator1*10+generator2,0,0);
- Thing_remove(96);
- HudMessageBold(s:"\nPRIMARY GENERATOR IS NOW DESTROYED"; HUDMSG_FADEOUT, 980, CR_RED, 0.5, 0.2, 9.8, 0.5);
- delay(50);
- ThingSound(97,"IBMEFF3",127);
- delay(50);
- ThingSound(97,"IBMEFF2",127);
- Music_Played=RAVISHING_MUSIC;
- SetMusic("ibmsnd2");
- SpawnSpot ("ravishing",25,100,24);
- acs_execute(4,0,1,0,0);
- delay(35);
- acs_execute(11,0,0,0,0);
- ACS_EXECUTE(12,0,0,0,0);//RAVISHING SOUND CODE
- while(Game_info_round_timer==0) delay(1);
- while(true){
- if(Game_info_round_timer==0 || zombieCounter()==0 || HumanCounter()==0) Thing_Deactivate(100);
- delay(1);
- }
- }
- int teste=0;
- Script 14 (void) clientside{//Generic Locked Door Mensage/Sound
- if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
- Print(s:"That door is locked.");
- ActivatorSound("DRLOCKED", 127);
- delay(15);
- }
- script 15 (int action) clientside{//Lava Script: Mensage/sound Effect
- if(action==SPAWN_LAVA){
- int i=0;
- while(i<17){
- SetFont("BIGFONT");
- 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);
- i++;
- delay(35);
- }
- delay(random(400,800));
- delay(200);
- }else{
- while(true){//Replace with ambientsound
- ThingSound(15,"ibmlava1",255);
- delay(67);
- } } }
- script 16 (void){//Teleport script, avoid telefrag
- if(ThingCountSector(T_NONE,0,28)==2) teleport(38,0,0);
- }
- script 17 (void){//Unlock Teleport Door
- if(tele_active==1){
- tele_active++;
- SetFont("BIGFONT");
- HudMessageBold(s:"a door is now unlocked"; HUDMSG_FADEOUT, 998, CR_YELLOW, 0.5, 0.5, 5.5, 0.5);
- AmbientSound("REVEAL",127);
- door_open(64,25);
- }
- }
- script 18 (void) setresultvalue(soulsphere_damage);
- int phase_light_name[4]={"phaselight1","phaselight3","phaselight1","phaselight2"};
- script 19 (void){//Generator Script
- int light_spotid=40,i;
- int light_id=49;
- Thing_Activate(44);
- spawnspot("steamspawner",130,0,0);
- ThingSound(40,"IBMEFF2",127);
- ThingSound(40,"IBMEFF1",127);
- teleportother(53,44,0);
- while(light_Spotid<=43){
- ThingSound(light_spotid,"IBMEFF1",127);
- for(i=0;i<4;i++){
- thing_remove(light_id);
- SpawnSpot(phase_light_name[i],light_spotid,light_id,0);
- delay(5);
- }light_spotid++;
- light_id++;
- delay(35);
- }generator2=1;
- acs_execute(34,0,generator1*10+generator2,0,0);
- delay(150);
- Light_changetovalue(80,255);
- Light_changetovalue(81,255);
- acs_execute(42,0,1);
- }
- script 20 (int door){//Super Shotgun Little Door open
- activatorsound("EFF11",255);
- delay(35);
- if(door==1)
- door_open(146,30);
- else{
- door_open(69,13);
- spawnspot("fakedoubleshotgun",68,0,0);
- }
- }
- int script_21[2]={"YES","NO"};
- script 22 open {//End Selector can spawn one or two soulspheres
- int victim=0;
- int ending=random(0,100);
- INT GETOUT2=FALSE;
- int soul_hatee=0;
- int i=0,j=0;
- int shorter_distance;
- int k=0;
- delay(1);
- total_players=HumanCounter();
- if(ending<=30)//if ending <= 30% do
- {
- while(getout2==FALSE)
- {
- if(Game_info_round_timer==0);//Fix a bug when the zombies don't come
- 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
- getout2=TRUE;
- Music_Played=SOULSPHERE_MUSIC;
- SetMusic("ibmsnd7");
- }
- delay(35);
- }
- delay(350);
- if(((humancounter()+zombiecounter())*100)/total_players>=90){//Total of players ingame/total of players on map start >=90% , spawn 2 soul spheres
- SpawnSpot ("ghouldemon",25,114,24);
- }
- SpawnSpot ("ghouldemon",76,114,24);
- while(true){
- i=0;
- shorter_distance=2147483647;
- while(i<32){
- if(thingcount(t_none,i+600)==1){
- j=ibm_distance (100,i+600);
- if(j<shorter_distance){
- shorter_distance=j;
- soul_hatee=i+600;
- }
- }
- delay(1);
- i++;
- }
- Thing_Hate(114,soul_hatee,6);
- if(CheckActorInventory(soul_hatee,"zombiemaker")) {soulsphere_damage=random(188,225); SetActorProperty(114,APROP_Speed,36.0);}
- else {soulsphere_damage=random(4,7); SetActorProperty(114,APROP_Speed,24.0);}
- while(thingcount(T_NONE,soul_hatee)==1) {delay(35);}
- delay(1);
- }
- }
- }
- script 23 (int type, int arg1, int arg2) clientside{//Update the clientside from who called the debug command
- if(type==1){
- user_ghoulactivesound=arg1;
- user_invisible=arg2;
- }else if(type==2){
- script_test=arg1;
- ghoul_invtest=arg2;
- }else if(type==3){
- stuck_test=arg1;
- script_test=arg2;
- }else if(type==4){
- ghoul_hate=arg1;
- sound_toplay=arg2;
- }else if(type==5){
- ghoul_target=arg1;
- ghoul_target_distance=arg2;
- }else if(type==6){
- soulsphere_damage=arg1;
- generator1=arg2;
- }else if(type==7){
- generator2=arg1;
- dev=arg2;
- }else if(type==8){
- weather=arg1;
- debug_zm09=arg2;
- }
- }
- script 24 open clientside{//INTRO
- zm09_update_settings();
- printbold(s:"============================================================\n|ZM09 - ABANDONED MINES - CREATED BY IBM5155\n============================================================\n /!\ OpenGL required /!\ \n \!/ Playable on soft\!/ \nZM09 V1.0 FINAL VERSION");
- printbold(s:"SPECIAL THANKS TO:\n-ESTAR\n-Ijon Tichy\n-Slave2theLight\n-Torn City author\n-Ivan Zanotti\n-Dusk\n-IVAN\n-HexaDoken\n-Cruduxy\n-Popsoap\n-Mr.Fiat\n-Mr.Man\n-'Monolith' for the piano sound\n-'Mojang' for the rain sound\n-'Imscared - A Pixelated Nightmare' for the white face idea");
- printbold(s:"");
- 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");
- printbold(s:"");
- HudMessagebold(s:"\czmap settings can be configured writing \cjpuke 48\cf on console"; HUDMSG_FADEINOUT, 544, CR_UNTRANSLATED, 0.5, 0.8,15.1,0, 0.3);
- delay(200);
- setfont("bigfont");
- HudMessageBold(s:"ABANDONED MINES"; HUDMSG_FADEINOUT, 0, CR_RED, 0.85, 0.25, 9.0,3.0, 1.5);
- delay(70);
- setfont("bigfont");
- HudMessageBold(s:"AUTHOR:IBM5155"; HUDMSG_FADEINOUT, 0, CR_WHITE, 0.84, 0.27, 7.0,3.0, 1.5);
- }
- script 25 open clientside{//Flicker blue computer room
- int brightlevel=255;
- while(true){
- if(generator1==1 && generator2==0){
- if(brightlevel>100) brightlevel=random(0,100);
- else brightlevel=random(101,255);
- Light_ChangeToValue(80,brightlevel);
- Light_changetovalue(81,brightlevel);
- }else if(generator1==0 && generator2==0){
- Light_ChangeToValue(80,112);
- Light_changetovalue(81,112);
- }else{
- Light_ChangeToValue(80,255);
- Light_changetovalue(81,255);
- }delay(random(1,10));
- }
- }
- int ibmnu_text[5]={"ibmnu1","ibmnu2","ibmnu3","ibmnu4","ibmnu1"};
- script 26 open{//Update server side functions to clientside
- while(true){
- acs_execute(23,0,1,user_ghoulactivesound,user_invisible);
- delay(1);
- acs_execute(23,0,2,script_test,ghoul_invtest);
- delay(1);
- acs_execute(23,0,3,stuck_test,script_test);
- delay(1);
- acs_execute(23,0,4,ghoul_hate,sound_toplay);
- delay(1);
- acs_execute(23,0,5,ghoul_target,ghoul_target_distance);
- delay(1);
- acs_execute(23,0,6,soulsphere_damage,generator1);
- delay(1);
- acs_execute(23,0,7,generator2,dev);
- delay(1);
- acs_execute(23,0,8,weather,ibm_distance(100,ghoul_target));
- delay(10);
- }
- }
- script 27 open {//Switch Code display core
- int comm=0;
- int num_pos=0;
- int s_exit=FALSE;
- while(s_exit==FALSE){
- if(comm==0 && secret[8]+secret[9]+82!=86) {SetLineTexture(secret[8]+secret[9]+82,SIDE_FRONT,TEXTURE_MIDDLE,"ibmnu5"); comm++;}
- else if (secret[8]+secret[9]+82!=86) {SetLineTexture(secret[8]+secret[9]+82,SIDE_FRONT,TEXTURE_MIDDLE,"ibmnu6"); comm--;}
- else s_exit=true;
- num_pos=secret[secret[8]+secret[9]+3];//receive the actual number;
- if(num_pos!=0)SetLineTexture(secret[8]+secret[9]+81,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[num_pos-1]);
- delay(10);
- }
- }
- int nedm_digit1='-',nedm_digit2='-',nedm_digit3='-',nedm_digit4='-', nedm_digit5='-', nedm_digit6='-';
- bool nedm_digit_lock=false;
- int mcdonald=0;
- int pos_z_nedm;
- script 29 (int input){//Nedm Script: Switch counter to allow nedm
- bool script_lock=false;
- pos_z_nedm=getactorz(PlayerNumber()+600);
- if(input==6){
- if(pos_z_nedm<140.0){
- script_lock=true;
- } }
- else if(input==2){
- if(pos_z_nedm<110.0){
- script_lock=true;
- } }
- else if(input==3){
- if(pos_z_nedm<230.0){
- script_lock=true;
- } }
- if(nedm_digit_lock==false && script_lock==false && script_lock==false){
- if(nedm_digit1=='-') {nedm_digit1=input; print(s:"NEDM SWITCH CODE\n",d:nedm_digit1,s:" - - - - -");}
- else if(nedm_digit2=='-') {nedm_digit2=input; print(s:"NEDM SWITCH CODE\n",d:nedm_digit1,s:" ",d:nedm_digit2,s:" - - - -");}
- 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:" - - -");}
- 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:" - -");}
- 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:" -");}
- 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);}
- }else if(input!=0) print(s:"locked");
- if(nedm_digit6!='-'){
- if(nedm_code==0){
- if(nedm_digit1==1 && nedm_digit2==2 && nedm_digit3==3 && nedm_digit4==4 && nedm_digit5==5 && nedm_digit6==6){
- printbold(n:0, s:" found the right code for active nedm!!!");
- ceiling_raisebyvalue(91,1,8);
- nedm_digit_lock=true;
- nedm_digit6='-';
- }
- else{
- nedm_digit1='-'; nedm_digit2='-'; nedm_digit3='-'; nedm_digit4='-'; nedm_digit5='-'; nedm_digit6='-';
- print(s:"wrong code");
- }
- }else if(nedm_code==1){
- if(nedm_digit1==6 && nedm_digit2==5 && nedm_digit3==4 && nedm_digit4==3 && nedm_digit5==2 && nedm_digit6==1){
- printbold(n:0, s:" found the right code for active nedm!!!");
- ceiling_raisebyvalue(91,1,8);
- nedm_digit_lock=true;
- nedm_digit6='-';
- }
- else{
- nedm_digit1='-'; nedm_digit2='-'; nedm_digit3='-'; nedm_digit4='-'; nedm_digit5='-'; nedm_digit6='-';
- print(s:"wrong code11");
- }
- }else if(nedm_code==2){
- if(nedm_digit1==1 && nedm_digit2==1 && nedm_digit3==1 && nedm_digit4==6 && nedm_digit5==6 && nedm_digit6==6){
- printbold(n:0, s:" found the right code for active nedm!!!");
- ceiling_raisebyvalue(91,1,8);
- nedm_digit_lock=true;
- nedm_digit6='-';
- }
- else{
- nedm_digit1='-'; nedm_digit2='-'; nedm_digit3='-'; nedm_digit4='-'; nedm_digit5='-'; nedm_digit6='-';
- print(s:"wrong code");
- }
- }else{
- if(nedm_digit1==6 && nedm_digit2==6 && nedm_digit3==6 && nedm_digit4==1 && nedm_digit5==1 && nedm_digit6==1){
- printbold(n:0, s:" found the right code for active nedm!!!");
- ceiling_raisebyvalue(91,1,8);
- nedm_digit_lock=true;
- nedm_digit6='-';
- }
- else{
- nedm_digit1='-'; nedm_digit2='-'; nedm_digit3='-'; nedm_digit4='-'; nedm_digit5='-'; nedm_digit6='-';
- print(s:"wrong code");
- }
- }
- }
- //-------------------------------------------------------------------------------------------------
- if(input==0) {mcdonald++;}
- if(mcdonald==55){
- ceiling_lowerbyvalue(91,100,8);
- ceiling_raisebyvalue(92,1,8);
- }
- else if(mcdonald==105){
- acs_execute(30,0,0,0,0);
- ceiling_lowerbyvalue(92,100,8);
- delay(353);
- floor_lowerbyvalue(89,200,200);
- floor_lowerbyvalue(90,200,200);
- tagwait(90);
- Floor_Waggle(89, 2000, 100, 0, 0);
- delay(100);
- Floor_Waggle(90, 2000, 100, 0, 0);
- }
- }
- int nedm_desactive=false;
- script 30 (void) clientside{//NEDM code spam
- int counter=0;
- int posy=-3.0;
- while(posy<=0.05){
- SetFont("NEDML");
- if(nedm_desactive==false)HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, 0.5, posy,0.1,0, 0.3);
- posy+=0.01;
- delay(1);
- }SetFont("NEDML");
- if(nedm_desactive==false)HudMessagebold(s:"A"; HUDMSG_PLAIN , 800, counter, 0.5, posy,1.5,0, 0);
- Music_Played=NEDM_MUSIC;
- if(nedm_desactive==false)setmusic("NEDM",0,0);
- delay(35);
- if(nedm_desactive==false)spawnspot("FlareDisco",87,132,0);
- ACS_Suspend(34,0);
- acs_execute(31,0);
- if(nedm_desactive==false)acs_execute(33,0);
- while(true){
- if(nedm_desactive==false){
- SetFont("NEDML");
- HudMessagebold(s:"A"; HUDMSG_PLAIN , 800, counter, 0.5, posy,0.1,0, 0);
- }delay(1);
- }
- }
- script 31 (void) clientside{//Nedm Code:Cat see
- int posx1=0.1;
- int posx2=0.9;
- int posy=0.9;
- while(true){
- while(posy>=0.1){
- if(nedm_desactive==false){
- SetFont("NEDMCAT");
- HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx1, posy,0.1,0, 0.2);
- HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx2, posy,0.1,0, 0.2);
- }
- posy-=0.010;
- delay(3);
- }while(posx1<=0.9){
- if(nedm_desactive==false){
- SetFont("NEDMCAT");
- HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx1, posy,0.1,0, 0.2);
- HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx2, posy,0.1,0, 0.2);
- }
- posx2=1.0-posx1;
- posx1+=0.010;
- delay(3);
- }while(posy<=0.9){
- if(nedm_desactive==false){
- SetFont("NEDMCAT");
- HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx1, posy,0.1,0, 0.2);
- HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx2, posy,0.1,0, 0.2);
- }
- posy+=0.010;
- delay(3);
- }while(posx1>=0.1){
- if(nedm_desactive==false){
- SetFont("NEDMCAT");
- HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx1, posy,0.1,0, 0.2);
- HudMessagebold(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, posx2, posy,0.1,0, 0.2);
- }
- posx2=1.0-posx1;
- posx1-=0.010;
- delay(3);
- }
- delay(1);
- }
- }
- script 32 (int x) NET clientside
- {
- if(thingcount(t_none,playernumber()+600)==0)
- changecamera(100,playernumber(),0);
- }
- script 33 (int light, int var) clientside{//Nedm colored lights
- int arg1,arg2,arg3;
- int posy,i;
- if(light==2){
- For(i=49;i<=52;i++) Thing_SetSpecial(i,0,var,var,var);
- Thing_SetSpecial(86,0,var,var,var);
- Thing_SetSpecial(88,0,var,var,var);
- }
- else{
- while(TRUE){
- posy=random(0,6);
- switch(posy){
- case 0:
- arg1=random(70,255);
- arg2=random(70,255);
- arg3=random(70,255);
- break;
- case 1:
- arg1=random(0,100);
- arg2=random(0,100);
- arg3=random(100,255);
- break;
- case 2:
- arg1=random(0,100);
- arg2=random(100,255);
- arg3=random(0,100);
- break;
- case 3:
- arg1=random(100,255);
- arg2=random(0,100);
- arg3=random(0,100);
- break;
- case 4:
- arg1=random(100,255);
- arg2=random(100,255);
- arg3=random(0,100);
- break;
- case 5:
- arg1=random(100,255);
- arg2=random(0,100);
- arg3=random(100,255);
- break;
- case 6:
- arg1=random(0,100);
- arg2=random(100,255);
- arg3=random(100,255);
- break;
- }
- for(i=49;i<53;i++) Thing_SetSpecial(i,0,arg1,arg2,arg3);
- Thing_SetSpecial(86,0,arg1,arg2,arg3);
- Thing_SetSpecial(88,0,arg1,arg2,arg3);
- delay(3);
- }
- }
- }
- int script_34_adress[10]={49,50,51,52,86,88,145,125,126,103};
- script 34 (int action) clientside{//LIGHT effected by ravishing, lava and generator on
- int arg1=100,arg2=100,arg3=100;
- int posy;
- int i=122,j=0;
- int effect=0;
- if(getplayerrender()==OPENGL_PLAYER){
- if(action==1){
- while(true){/*--------------------------------------------------------------------
- while(arg1<=135)
- {
- j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,arg1,arg2,arg3); j++;}
- arg1+=5;arg2+=5;arg3+=5;
- delay(1);
- }
- while(arg1>=30)
- {
- j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,arg1,arg2,arg3); j++;}
- arg1-=5;arg2-=5;arg3-=5;
- delay(1);
- }
- delay(1);
- }--------------------------------------------------------------------*/
- effect=random(0,1000);
- if(effect<=300 || effect>=400){
- arg1=random(0,50);
- for(j=0;j<=6;j++){
- Thing_SetSpecial(script_34_adress[j],0,arg1,arg1,arg1);
- }delay(random(1,9));
- arg1=random(50,160);
- for(j=0;j<=6;j++){Thing_SetSpecial(script_34_adress[j],0,arg1,arg1,arg1);}
- delay(random(1,9));
- }else if(effect<=350){
- for(j=0;j<=6;j++){Thing_SetSpecial(script_34_adress[j],0,0,0,0);}
- delay(random(15,50));
- }
- else{
- for(j=0;j<=6;j++){Thing_SetSpecial(script_34_adress[j],0,0,0,0);}
- delay(random(60,150));
- }
- }
- while(arg1<=135)
- {
- j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,arg1,arg2,arg3); j++;}
- arg1+=5;arg2+=5;arg3+=5;
- delay(1);
- }
- //----------------------------------------------------NEW
- }
- else if(action==11){
- arg1=255;arg2=255;arg3=255;
- j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,arg1,arg2,arg3); j++;}
- generator2=1;
- }
- else if(action==0){
- j=0;while(j<=6){ Thing_SetSpecial(script_34_adress[j],0,0,0,0); j++;}
- }
- else;
- delay(1);
- }else{
- if(action==true){
- while(true){
- while(arg1<=135){
- for(i=7;i<10;i++, arg1+=5)Light_ChangeToValue(script_34_adress[i],arg1);
- delay(1);
- }
- while(arg1>=30){
- for(i=7;i<10;i++, arg1-=5)Light_ChangeToValue(script_34_adress[i],arg1);
- delay(1);
- }
- delay(1);
- }
- }
- else if(action==11){
- arg1=255;
- for(i=7;i<10;i++)Light_ChangeToValue(script_34_adress[i],arg1);
- generator2=1;
- }
- else if(action==0){
- for(i=7;i<10;i++, arg1-=5)Light_ChangeToValue(script_34_adress[i],arg1);
- }
- delay(1);
- }
- }
- script 35 (void){//White Face Script
- int rnd=0;
- int snd=0;
- int i=0;
- delay(5);
- ReplaceTextures("CONS1_5","ITEX20");
- ReplaceTextures("ITEXE10","ITEXE33");
- ReplaceTextures("ITEXE11","ITEXE33");
- ReplaceTextures("ITEXE12","ITEXE29");
- ReplaceTextures("ITEXE13","ITEXE41");
- ReplaceTextures("ITEXE14","ITEXE41");
- ReplaceTextures("IBMNU6","ITEX25");
- ReplaceTextures("IBMNU5","ITEX25");
- ReplaceTextures("IBMNU4","ITEX25");
- ReplaceTextures("IBMNU3","ITEX25");
- ReplaceTextures("IBMNU2","ITEX25");
- ReplaceTextures("IBMNU1","ITEX25");
- ReplaceTextures("COMPTALL","ITEXE45");
- SetActorProperty(100,APROP_RenderStyle,STYLE_Translucent);
- while(true){
- rnd=random(0,100);
- if(rnd<=15){
- ThingSound(100,"ELAUGHT",127);
- while(i<=1.0){
- SetActorProperty(100,APROP_Alpha,i);
- i+=6553;
- delay(2);
- }while(i>=0){
- SetActorProperty(100,APROP_Alpha,i);
- i-=6553;
- delay(2);
- }
- }else if(rnd>=90){
- SetActorProperty(100,APROP_Speed,12.0);
- while(snd<=23){
- snd++;
- ThingSound(100,"KIDSND",127);
- while(i<=1.0){
- SetActorProperty(100,APROP_Alpha,i);
- i+=6553;
- delay(2);
- }while(i>0){
- SetActorProperty(100,APROP_Alpha,i);
- i-=6553;
- delay(2);
- }
- }SetActorProperty(100,APROP_Speed,3.0);
- SetActorProperty(100,APROP_Alpha,0.0);
- snd=0;
- }else{
- ThingSound(100,"GDSEE",127);
- rnd=random(0,100);
- if(rnd>49){
- SetActorProperty(100,APROP_Alpha,0.3);
- delay(12);
- SetActorProperty(100,APROP_Alpha,0.0);
- }
- }delay(50);
- }
- }
- script 38 (int x) clientside{//Miners dead description
- 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");
- 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");
- else print(s:"James\nWas born in 06/05/1975\nDead in 06/03/1983\nSuicide\nchildren with mental problens");
- }
- script 39 (void){//Remove water on blue key door
- Ceiling_lowerbyvalue(104,30,1248);
- }
- script 40 (int qnt){//Kid Laught in some areas
- int i=0;
- int k;
- while(i<=qnt){
- k=random(0,100);
- if(k==50){
- activatorsound("ELAUGHT",255);
- i=qnt;
- }
- else{
- k=random(0,100);
- }
- i++;
- }
- }
- script 41 (int X) clientside{//White Face scirpt: Change the map + Ravishing vision
- int i=0;
- int k=90;
- int j;
- if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
- if(x==1){//Iôm scared kill
- ACS_Terminate(30,0);
- ACS_Terminate(31,0);
- ACS_Terminate(32,0);
- ACS_Terminate(33,0);
- ACS_Terminate(34,0);
- generator1=0;
- generator2=0;
- ReplaceTextures("ITEX20","ITEX24");
- ReplaceTextures("ITEXE29","ITEXE50");
- ReplaceTextures("ITEXE33","ITEXE51");
- ReplaceTextures("ITEXE45","ITEXE53");
- ReplaceTextures("ITEXE41","ITEXE52");
- SetLineTexture(157,SIDE_FRONT ,TEXTURE_BOTTOM ,"ITEXE55");
- SetLineTexture(134,SIDE_FRONT ,TEXTURE_MIDDLE ,"ITEXE54");
- SetLineTexture(135,SIDE_FRONT ,TEXTURE_MIDDLE ,"ITEXE54");
- SetLineTexture(136,SIDE_FRONT ,TEXTURE_MIDDLE ,"ITEXE54");
- SetLineTexture(137,SIDE_FRONT ,TEXTURE_MIDDLE ,"ITEXE54");
- SetLineTexture(158,SIDE_FRONT ,TEXTURE_MIDDLE ,"ITEXE54");
- SetLineTexture(83,SIDE_FRONT ,TEXTURE_MIDDLE ,"ITEXE54");
- SetLineTexture(84,SIDE_FRONT ,TEXTURE_MIDDLE ,"ITEXE54");
- SetLineTexture(85,SIDE_FRONT ,TEXTURE_MIDDLE ,"ITEXE54");
- SetLineTexture(159,SIDE_FRONT ,TEXTURE_MIDDLE ,"ITEXE54");
- HudMessagebold(s:""; HUDMSG_PLAIN , 800, 0, 0.5, 0,0,0, 0);
- delay(35*5);
- SetMusic("suicide");
- Music_Played=IMSCARED_MUSIC;
- delay(35);
- SetFont("BIGFONT");
- 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);
- HudMessageBold(s:"Well, this is my bedroom"; HUDMSG_FADEINOUT, 0, CR_YELLOW, 0.5, 0.32, 13.5, 4.5,3.0);
- 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);
- HudMessageBold(s:"but this does not care more"; HUDMSG_FADEINOUT, 0, CR_YELLOW, 0.5, 0.36, 13.5, 10.5,3.0);
- 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);
- 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);
- 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);
- delay(35*9);
- x=2;
- for(x=49;x<=53;x++){
- thing_remove(x);
- Thing_SetSpecial(x,0,255,0,0);
- }Thing_SetSpecial(86,0,255,0,0);
- Thing_SetSpecial(88,0,255,0,0);
- spawnspot("IMSCARED",132,0,0);
- thing_remove(132);
- x=0;
- while(x<200){
- if(x!=131 && x!=100 && x!=1) Light_ChangeToValue(x,-100);
- x++;
- delay(1);
- }
- Thing_SetSpecial(138,0,255,0,0);
- while(true){
- x=random(0,7);
- if(x==0) spawn("DeadMarine",random(-2263.18,-367.978),random(-1199.85,-429.914),300.0,151,0);//red key spam place
- 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
- else if(x==2)spawn("DeadMarine",random(0.18,2500.0),random(1000.85,1500.914),385.0,151,0);//Big generator
- else if(x==3)spawn("DeadMarine",random(2143.18,4000.0),random(2400.85,3790.914),450.0,151,0);//Hell area
- else if(x==4)spawn("DeadMarine",random(-1009.18,-460.0),random(-225.85,720.914),66.0,151,0);//Entering cave
- else if(x==5)spawn("DeadMarine",random(-90.18,2668.0),random(1000.85,1500.914),520.0,151,0);//Big generator
- else if(x==6)spawn("DeadMarine",random(-320.18,1700.0),random(320.85,850.914),300.0,151,0);//Blue key spot
- else if(x==7)spawn("DeadMarine",random(3947.18,5727.0),random(-2000.85,-230.914),402.0,151,0);//Third floor
- thingsound(151,"player/male/death1",255);
- delay(170);
- thing_changetid(151,0);
- }
- }else if(x==2){//ravishing kill
- changecamera(100,1,0);
- fadeto(255,255,255,1.0,0.5);
- delay(35);
- changecamera(100,0,0);
- fadeto(255,255,255,0.0,0.5);
- delay(35*3);
- changecamera(100,1,0);
- }else if(x==4){//White face scary spam
- x=random(0,1000);
- if(x>=500 && x<=570) acs_execute(43,0,0,0,0);
- }
- }
- script 42 (int x) clientside{//Software Render lights
- if(getplayerrender()==SOFTWARE_PLAYER){
- if(x==false){
- Light_ChangeToValue(125,255);
- Light_ChangeToValue(126,166);
- Light_ChangeToValue(103,166);
- ChangeFloor(3,"FLAT20");
- SetFont("BIGFONT");
- 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);
- }
- else if(x==true) Light_ChangeToValue(47,255);
- }
- }
- script 43 (int spot) clientside{//White Face third floor trick
- int k=90;
- int i=100;
- int j;
- int TEXT1,TEXT2,TEXT3;
- int light1,light2,light3;
- if(spot==true){
- TEXT1="JNROCK13"; TEXT2="BBRWZ04"; TEXT3="WOODN2";
- light1=119;light2=118;light3=113;
- }else{
- TEXT1="ITEXE17"; TEXT2="N_ROCK13"; TEXT3="BROCK41";
- light1=139;light2=140;light3=141;
- i=random(0,300);
- if(i<100 || i>=125) terminate;
- }if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
- if(k>=90){
- ReplaceTextures(TEXT1,"SP_FACE2");
- ReplaceTextures(TEXT2,"FIREBLU2");
- ReplaceTextures(TEXT3,"N_SKIN03");
- spawnspot("imscared",115,116,0);
- spawnspot("Dead_Baby",117,200,0);
- localsetmusic("FUCKED");
- while(k<=237){
- if(i>=59){
- thingsound(117,"KIDSND",255);
- i=-1;
- }j=random(0,255);
- Light_ChangeToValue(light1,j);
- Light_ChangeToValue(light2,j);
- Light_ChangeToValue(light3,j);
- k++;
- i++;
- delay(1);
- }
- Local_SetLastMusic();
- ReplaceTextures("SP_FACE2",TEXT1);
- ReplaceTextures("FIREBLU2",TEXT2);
- ReplaceTextures("N_SKIN03",TEXT3);
- if(spot==true){
- Light_ChangeToValue(light1,112); Light_ChangeToValue(light2,104); Light_ChangeToValue(light3,112);
- }else{
- Light_ChangeToValue(light1,104); Light_ChangeToValue(light2,96); Light_ChangeToValue(light3,88);
- }thing_remove(116);
- thing_remove(200);
- delay(70);
- activatorsound("ELAUGHT",255);
- }
- }
- script 44 (void){//White Face attack script
- SetHudSize(640,480,1);
- SetFont("ISCAR");
- activatorsound("SOULFUCK",255);
- HudMessage(s:"A"; HUDMSG_FADEINOUT, 0, CR_UNTRANSLATED, 0.5, 0.5,5.0,0, 0.2);
- teleport(102,0,0);
- acs_execute(41,0,1,0,0);
- SetFont("SMALLFONT");
- }
- script 45 (void){//Third floor table room random events
- int x=random(0,100);
- switch(x){
- case 0:
- case 15:
- case 20:
- case 25:
- case 30:
- acs_execute(43,0,1,0,0);
- break;
- case 35:
- case 40:
- giveinventory("IMSCAREDACTIVE",1);
- break;
- case 45:
- case 46:
- case 47:
- case 48:
- ambientsound("ELAUGHT",255);
- break;
- }
- }
- script 47 (void) clientside{//Rainfall script
- int X_SPOT=0, Y_SPOT=0, X_MIN=0, X_MAX=0, Y_MIN=0, Y_MAX=0, VAR_SPOT=250.0;
- int z_heigh,y_heigh, x_heigh;
- int a=0,b=0,c=0;
- int MAX2;
- int tid=122;
- int x, y, z ;
- int tid2=unusedTID(1000,2000);
- int player_tid2;
- if(rain_sound==1)thing_activate(144);
- while(true){
- player_tid2=consoleplayernumber()+PLAYER_TID;
- a=getactorx(player_tid2);//getactorx(ConsolePlayerNumber());
- b=getactory(player_tid2);//getactory(ConsolePlayerNumber());
- c=getactorz(player_tid2);//getactorz(ConsolePlayerNumber());
- if(weather_quality==-1) {X_MIN=-250.0; X_MAX=250.0; Y_MIN=-500.0; Y_MAX=250.0; VAR_SPOT=250.0;}
- 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;}
- 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;}
- 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;}
- 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;}
- 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;}
- X_SPOT=X_MIN; Y_SPOT=Y_MIN;
- while(Y_SPOT<=Y_MAX){
- while(X_SPOT<=X_MAX){
- x_heigh=random(a+X_SPOT,a+X_SPOT+VAR_SPOT); y_heigh=random(b+Y_SPOT,b+Y_SPOT+VAR_SPOT);
- z_heigh=GetActorCeilingZ(PLAYER_TID + PlayerNumber())-16.0;
- spawn("mapspot",x_heigh,y_heigh,z_heigh ,tid,0);
- if (thingcount(t_none,tid)==0){
- spawn("mapspot",x_heigh,y_heigh,c+10.0 ,tid,0);
- if(thingcount(t_none,tid)==0){
- spawn("mapspot",x_heigh,y_heigh,GetSectorCeilingZ(0,x_heigh /1.0,y_heigh /1.0)-20.0,tid,0);
- if(thingcount(t_none,tid)==0){
- spawn("mapspot",x_heigh,y_heigh,c+74.0 ,tid,0);
- if(thingcount(t_none,tid)==0) spawn("mapspot",x_heigh,y_heigh,c+274.0 ,tid,0);
- } } }
- if (CheckActorCeilingTexture(tid, "F_SKY1")){
- z_heigh=GetHigherCeiling(tid)-16.0;
- thing_remove(tid);
- spawn("mapspot",x_heigh,y_heigh,z_heigh,tid,0);
- if(rain_detail==0)spawnspot("raindrop",tid,0,0);
- else if(rain_detail==1)spawnspot("raindrop2",tid,0,0);
- else spawnspot("raindrop3",tid,0,0);
- }
- X_SPOT+=VAR_SPOT;
- thing_remove(tid);
- if(weather_quality==-1) delay(1);
- }
- X_SPOT=X_MIN;
- Y_SPOT+=VAR_SPOT;
- }
- delay(1);
- }
- }
- script 48 (void) NET clientside{//Rainfall menu
- int menu=0;
- int i=0;
- zm09_update_settings();
- while(true){
- i=0;
- menu_zm09=menu;
- while(i<5){i++;}
- SETFONT("SMALLFONT");
- HudMessagebold(s:"ZM09 SETTING"; HUDMSG_PLAIN, 544, CR_UNTRANSLATED, 0.5, 0.44,0,0, 0);
- SETFONT("SMALLFONT");
- HudMessagebold(s:"To exit the menu press \cf-use- \n\nControlls \cfleft & right \ccto set the value of the setting\n\cfup & down \ccto select another setting\n\clWARNING\cc: you will not be able to close the menu or control the menu if you are pressing others keys (like crouch, jump,fire,...)"; HUDMSG_PLAIN, 551, CR_GRAY, 0.5, 0.56,0,0, 0);
- zm09_menu_print();
- if(menu==0){
- menu_zm09=1;
- menu=1;
- zm09_menu_print();
- AmbientSound("menu/activate",127);
- }
- else if(menu==-1){
- SETFONT("SMALLFONT");
- HudMessagebold(s:""; HUDMSG_PLAIN, 544, CR_UNTRANSLATED, 0.5, 0.5,15.1,0, 0);
- HudMessagebold(s:""; HUDMSG_PLAIN, 545, CR_UNTRANSLATED, 0.5, 0.48,15.1,0, 0);
- HudMessagebold(s:""; HUDMSG_PLAIN, 546, CR_UNTRANSLATED, 0.5, 0.46,15.1,0, 0);
- HudMessagebold(s:""; HUDMSG_PLAIN, 547, CR_UNTRANSLATED, 0.44, 0.5,15.1,0, 0);
- HudMessagebold(s:""; HUDMSG_PLAIN, 548, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
- HudMessagebold(s:""; HUDMSG_PLAIN, 549, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
- HudMessagebold(s:""; HUDMSG_PLAIN, 550, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
- HudMessagebold(s:""; HUDMSG_PLAIN, 551, CR_UNTRANSLATED, 0.52, 0.44,0,0, 0);
- //activatorsound("menu/choose",127);DSSWTCHX
- AmbientSound("switches/exitbutn",127);
- menu=0;
- SetCvar("x_zh_zm09",(rain_detail+2)*1000+(rain_sound+2)*100+(weather_quality+2)*10+(nedm_desactive+2+reflection_actived*2));
- terminate;
- }
- if(menu==1){
- while(menu==1){
- zm09_menu_print();
- if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
- weather_quality--;
- if(weather_quality==-2) weather_quality=-1;
- AmbientSound("menu/change",127);
- delay(5);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
- weather_quality++;
- if(weather_quality==4) weather_quality=3;
- AmbientSound("menu/change",127);
- delay(20);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
- menu=2;
- AmbientSound("menu/cursor",127);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE) menu=-1;
- delay(1);
- }
- delay(5);
- }
- else if(menu==2){
- while(menu==2){
- zm09_menu_print();
- if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
- if(rain_sound==1){ rain_sound=0;
- thing_deactivate(144);
- }
- AmbientSound("menu/change",127);
- delay(5);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
- if(rain_sound==0){ rain_sound=1;
- if(rainfall_actived==true)thing_activate(144);
- }AmbientSound("menu/change",127);
- delay(5);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
- menu=3;
- AmbientSound("menu/cursor",127);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
- menu=1;
- AmbientSound("menu/cursor",127);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE) menu=-1;
- delay(1);
- }delay(5);
- }else if(menu==3){
- while(menu==3){
- zm09_menu_print();
- if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
- rain_detail--;
- if(rain_detail==-1) rain_detail=0;
- AmbientSound("menu/change",127);
- delay(5);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
- rain_detail++;
- if(rain_detail==3) rain_detail=2;
- AmbientSound("menu/change",127);
- delay(5);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
- menu=2;
- AmbientSound("menu/cursor",127);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
- menu=4;
- AmbientSound("menu/cursor",127);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE) menu=-1;
- delay(1);
- }
- delay(5);///////////////////////////////
- }else if(menu==4){
- while(menu==4){
- zm09_menu_print();
- if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
- nedm_desactive--;
- Local_SetLastMusic();
- if(Music_Played==NEDM_MUSIC) spawnspot("FlareDisco",87,132,0);
- if(nedm_desactive==-1) nedm_desactive=false;
- AmbientSound("menu/change",127);
- delay(5);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
- nedm_desactive++;
- if(Music_Played==NEDM_MUSIC) {setmusic("D_NULL");thing_remove(132);}
- if(nedm_desactive==2) nedm_desactive=true;
- AmbientSound("menu/change",127);
- delay(5);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
- menu=3;
- AmbientSound("menu/cursor",127);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
- menu=-1;
- delay(1);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
- AmbientSound("menu/cursor",127);
- menu=5;
- }delay(1);
- }
- delay(5);
- }else if(menu==5){
- while(menu==5){
- zm09_menu_print();
- if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_LEFT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVELEFT){
- reflection_actived--;
- if(reflection_actived==-1) reflection_actived=false;
- Sector_SetPlaneReflection (149, 0, 0);
- Sector_SetPlaneReflection (3, 0, 0);
- Sector_SetPlaneReflection (153, 0, 0);
- AmbientSound("menu/change",127);
- delay(5);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_RIGHT || GetPlayerInput(-1, INPUT_BUTTONS)==BT_MOVERIGHT){
- reflection_actived++;
- if(reflection_actived==2) reflection_actived=true;
- Sector_SetPlaneReflection (149, 66, 0);
- Sector_SetPlaneReflection (3, 44, 0);
- Sector_SetPlaneReflection (153, 44, 0);
- AmbientSound("menu/change",127);
- delay(5);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_FORWARD){
- menu=4;
- AmbientSound("menu/cursor",127);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_USE){
- menu=-1;
- delay(1);
- }else if(GetPlayerInput(-1, INPUT_BUTTONS)==BT_BACK){
- menu=5;
- //activatorsound("menu/cursor",127);
- }
- delay(5);
- }
- }
- delay(1);
- }
- }
- script 49 open {//Weather selector
- delay(50);
- weather=random(1,100);
- if(weather>=50 && weather<=65){
- rainfall_actived=true;
- SETFONT("SMALLFONT");
- //Thing_ChangeTID(0, PLAYER_TID+PlayerNumber());
- Light_ChangeToValue(23,90);
- Sector_Setcolor(23,128,128,128);
- Light_ChangeToValue(142,90);
- Sector_Setcolor(142,128,128,128);
- Light_ChangeToValue(143,64);
- Sector_Setcolor(143,128,128,128);
- ReplaceTextures("IBMTE2","SKYFOG0",NOT_MIDDLE);
- Light_ForceLightning(0);
- acs_execute(47,0,0,0,0);
- }
- }
- script 50 LIGHTNING {//RAIN SCRIPT
- Delay(Random(20, 200));
- AmbientSound("thunder",127);
- }
- int piano_touched=0;
- script 51 (void){//Piano script
- int i=random(0,10);
- if(piano_touched>=random(20,50)){
- thingsound(150,"riff3",127);
- print(s:"\cfahhhhh, this sound is so annoying, I will make you stop ");
- delay(45);
- thingsound(150,"ELAUGHT",127);
- delay(100);
- giveinventory("IMSCAREDACTIVE",1);
- piano_touched=0;
- }else{
- if(i<=5) thingsound(150,"riff1",127);
- else thingsound(150,"riff2",127);
- piano_touched++;
- }if(piano_touched==24) door_open(146,30);
- delay(90);
- }
- Script 52 (void) clientside{//Generic Locked Door Mensage/Sound
- if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
- Print(s:"Noone can enter on Igor's abandoned castle");
- ActivatorSound("DRLOCKED", 127);
- delay(15);
- }
- script 53 open clientside{//Abandoned Igor's Castle"
- while(true){
- delay(200);
- thingsound(160,"LORDIGOR",255);
- delay(1);
- }
- }
- script 54 open clientside{//Abandoned Igor's Castle"
- int i=0;
- while(true){
- i=random(0,255);
- if(i<60){
- i=random(1,3);
- switch(i){
- case 1:thingsound(160,"TCLTFIR1",255);break;
- case 2:thingsound(160,"TCLTFIR2",255);break;
- case 3:thingsound(160,"TCLTFIR3",255);break;
- }
- }
- delay(random(200,300));
- }
- }
- function void secret_select(void){
- int a;
- a=random(1,21);
- if(a==1){ secret[0]=1;secret[1]=2;secret[2]=3;secret[3]=4;
- }else if(a==2){ secret[0]=2;secret[1]=1;secret[2]=4;secret[3]=3;
- }else if(a==3){ secret[0]=2;secret[1]=3;secret[2]=1;secret[3]=4;
- }else if(a==4){ secret[0]=2;secret[1]=3;secret[2]=4;secret[3]=1;
- }else if(a==5){ secret[0]=1;secret[1]=3;secret[2]=2;secret[3]=4;
- }else if(a==6){ secret[0]=1;secret[1]=3;secret[2]=4;secret[3]=2;
- }else if(a==7){ secret[0]=3;secret[1]=1;secret[2]=2;secret[3]=4;
- }else if(a==8){ secret[0]=1;secret[1]=2;secret[2]=4;secret[3]=3;
- }else if(a==9){ secret[0]=4;secret[1]=1;secret[2]=2;secret[3]=3;
- }else if(a==10){secret[0]=1;secret[1]=4;secret[2]=2;secret[3]=3;
- }else if(a==11){secret[0]=3;secret[1]=4;secret[2]=1;secret[3]=2;
- }else if(a==12){secret[0]=4;secret[1]=3;secret[2]=2;secret[3]=1;
- }else if(a==13){secret[0]=1;secret[1]=4;secret[2]=3;secret[3]=2;
- }else if(a==14){secret[0]=4;secret[1]=2;secret[2]=3;secret[3]=1;
- }else if(a==15){secret[0]=3;secret[1]=2;secret[2]=4;secret[3]=1;
- }else if(a==16){secret[0]=3;secret[1]=2;secret[2]=1;secret[3]=4;
- }else if(a==17){secret[0]=4;secret[1]=3;secret[2]=1;secret[3]=2;
- }else if(a==18){secret[0]=4;secret[1]=1;secret[2]=3;secret[3]=2;
- }else if(a==19){secret[0]=2;secret[1]=1;secret[2]=4;secret[3]=3;
- }else if(a==20){secret[0]=2;secret[1]=4;secret[2]=3;secret[3]=1;
- }else if(a==21){secret[0]=3;secret[1]=4;secret[2]=2;secret[3]=1;}
- }
- function void test_secret(int switchh){
- selected++;
- secret[selected+3]=switchh;
- if(secret[selected+3]==secret[selected-1]) secret[9]++;
- else secret[8]++;
- if(secret[9]==2 && selected==4){
- selected=random(0,5);
- print_code();
- if(selected>3){//50% right code
- SetFont("BIGFONT");
- HudMessageBold(s:"a door has been unlocked"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
- AmbientSound("REVEAL",127);
- door_open(62,24);
- }else{//50% right code + ravishing
- SetFont("BIGFONT");
- HudMessageBold(s:"a door has been opened"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
- AmbientSound("REVEAL",127);
- door_open(11,24);
- ravishing_selector(100);
- }AmbientSound("REVEAL",127);
- }if(secret[9]==4){ // 100% right code
- print_code();
- selected=random(0,100);
- if(selected<50){
- SetFont("BIGFONT");
- AmbientSound("achievement/unlocked",127);
- HudMessageBold(s:"a wall has been opened"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
- AmbientSound("REVEAL",127);
- door_open(5,18);
- }else if(selected<70){
- SetFont("BIGFONT");
- AmbientSound("achievement/unlocked",127);
- AmbientSound("REVEAL",127);
- HudMessageBold(s:"everyone won a item!!!"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
- AmbientSound("REVEAL",127);
- Acs_executeAlways(999,0,0,0,0);
- Acs_executeAlways(999,0,0,0,0);
- }else{
- SetFont("BIGFONT");
- HudMessageBold(n:0,s:" Opened all the secret passages!!!"; HUDMSG_FADEOUT, 999, CR_GREEN, 0.5, 0.2, 5.5, 0.5);
- AmbientSound("REVEAL",127);
- AmbientSound("achievement/unlocked",127);
- door_open(11,24);
- door_open(62,24);
- door_open(5,18);
- }
- }if(secret[8]==4){// 0% right code
- selected=random(0,10);
- if(selected>=7){//White Face script
- acs_execute(35,0,0,0,0);
- acs_execute(4,0,0,0,0);
- SpawnSpot ("IMSCARED2",25,100,24);
- HudMessageBold(s:"Thanks ", n:0, s:" Now I'm free again!!!"; HUDMSG_FADEOUT, 919, CR_GREEN, 0.5, 0.6, 5.5, 0.5);
- }else ACS_Execute(6,0,0,0,0);
- print_code();
- }
- else if(secret[8]==3 && secret[9]==1){
- print_code();
- ravishing_selector(35);
- Acs_ExecuteAlways(164, 0, PlayerNumber(), 0, 0);
- }
- }
- function void red_keyspawn(void){
- switch(random(0,10)){
- case 0:spawn("mapspot",random(-721.0,-409.0),random(1873.0,2711.0),632.0,350,0); TeleportOther(36,350,1);break;
- case 1:spawn("mapspot",random(4528.0,5135.0),random(-1664.0,-1361.0),400.0,350,0); TeleportOther(36,350,1);break;
- case 2:spawn("mapspot",random(5623.0,5807.0),random(-783.0,-497.0),472.0,350,0); TeleportOther(36,350,1);break;
- case 3:spawn("mapspot",random(2080.0,4079.0),random(2448.0,3823.0),463.0,350,0); TeleportOther(36,350,1);break;
- case 4:spawn("mapspot",random(-3088.0,-2553.0),random(-1776.0,-1281.0),112.0,350,0); TeleportOther(36,350,1);break;
- case 5:spawn("mapspot",random(1114.0,1775.0),random(392.0,825.0),318.0,350,0); TeleportOther(36,350,1);break;
- case 6:spawn("mapspot",random(-1856.0,-1169.0),random(2125.0,2351.0),327.0,350,0); TeleportOther(36,350,1);break;
- case 7:spawn("mapspot",random(4416.0,4471.0),random(-2004.0,-1961.0),400.0,350,0); TeleportOther(36,350,1);break;
- case 8:spawn("mapspot",random(-2512.0,879.0),random(-1716.0,-449.0),362.0,350,0); TeleportOther(36,350,1);break;
- case 9:spawn("mapspot",random(4550.0,4719.0),random(-1246.0,-1169.0),465.0,350,0); TeleportOther(36,350,1);break;
- case 10:spawn("mapspot",random(-1808.0,-1585.0),random(-2320.0,-2052.0),72.0,350,0); TeleportOther(36,350,1);break;
- }
- }
- function void ravishing_selector(int lucky){
- int test=random(0,lucky);
- if(test<=15) acs_execute(13,0,0,0);
- }
- function void winery_key_spawn(void){
- int test=random(1,7);
- if(test<=4){
- switch(test){
- case 1:
- TeleportOther(70,71,0);
- break;
- case 2:
- TeleportOther(70,72,0);
- break;
- case 3:
- TeleportOther(70,73,0);
- break;
- case 4:
- TeleportOther(70,74,0);
- break;
- }
- }
- }
- function void print_code(void){
- HudMessageBold(n:0, s:" activated the code"; HUDMSG_FADEOUT, 997, CR_RED, 0.5, 0.5, 9.5, 0.5);
- 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);
- 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);
- 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);
- }
- function int GetPlayerRender(void) {return GetCVar ("vid_renderer");}
- function void Local_SetLastMusic(void){
- localsetmusic(Local_musicstore[Music_Played]);
- }
- function void secret_select_help(void)
- {
- int i=random(0,100);
- int x=random(0,100);
- int secret_help1=secret[0];
- int secret_help2=secret[1];
- int secret_help3=secret[2];
- int secret_help4=secret[3];
- if(i>50) secret_help1+=1;
- i=random(0,100);
- if(i<50) secret_help2+=1;
- i=random(0,100);
- if(i>50) secret_help3+=1;
- i=random(0,100);
- if(i<50) secret_help4+=1;
- if(secret_help1==secret[0] && secret_help2==secret[1] && secret_help3==secret[2] && secret_help3==secret[3]){
- if(random(0,100)>50){
- secret_help1+=1;
- secret_help2+=1;
- secret_help3+=1;
- secret_help4+=1;}
- }
- if(zombieCounter()+HumanCounter()<5){
- x=random(0,100);
- if(x>10) print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
- }else if(zombieCounter()+HumanCounter()<10){
- x=random(0,100);
- if(x>25) print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
- }else if(zombieCounter()+HumanCounter()<15){
- x=random(0,100);
- if(x>30) print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
- }else if(zombieCounter()+HumanCounter()<20){
- x=random(0,100);
- if(x>45) print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
- }else if(zombieCounter()+HumanCounter()<25){
- x=random(0,100);
- if(x>50) print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
- }else if(zombieCounter()+HumanCounter()<30){
- x=random(0,100);
- if(x>60) print_secret_select_help(secret_help1,secret_help2,secret_help3,secret_help4);
- }
- }
- function void print_secret_select_help(int secret_help1, int secret_help2,int secret_help3,int secret_help4){
- SetLineTexture(134,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[secret_help1-1]);
- SetLineTexture(135,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[secret_help2-1]);
- SetLineTexture(136,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[secret_help3-1]);
- SetLineTexture(137,SIDE_FRONT,TEXTURE_MIDDLE,ibmnu_text[secret_help4-1]);
- }
- function int unusedTID(int start, int end)//THIS PART WAS CREATED BY Ijon Tichy
- {
- int ret = start - 1;
- int tidNum;
- if (start > end) { start ^= end; end ^= start; start ^= end; }
- while (ret++ != end){
- if (ThingCount(0, ret) == 0) return ret;
- }
- return -1;
- }
- function int GetHigherCeiling(int tid2) {//THIS PART WAS CREATED BY Ijon Tichy and edited by IBM5155
- int posx=getactorx(tid2);
- int posy=getactory(tid2);
- int posz=GetActorCeilingZ(tid2);//504
- int z=posz+25.0;
- int test=0;
- int tid=unusedTID(1000, 2000);
- spawn("mapspot",posx,posy,z,tid,0);
- while(GetActorCeilingZ(tid)!=0){
- z=z+25.0;//850.0
- thing_remove(tid);
- spawn("mapspot",posx,posy,z,tid,0);
- test++;
- }if(test==0){
- thing_remove(tid);
- z=posz;
- }else{
- thing_remove(tid);
- spawn("mapspot",posx,posy,z-27.0,tid,0);
- z=GetActorCeilingZ(tid);
- thing_remove(tid);
- }return z;
- }
- function int secret_in(int position){
- return secret[position];
- }
- function int sqrt2 (int x){
- int r;
- x = x + 1 >> 1;
- while (x > r)
- x -= r++;
- return r;
- }
- function int ibm_distance (int tid1, int tid2){
- int x, y, z, d;
- x = (GetActorX(tid1) - GetActorX(tid2))/65536;
- y = (GetActorY(tid1) - GetActorY(tid2))/65536;
- z = (GetActorZ(tid1) - GetActorZ(tid2))/65536;
- d = sqrt2( x*x + y*y + z*z );
- return d;
- }
- function void zm09_menu_print(void){
- SETFONT("SMALLFONT");
- 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);
- SETFONT("SMALLFONT");
- 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);
- SETFONT("SMALLFONT");
- 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);
- SETFONT("SMALLFONT");
- 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);
- SETFONT("SMALLFONT");
- 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);
- }
- function int zm09_menu_print_color(int menu_hor){
- if(menu_zm09==menu_hor)
- return("\cf");
- return("\cg");
- }
- function void zm09_update_settings(void){
- int i=0;
- int j=0;
- int input=GetCvar("x_zh_zm09");
- if(input!=0){
- i=input/10;//226
- i=i*10;//2260
- i=input-i;//1
- switch(i){
- case 2: nedm_desactive=false; reflection_actived=false; break;
- case 3: nedm_desactive=true; reflection_actived=false;break;
- case 4: nedm_desactive=false; reflection_actived=true; break;
- default: nedm_desactive=true; reflection_actived=true; break;
- }
- i=input/100;//22
- i=i*10;//220
- j=input/10;//226
- i=j-i;//6
- if(i<1 || i>6) weather_quality=0;
- else weather_quality=i-2;
- i=input/1000;//2
- i=i*10;//20
- j=input/100;//22
- i=j-i;//2
- if(i<2 || i>3) rain_sound=0;
- else rain_sound=i-2;
- i=input/1000;//2
- if(i<2 || i>5) rain_detail=0;
- else rain_detail=i-2;
- }
- if(reflection_actived==true){
- Sector_SetPlaneReflection (153, 44, 0);
- Sector_SetPlaneReflection (149, 66, 0);
- Sector_SetPlaneReflection (3, 44, 0);
- }
- }
- function int hud_resize(void){
- int x=get_screenx();
- int y=get_screeny();
- int output=0;
- if(x<=320) output=0.02;
- if(x<=640) output=0.01;
- return output;
- }
- function int get_screeny(void){
- return getcvar("vid_defheight");
- }
- function int get_screenx(void){
- return getcvar("vid_defwidth");
- }
Advertisement
Add Comment
Please, Sign In to add comment