//Revengeon - Blood Forest //ZDoom ACS Scripts //By Mark McDole // ---------------------------------------- // ---------------------------------------- // Notes: //line tags: //1,2 - Red end to mid blood tele //3,4 - Red beginning to mid blood tele //5,6 - Yellow beginning to mid tele //7,8 - yellow mid to end tele //9,10 - blue beginning to mid tele //11,12 - blue mid to end tele // ---------------------------------------- // ---------------------------------------- // #include "common.acs" #include "zcommon.acs" //Red Path Variables int pumps = 0; //for the 4 pump station switches int pumpstop = 0; //for pump station gate text int rivergate = 0; //this is for the red path gate that leads to the area before caco batle int targetorder[4] = { 1, 2, 1, 3 }; //target array for bookshelf puzzle int playerinput[4] = { 9, 9, 9, 9 }; //array for bookshelf player input int cacohive = 0; //checks if player has left caco hive //Blue Path Variables int bluefortgate = 0; //For gate text on first blue path fort int fireswitch = 0; //For turning off fireplace in Blue Path First Fort int axe = 0; //for the axe int tricandle = 0; int woodsgate = 0; //Controls text for winding woods int templeswitchcount = 0; int templetarget[9] = { 1, 1, 1, 1, 2, 2, 2, 1, 1 }; //target array for temple defile int templeinput[9] = { 9, 9, 9, 9, 9, 9, 9, 9, 9 }; //input array for temple defile int templedefiled = 0; //prevents multiple defilings int darkwoodtotal = 0; //this and the 6 below are for the dark forest cursed stones int darkwood1 = 0; int darkwood2 = 0; int darkwood3 = 0; int darkwood4 = 0; int darkwood5 = 0; int darkwood6 = 0; //Yellow Path Variables int cabinswitch = 0; //for gate gate text int caveswitchcount = 0; int castlebridge = 0; //for castle bridge barrier text int castlegate = 0; //for castle gate text //General Variables int BluePathCount = 0; //these are for the beginning of each path, so it only autosaves on your first time through int RedPathCount = 0; int YellowPathCount = 0; int endused = 0; //these are for lowering the colored bars at the end int yellowused = 0; int redused = 0; int blueused = 0; // ---------------------------------------- // ---------------------------------------- // Scripts: script 1 (void) { Floor_LowerToLowest (55, 64); Autosave(); } script 2 (int bookpressed) //Red Path, CATHEDRAL bookshelf puzzle { playerinput[0] = playerinput[1]; playerinput[1] = playerinput[2]; playerinput[2] = playerinput[3]; playerinput[3] = bookpressed; if(playerinput[0] == targetorder[0] && playerinput[1] == targetorder[1] && playerinput[2] == targetorder[2] && playerinput[3] == targetorder[3]) { Print(s:"\cgEnjoy the slaughter"); Floor_LowerToLowest (152, 64); } else { if(bookpressed == 1) { Print(s:"\cg1. Take the soul sphere"); } if(bookpressed == 2) { Print(s:"\cg2. Remove the blood from the Yin Yang"); } if(bookpressed == 3) { Print(s:"\cg3. Defeat the gatekeepers"); } } } script 3 (void) //yellow path, TWISTED FOREST walk over { //Floor_LowerToLowest (28, 96); //not needed after switching to thing activate instead of lowering floor Thing_Activate (4); //starts demon swarm } script 4 (void) //Blue path, BLOOD GROTTO switch { Print(s:"\chThe Winding Woods are unlocked"); Floor_LowerToLowest (14, 16); woodsgate = woodsgate +1; NoiseAlert (0,0); Autosave(); } script 5 OPEN //COLORS, runs on open { Light_Glow (209, 152, 136, 2); //flickering light on yellow path first fort Sector_SetColor(82, 0, 0, 200); //water color sector Sector_SetColor(151, 150, 150, 255); //blue torches Sector_SetColor(51, 150, 150, 255); //blue light on lowering crypt bars Sector_SetColor(85, 150, 150, 255); //blue light on first fort transfer heights part Sector_SetColor(168, 255, 240, 150); //yellow light Sector_SetColor(182, 255, 240, 150); //yellow light on cave tele sector Sector_SetColor(176, 255, 240, 150); //yellow light cave secret Light_Glow (176, 152, 144, 3); //flickering light on cave secrets Sector_SetColor(192, 255, 200, 200); //red light CreateTranslation (202, 192:207=172:191, 240:247=184:191); //demon offering colors Thing_SetTranslation (202,202); CreateTranslation (177, 112:127=96:111); //indigo Scripted Marine colors CreateTranslation (167, 112:127=64:79); //brown scripted marine colors CreateTranslation (78, 112:127=240:247); //black Scripted Marine colors CreateTranslation (155, 112:127=80:111); //white scripted marine colors CreateTranslation (210, 112:127=160:167); //roof marine scripted colors Thing_SetTranslation (177,177); Thing_SetTranslation (78,78); Thing_SetTranslation (167,167); Thing_SetTranslation (155,155); Thing_SetTranslation (210,210); CreateTranslation (156, 112:127=[255, 127, 27]:[255, 234, 0]); //yellow torch Thing_SetTranslation (156,156); } script 6 (void) //Red Path, First room candle switch { Floor_LowerToLowest (24, 16); Light_Fade (83, 208, 16); } script 7 (void) //Red Path, CACO SWARM switch { Print(s:"\cgThe Cacodemons are swarming!"); Floor_LowerToLowest (34, 16); Autosave(); } script 8 (void) //yellow end { if (checkinventory ("yellowcard")) //checks if player has yellow card { if(yellowused==0) { Floor_LowerToLowestTxTy (128, 32); Floor_LowerToLowest (86, 128); //lowers teleporter to mid-point yellowused = yellowused + 1; endused = endused + 1; Light_Fade (157, 160, 16); Autosave(); if(endused==3) { ACS_Execute (41, 0, 0, 0, 0); } else { Print(s:"\ckYellow switch activated"); } } } else { print (s:"\ckyou need the yellow key"); } } script 9 (void) //red end { if (checkinventory ("redcard")) //checks if player has red card { if(redused==0) { Floor_LowerToLowestTxTy (129, 32); Floor_LowerToLowest (46, 128); //lowers teleporter to mid-point redused = redused + 1; endused = endused + 1; Light_Fade (158, 160, 16); Autosave(); if(endused==3) { ACS_Execute (41, 0, 0, 0, 0); } else { Print(s:"\cgRed switch activated"); } } } else { print (s:"\cgyou need the red key"); } } script 10 (void) //blue end { if (checkinventory ("bluecard")) //checks if player has blue card { if(blueused==0) { Floor_LowerToLowestTxTy (130, 32); //lowers colored bar, changes texture to grass Floor_LowerToLowest (45, 128); //lowers teleporter to mid-point blueused = blueused + 1; endused = endused + 1; Light_Fade (159, 160, 16); Autosave(); if(endused==3) { ACS_Execute (41, 0, 0, 0, 0); } else { Print(s:"\chBlue switch activated"); } } } else { print (s:"\chyou need the blue key"); } } script 11 (void) //yellow path, cabin switch { Floor_LowerToNearest (17, 64); //releases lost souls and opens main gate Floor_LowerToNearest (177, 1); //lowers basement bars slowly Print(s:"\ckThe cabin is under attack!"); cabinswitch = cabinswitch +1; Autosave(); } script 12 (void) //yellow path, sky caco switch { Floor_LowerToLowest (16, 64); Print(s:"\ckThe other side is opened"); Thing_Activate (60); Autosave(); } script 13 (void) //yellow path, SUPER shotty pickup { Floor_LowerToLowest (40, 64); Floor_RaiseByValue (180, 128, 16); Floor_RaiseByValue (240, 128, 32); Print(s:"\ckSlay the Pain Elemental to proceed"); Autosave(); } script 14 (void) //yellow path, CAVE switch { caveswitchcount = caveswitchcount + 1; Floor_LowerToLowest (38, 16); Floor_LowerToNearest (170, 64); Print(s:"\ckA way forward is unlocked in the other cave"); Thing_Activate (173); Autosave(); } script 15 (void) //yellow path, TWISTED FOREST switch { Floor_LowerToLowest (6, 128); //starts imps swarm Thing_Activate (16); //wakes cacodemons Thing_Activate (7); //wakes imps Print(s:"\ckYou disabled the machine"); Autosave(); } script 16 (void) //blue path, PLASMA GUN pickup { Print(s:"\chProceed to the Temple"); Floor_LowerToLowest (59, 64);//opens winding woods Autosave(); } script 17 (void) //Blue Path, CRYPT bookcase { Print(s:"\chIf you've come this far, perhaps you'll go a little further"); } script 18 (void) //Blue Path, west TEMPLE Switch { templeswitchcount = templeswitchcount + 1; if(templeswitchcount==2) { Print(s:"\chThe temple gate is opened"); autosave(); } else { Print(s:"\chGo to the other side"); } Floor_LowerToLowest (44, 64); Thing_Activate (14); } script 19 (void) //Blue Path, east TEMPLE Switch { templeswitchcount = templeswitchcount + 1; if(templeswitchcount==2) { Print(s:"\chThe temple gate is opened"); autosave(); } else { Print(s:"\chGo to the other side"); } Floor_LowerToLowest (47, 64); Thing_Activate (15); } script 20 (void) //Red Path, start PUMP STATION switch { Autosave(); Print(s:"\cgThe Pump Station is activated"); Floor_LowerToLowestTxTy (5, 32); //opens pump station etc Floor_LowerToLowest (137, 64); //lowers Right caco pump Floor_LowerToLowest (155, 64); //lowers Left caco pump Generic_Crusher (71, 16, 16, 0, 0); //starts station door pump Left delay (16); Generic_Crusher (163, 16, 16, 0, 0); //starts station door pump Right } script 21 (void) //start down BLUE PATH { if(BluePathCount==0) { Autosave(); } Print(s:"\chThe Blue Path"); BluePathCount = BluePathCount + 1; } script 22 (void) //start down RED PATH { Print(s:"\cgThe Red Path"); if(RedPathCount==0) { Autosave(); } RedPathCount = RedPathCount + 1; } script 23 (void) //start down YELOW PATH { Print(s:"\ckThe Yellow Path"); if(YellowPathCount==0) { Autosave(); } YellowPathCount = YellowPathCount + 1; } script 24 (void) //red path, PUMP STATION lower bars switch { pumpstop = pumpstop +1; //disables gate text Print(s:"\cgPump station deactivated"); Floor_LowerToLowest (23, 32); //opens gate ceiling_crushstop (71); //tops main pumps ceiling_crushstop (163); plat_stop (78); //stops secondary pumps plat_stop (137); plat_stop (155); plat_stop (191); Autosave(); } script 25 (void) //red path, pre-CATHEDRAL switch { Print(s:"\cgA new passage has opened above"); Floor_LowerToLowest (29, 105); Autosave(); } script 26 (void) //yellow path, open CASTLE BRIDGE { Print(s:"\ckThe bridge is opened"); Floor_LowerToLowest (90, 64); castlebridge = castlebridge +1; Autosave(); } script 27 (int eyepress) //blue path, TEMPLE central switches { templeinput[0] = templeinput[1]; templeinput[1] = templeinput[2]; templeinput[2] = templeinput[3]; templeinput[3] = templeinput[4]; templeinput[4] = templeinput[5]; templeinput[5] = templeinput[6]; templeinput[6] = templeinput[7]; templeinput[7] = templeinput[8]; templeinput[8] = eyepress; if (templedefiled == 0) { if (eyepress == 1) { Print(s:"\chFront"); } else { Print(s:"\chBack"); } } if(templeinput[0] == templetarget[0] && templeinput[1] == templetarget[1] && templeinput[2] == templetarget[2] && templeinput[3] == templetarget[3] && templeinput[4] == templetarget[4] && templeinput[5] == templetarget[5] && templeinput[6] == templetarget[6] && templeinput[7] == templetarget[7] && templeinput[8] == templetarget[8] && templedefiled == 0) { Print(s:"\chYou have defiled the temple!"); Floor_LowerToLowest (49, 64); Thing_Activate (165); //alerts post temple bosses templedefiled = templedefiled +1; Autosave(); } } script 28 (void) //blue path, SMALL FORT switch { Print(s:"\chThe forest winds deeper"); Floor_LowerToLowest (2, 32); Autosave(); } script 29 (void) //yellow path, CASTLE outside switch 1 { Print(s:"\ckNow you must escape from the castle"); Floor_LowerToLowest (70, 32); Autosave(); } script 30 (void) //enter cave area, lower mid-point tele and stairs, release demons { Floor_LowerToLowest (180, 128); Floor_LowerToLowest (240, 128); Floor_LowerToLowest (133, 64); Floor_LowerToLowest (183, 128); } script 31 (void) //yellow path, CAVE walk line { if(caveswitchcount==1) { caveswitchcount = caveswitchcount +1; Floor_LowerToLowest (61, 64); } } script 32 (void) //yellow path, CASTLE gate switch { Print(s:"\ckThe castle gate is opened"); castlegate = castlegate +1; Floor_LowerToLowest (62, 32); Autosave(); } script 33 (void) //Yellow Path, CASTLE outside switch 2 { Floor_LowerToLowestTxTy (76, 32); //opens spiral staircase and releases cacos Floor_LowerByValue (110, 64, 128); //opens tree cage Floor_RaiseByValue (148, 64, 64); //raise monsters } script 34 (void) //Darkwood stone 1 { if(darkwood1==0) { darkwood1 = darkwood1 + 1; darkwoodtotal = darkwoodtotal + 1; Floor_LowerToLowestTxTy (115, 16); if (darkwoodtotal==6) { Print(s:"\chThe Crypt is opened"); Floor_LowerToLowest (51, 64); Autosave(); } if (darkwoodtotal > 0 && darkwoodtotal < 5) { Print(s:"\ch", d:6 - darkwoodtotal, s:" remain"); } if (darkwoodtotal == 5) { Print(s:"\chOnly 1 remains"); } } } script 35 (void) //Darkwood stone 2 { if(darkwood2==0) { darkwood2 = darkwood2 + 1; darkwoodtotal = darkwoodtotal + 1; Floor_LowerToLowestTxTy (116, 16); if (darkwoodtotal==6) { Print(s:"\chThe Crypt is opened"); Floor_LowerToLowest (51, 64); Autosave(); } if (darkwoodtotal > 0 && darkwoodtotal < 5) { Print(s:"\ch", d:6 - darkwoodtotal, s:" remain"); } if (darkwoodtotal == 5) { Print(s:"\chOnly 1 remains"); } } } script 36 (void) //Darkwood stone 3 { if(darkwood3==0) { darkwood3 = darkwood3 + 1; darkwoodtotal = darkwoodtotal + 1; Floor_LowerToLowestTxTy (117, 16); if (darkwoodtotal==6) { Print(s:"\chThe Crypt is opened"); Floor_LowerToLowest (51, 64); Autosave(); } if (darkwoodtotal > 0 && darkwoodtotal < 5) { Print(s:"\ch", d:6 - darkwoodtotal, s:" remain"); } if (darkwoodtotal == 5) { Print(s:"\chOnly 1 remains"); } } } script 37 (void) //Darkwood stone 4 { if(darkwood4==0) { darkwood4 = darkwood4 + 1; darkwoodtotal = darkwoodtotal + 1; Floor_LowerToLowestTxTy (118, 16); if (darkwoodtotal==6) { Print(s:"\chThe Crypt is opened"); Floor_LowerToLowest (51, 64); Autosave(); } if (darkwoodtotal > 0 && darkwoodtotal < 5) { Print(s:"\ch", d:6 - darkwoodtotal, s:" remain"); } if (darkwoodtotal == 5) { Print(s:"\chOnly 1 remains"); } } } script 38 (void) //Darkwood stone 5 { if(darkwood5==0) { darkwood5 = darkwood5 + 1; darkwoodtotal = darkwoodtotal + 1; Floor_LowerToLowestTxTy (119, 16); if (darkwoodtotal==6) { Print(s:"\chThe Crypt is opened"); Floor_LowerToLowest (51, 64); Autosave(); } if (darkwoodtotal > 0 && darkwoodtotal < 5) { Print(s:"\ch", d:6 - darkwoodtotal, s:" remain"); } if (darkwoodtotal == 5) { Print(s:"\chOnly 1 remains"); } } } script 39 (void) //Darkwood stone 6 { if(darkwood6==0) { darkwood6 = darkwood6 + 1; darkwoodtotal = darkwoodtotal + 1; Floor_LowerToLowestTxTy (120, 16); if (darkwoodtotal==6) { Print(s:"\chThe Crypt is opened"); Floor_LowerToLowest (51, 64); Autosave(); } if (darkwoodtotal > 0 && darkwoodtotal < 5) { Print(s:"\ch", d:6 - darkwoodtotal, s:" remain"); } if (darkwoodtotal == 5) { Print(s:"\chOnly 1 remains"); } } } script 40 (void) //Blue path, Crypt approach { if(darkwoodtotal!=6) { Print(s:"\chSink all 6 cursed stones to open the crypt."); } } script 41 (void) //All three keys used script (called by scripts 8,9,10) { print (s:"you have used all 3 keys!"); Floor_LowerToLowest (171, 128); //lowers stuff in map Floor_LowerToLowest (7, 32); //lowers bars to exit endused = endused + 1; floor_raisetonearest (108, 128); //cathedral marine raise } script 42 ENTER //gives player ammo at start of map { if (CheckInventory("backpack") == 0) { GiveInventory("backpack",1); } if (CheckInventory("shotgun") == 0) { GiveInventory("shotgun",1); } if (CheckInventory("chaingun") == 0) { GiveInventory("chaingun",1); } while (CheckInventory("clip") < 200) { GiveInventory("clip",5); } while (CheckInventory("shell") < 50) { GiveInventory("shell",2); } } script 43 (void) //cathedral roof lift { Plat_DownWaitUpStayLip (134, 64, 105, 0, 0); Plat_DownWaitUpStayLip (135, 64, 105, 0, 0); } script 44 (void) //Yellow: Leaving castle { Floor_LowerByValue (109, 64, 128); //opens tree cage Floor_RaiseByValue (147, 64, 64); //raise chaingunners } script 45 (void) //Blue path First Fort fire switches { fireswitch = fireswitch +1; if (fireswitch == 2) { Print(s:"\chThe fireplace is opened"); floor_lowertolowest (166, 64); Light_Fade (73, 128, 16); } } script 46 (void) //blue, CRYPT Caco death { Floor_LowerToLowest (53, 64); Floor_RaiseByValue (153, 64, 64); //raise final CRYPT room monsters } script 47 (int basementbooks) //red path BASEMENT books { if (basementbooks == 1) { Print(s:"\cgA powerful artifact is hidden at the top of the cathedral"); } else { Print(s:"\cg1 2 1 3 Will set you free"); } } script 48 (void) //red path CATHEDRAL Barons { if (ThingCount (T_BARON, 215) == 0) { Floor_LowerToLowest (154, 64); } } script 49 (void) //Red path open chaingunner bridge switch { floor_lowertolowest (25, 8); //lowers vine wall floor_lowertolowest (210, 64); //lowers switch autosave(); delay(10); ChangeFloor(210, "BLOOD1"); } script 50 (void) //unused (formerly Pump station L caco) { } script 51 (void) //Blue path first fort gate text { if (bluefortgate == 0) { Print(s:"\chThis gate is opened elsewhere in this room"); } } script 52 (void) // Blue path first fort gate LOWER { bluefortgate = bluefortgate +1; floor_LowerToLowestTxTy (3, 16); autosave(); } script 53 (int templeHINT) //Blue path, TEMPLE hints { if (templeHINT == 1) { Print(s:"\ch4, 3, 2"); } if (templeHINT == 2) { Print(s:"\chFront back front"); } } script 54 (int dialog) //blue first room concealed area { Thing_Activate (13); SetLineTexture(190, SIDE_FRONT, TEXTURE_MIDDLE, "-"); } script 55 (void) // Blue, Winding Woods gate text { if (woodsgate == 0) { Print(s:"\chThis gate is opened in the Blood Grotto"); } } script 56 (void) //red, CACO HIVE retreat door { if (cacohive == 0) { print (s:"\cgThe door is jammed."); } else { Door_Raise (0, 64, 105); } } script 57 (void) //red, CACO HIVE retreat door { cacohive = cacohive +1; floor_lowertolowest (68, 64); floor_raisebyvalue (186, 64, 104); } script 58 (void) //Yellow path, CASTLE gate text { if (castlegate == 0) { Print(s:"\ckThe castle gate is opened elsewhere"); } } script 59 (void) //Yellow path first gate text { if (cabinswitch == 0) { Print(s:"\ckThis gate is opened from inside the cabin"); } } script 60 (void) //Red Path CACO HIVE death checker { if (ThingCount (T_CACODEMON, 206) == 0) { floor_lowertolowest (205, 64); } } script 61 (void) //yellow FIRST FORT secret { Plat_DownWaitUpStayLip (208, 64, 105, 0); Light_Stop (209); light_changetovalue (209, 128); delay (10); light_changetovalue (209, 152); light_glow (209, 152, 136, 2); } script 62 (void) //RED: pump station gate line { if (pumpstop == 0) { print (s:"\cgThis gate is lowered elsewhere"); } } script 63 (void) //Red path, opens fort thats right before caco battle { floor_lowertolowest (230, 8); ceiling_lowerbyvalue (232, 32, 96); } script 64 (void) //RED: pre-caco battle gate line { if (rivergate == 0) { print (s:"\cgThis gate is opened elsewhere"); } } script 65 (void) //RED: opens blood river { floor_lowertolowest (204, 64); rivergate = rivergate +1; } script 66 (void) // Unused { } script 67 (int candle) //BLUE: blood grotto entrance candles { if (candle == 1) { thing_remove (233); Light_Fade (236, 144, 8); tricandle = tricandle +1; } if (candle == 2) { thing_remove (234); Light_Fade (237, 144, 8); tricandle = tricandle +1; } if (candle == 3) { thing_remove (235); Light_Fade (238, 144, 8); tricandle = tricandle +1; } if (tricandle == 3) { Floor_LowerToLowest (15, 32); Print(s:"\chThe Blood Grotto is revealed"); autosave(); } } script 68 (void) // Red path BALANCE ROOM raise posts { if (ThingCount (T_CACODEMON, 135) == 0 && ThingCount (T_IMP, 136) == 0) { Floor_raisebyvalue (108, 16, 64); Floor_raisebyvalue (126, 16, 80); Floor_raisebyvalue (127, 16, 96); Floor_raisebyvalue (131, 16, 112); Floor_raisebyvalue (132, 16, 128); Floor_raisebyvalue (134, 16, 144); ChangeFloor(108, "RROCK09"); ChangeFloor(126, "RROCK09"); ChangeFloor(127, "RROCK09"); ChangeFloor(131, "RROCK09"); ChangeFloor(132, "RROCK09"); ChangeFloor(134, "RROCK09"); } } Script 69 (void) { if (caveswitchcount == 0) { Print(s:"\ckThis gate is opened elsewhere"); } } script 70 (void) { if (castlebridge == 0) { Print(s:"\ckThis barrier is lowered elsewhere"); } } Script 71 (void) //pump switch 1 { pumps = pumps +1; Plat_PerpetualRaiseLip (78, 32, 8, 0); if (pumps == 4) { floor_lowertolowest (190, 64); thing_activate (200); Print(s:"\cgThe Pump Station is opened"); } } script 72 (void) //pump switch 2 (R Caco) { pumps = pumps +1; floor_raisebyvalue (137, 64, 224); delay (30); Plat_PerpetualRaiseLip (137, 32, 8, 0); if (pumps == 4) { floor_lowertolowest (190, 64); thing_activate (200); Print(s:"\cgThe Pump Station is opened"); } } script 73 (void) //pump switch 3 (L Caco) { pumps = pumps +1; floor_raisebyvalue (155, 64, 224); delay (30); Plat_PerpetualRaiseLip (155, 32, 8, 0); if (pumps == 4) { floor_lowertolowest (190, 64); thing_activate (200); Print(s:"\cgThe Pump Station is opened"); } } Script 74 (void) //pump switch 4 { pumps = pumps +1; Plat_PerpetualRaiseLip (191, 32, 8, 0); if (pumps == 4) { floor_lowertolowest (190, 64); thing_activate (200); Print(s:"\cgThe Pump Station is opened"); } } Script 75 (void) //axe pickup script { if (axe == 0) { axe = axe +1; floor_lowertolowest (201, 128); ChangeFloor(201, "RROCK19"); Print(s:"\chYou pick up the axe"); } } // ---------------------------------------- // Strings: