This is the code for the actual level, it needs the engine (also available on 'www.iamafish.f2s.com') which is named 'engine.txt'. The engine should be saved as 'details.pas' and put in a directory, either:
* In the same folder as the WinCrt and other supplied units;
* In the same folder as the code below (which can be saved as any .pas file);
* In a directory where the compiler has been told to look for it (add the file extension on the   OPTIONS, DIRECTORIES..., and Unit Directories).
This game was designed and made by Martin 'Fish' Hutchinson, 2001, and is not copyrighted in any way, shape of form.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you decide to use, amend or distribute this program, I just ask that you mention my name ('Martin "Fish" Hutchinson') as developer, leave this message in full here and also that you E-Mail me telling me what has been done and where on the internet it can be found. I also ask that no costs are charged other than costs of distribution to othere users (without consulting me first to negotiate a cut that is.....).
Thank You.
P.S. This code is quite hard to follow, so if you can't quite follow it, E-Mail me ('[email protected]' or '[email protected]') and I will try to explain how to go about creating your own level.
Copy and paste below line into Pascal to use.
------------------------------------------------------------------------------------------------
{                   Another
       =================================
        |----  -------  ------   |    |
        |         |     |        |    |
        |----     |     ------   |----|
        |         |          |   |    |
        |      -------  ------   |    |
       =================================
                    Product
}
program game;
uses wincrt,wintypes,strings,details;
procedure initialise;
var
loop:integer;
begin
     for loop:=1 to 20 do rooms[loop].varshow:=1;
     continue:='u';
     reinitialise:='n';
     player_damage:=3;
     player_armour:=0;
     counter:=1;
     strcopy(WindowTitle,'Dungeons');
     ScreenSize.X:=90;
     ScreenSize.Y:=30;
     WindowSize.X:=620;
     WindowSize.Y:=500;
     Windoworg.X:=85;
     WindowOrg.Y:=50;
     next_room:=1;
     health:=50;
     current_enemy:=0;
     for loop:=1 to 10 do
     inventory[loop]:=0;
     with rooms[1] do
     begin
          number:=1;
          name:='Cell';
          description1:='Your very own prison cell!';
          description2:='You have only spent one nght here and already you';
          description3:='hate it.';
          var_desc1:='There must be some way out....';
          var_desc2:='You don`t want to spend any longer in here!';
          north:=2;
          nstat:='l';
          west:=0;
          east:=0;
          south:=0;
          item1:=0;
          item2:=0;
          item3:=0;
          search1:=1;
     end;
     with rooms[2] do
     begin    
          number:=2;
          name:='Corridor.';
          description1:='You are stood outside your old cell.  The corridor is';
          description2:='deathly silent, which worries you as you would expect';
          description3:='some guards around....';
          north:=0;
          east:=3;
          south:=1;
          west:=5;
          item1:=0;
          item2:=0;
          item3:=0;
     end;
     with rooms[3] do
     begin
          number:=3;
          name:='Guards Quarters.';
          description1:='An EXTREMELEY smelly room, no-one here....';
          description2:='You wonder how the guards can live in such poor conditions,';
          description3:='this room makes your cell look like the Ritz in comparison!';
          north:=0;
          east:=0;
          south:=4;
          west:=2;
          item1:=0;
          item2:=0;
          item3:=0;
          search1:=2;
     end;
     with rooms[4] do
     begin
          number:=4;
          name:='Wash Room.';
          description1:='This is the wash room for the guards.  There is';
          description2:='lots of dirty water on the floor and a funny odour';
          description3:='coming from a hole you would rather NOT explore!';
          north:=3;
          east:=0;
          south:=0;
          west:=0;
          item1:=6;
          item2:=0;
          item3:=0;
     end;
     with rooms[5] do
     begin
          number:=5;
          name:='Corridor';
          description1:='A very long corridor.  The walls are made of a rough';
          description2:='stone, and there isn`t much light to see by.';
          north:=12;
          nstat:='l';
          east:=2;
          south:=0;
          west:=6;
          item1:=0;
          item2:=0;
          item3:=0;
     end;
     with rooms[6] do
     begin
          number:=6;
          name:='Top of Stairs';
          description1:='You are at the top of some stairs.  There is a door';
          description2:='at the bottom which leads to the torture room.';
          north:=0;
          east:=5;
          south:=7;
          west:=9;
          item1:=0;
          item2:=0;
          item3:=0;
     end;
     with rooms[7] do
     begin
          number:=7;
          name:='Torture Room Door';
          description1:='There is a flight of stairs to the North and the torture';
          description2:='room is East.';
          north:=6;
          east:=0;
          south:=0;
          west:=8;
          wstat:='l';
          item1:=0;
          item2:=0;
          item3:=0;
     end;
     with rooms[8] do
     begin
          number:=8;
          name:='Torture Room';
          description1:='There are hundreds of pieces of torture equipment here.';
          description2:='You cringe when you try to think how they could be used.';
          var_desc1:='There are people manacled to the wall here.';
          var_desc2:='The former victims are now far, far away!';
          north:=0;
          east:=7;
          south:=0;
          west:=0;
          item1:=13;
          item2:=0;
          item3:=0;
          enemy:=4;
     end;
     with rooms[9] do
     begin
          number:=9;
          name:='Prisons';
          description1:='Lots of cages line the walls.';
          description2:='In each cage there are just a few bits of straw, you';
          description3:='almost feel priveleged for being a cell, not a cage!';
          var_desc1:='There are people in the cages begging for help.';
          var_desc2:='The cages are open and empty.';
          north:=0;
          east:=6;
          south:=0;
          west:=10;
          item1:=0;
          item2:=0;
          item3:=0;
     end;
     with rooms[10] do
     begin
          number:=10;
          name:='Outside Jailors Room';
          description1:='It is quieter here, you can only just about hear the screams';
          description2:='from the torture room and the moans from the prisons.  To the';
          description3:='North is the Jailors room...';
          north:=11;
          east:=9;
          south:=0;
          west:=0;
          item1:=0;
          item2:=0;
          item3:=0;
     end;
     with rooms[11] do
     begin
          number:=11;
          name:='Jailors Room';
          description1:='A moderately comfy room where the Jailor takes the';
          description2:='occasional rest and deals with the paperwork regarding';
          description3:='`accidents` to prisoners';
          north:=0;
          east:=0;
          south:=10;
          west:=0;
          item1:=4;
          item2:=0;
          item3:=0;
          enemy:=1;
          search1:=3;
     end;
     with rooms[12] do
     begin
          number:=12;
          name:='Top of Stairs';
          description1:='To the East is the Barracks and to the West is the armoury,';
          description2:='according to a sign placed at these crossroads.';
          north:=17;
          east:=14;
          south:=5;
          west:=13;
          item1:=0;
          item2:=0;
          item3:=0;
     end;
     with rooms[13] do
     begin
          number:=13;
          name:='Armoury';
          description1:='There is a glowing hot anvil here, and many wierd and wonderful';
          description2:='pieces of equipment, including vices, tongs and hammers.';
          north:=0;
          east:=12;
          south:=0;
          west:=0;
          item1:=3;
          item2:=2;
          item3:=11;
          stat3:='h';
          enemy:=2;
     end;
     with rooms[14] do
     begin
          number:=14;
          name:='Outside Barracks';
          description1:='The Officer`s room is North, the Barracks is East';
          description2:='You listen at the door but can`t hear movement, the';
          description3:='Officer must be out at the moment.';
          var_desc1:='The lock on the Officer`s door has something in it....';
          var_desc2:='The Officer`s door is now wide open.';
          north:=15;
          nstat:='l';
          east:=16;
          south:=0;
          west:=12;
          item1:=0;
          item2:=0;
          item3:=0;
     end;
     with rooms[15] do
     begin
          number:=15;
          name:='Officer`s Office';
          description1:='This room looks like heaven compare to the other rooms';
          description2:='you`ve seen around here. There are even some pictures on';
          description3:='the walls.';
          north:=0;
          east:=0;
          south:=14;
          west:=0;
          item1:=12;
          item2:=0;
          item3:=0;
     end;
     with rooms[16] do
     begin
          number:=16;
          name:='Barracks';
          description1:='This is where the soldiers rest, change and eat. Due to this';
          description2:='there is a strong smell of stale sweat in here.';
          north:=0;
          east:=0;
          south:=0;
          west:=14;
          item1:=8;
          item2:=0;
          item3:=0;
          enemy:=3;
     end;
     with rooms[17] do
     begin
          number:=17;
          name:='Main corridor';
          description1:='You are in a section of the main corridor, a sign tells you';
          description2:='that the main entrance is to the North and the supply room ';
          description3:='is to the West.';
          var_desc1:='The door is jammed door to North';
          north:=20;
          nstat:='l';
          east:=0;
          south:=12;
          west:=18;
          item1:=0;
          item2:=0;
          item3:=0;
     end;
     with rooms[18] do
     begin
          number:=18;
          name:='Supply Room Door';
          description1:='This part of the castle shows more neglect than';
          description2:='the rest of the castle, there isn`t a sound to be';
          description3:='heard...';
          var_desc1:='The door has rusted shut here';
          var_desc2:='The door has been opened by yours truly!';
          north:=0;
          east:=17;
          south:=0;
          west:=19;
          wstat:='l';
          item1:=0;
          item2:=0;
          item3:=0;
     end;
     with rooms[19] do
     begin
          number:=19;
          name:='Supply Room';
          description1:='Shelves, shelves and more shelves...!';
          north:=0;
          east:=18;
          south:=0;
          west:=0;
          item1:=9;
          item2:=8;
          item3:=0;
     end;
     with rooms[20] do
     begin
          number:=20;
          name:='Main Entrance Hall';
          description1:='This hall is HUGE! There are ornate statues everywhere';
          description2:='and expensive looking chandeliers are hanging from the';
          description3:='ceiling.';
          north:=21;
          east:=0;
          south:=17;
          west:=0;
          item1:=0;
          item2:=0;
          item3:=0;
     end;
     with rooms[21] do
     begin
          number:=21;
          name:='Outside';
          description1:='Well Done! You`ve finished this demo game!';
          north:=0;
          east:=0;
          south:=20;
          west:=0;
          item1:=0;
          item2:=0;
          item3:=0;
     end;
     with items[0] do
     begin
          number:=0;
          name:='NOTHING';
          description:='Empty Space';
          usage:='i';
          attack_points:=0;
          defend_points:=0;
     end;
     with items[1] do
     begin
          number:=1;
          name:='cell key';
          name2:='key';
          description:='A large, rusty key';
          usage:='k';
          use1:=1;
          use_desc:=('You turn the key in the lock');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[2] do
     begin
          number:=2;
          name:='short sword';
          name2:='sword';
          description:='A very nifty short sword';
          usage:='a';
          attack_points:=5;
          defend_points:=0;
     end;
     with items[3] do
     begin
          number:=3;
          name:='wooden shield';
          name2:='shield';
          description:='A pretty crappy shield';
          usage:='d';
          arm_type:=2;
          attack_points:=0;
          defend_points:=2;
     end;
     with items[4] do
     begin
          number:=4;
          name:='key bunch';
          name2:='keys';
          name3:='bunch';
          description:='A set of keys with the label `prisons`';
          usage:='r';
          use1:=9;
          use_desc:=('You free the prisoners and they open the locked door to the East.');
          attack_points:=0;
          defend_points:=0;
          affects:=5;
     end;
     with items[5] do
     begin
          number:=5;
          name:='dagger';
          description:='A pretty poor specimen of a dagger.';
          usage:='a';
          attack_points:=2;
          defend_points:=0;
     end;
     with items[6] do
     begin
          number:=6;
          name:='soap bar';
          name2:='soap';
          description:='A bar of soap made from finest pig innards.';
          usage:='k';
          use1:=18;
          use_desc:=('You loosen the hinges on the door with the soap');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[7] do
     begin
          number:=7;
          name:='metal shield';
          name2:='shield';
          description:='A fairly sturdy shield.';
          usage:='d';
          arm_type:=2;
          attack_points:=0;
          defend_points:=3;
     end;
     with items[8] do
     begin
          number:=8;
          name:='healing drink';
          name2:='drink';
          name3:='healing';
          description:='A vial containing a murky liquid.';
          usage:='p';
          defend_points:=20;
     end;
     with items[9] do
     begin
          number:=9;
          name:='coat hanger';
          name2:='hanger';
          description:='A wire coat-hanger.';
          usage:='i';
          use1:=13;
          oneuse:='y';
          use_desc:=('You straighten the coat-hanger in the vice.');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[10] do
     begin
          number:=10;
          name:='piece of paper';
          name2:='paper';
          description:='A pretty standard piece of paper';
          usage:='1';
          use1:=14;
          oneuse:='p';
          use_desc:=('You slide the paper under the door....');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[11] do
     begin
          number:=11;
          name:='wire';
          description:='A straightened out coathanger...';
          usage:='2';
          use1:=14;
          use_desc:=('You push the wire into the key-hole and push out the key...');
          use_desc2:=('You pull out the paper, get the key and unlock the door.');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[12] do
     begin
          number:=12;
          name:='torture room key';
          name2:='key';
          description:='An oddly shaped bronze key.';
          usage:='k';
          use1:=7;
          use_desc:=('You unlock the torture room with the key.');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[13] do
     begin
          number:=13;
          name:='manacle key';
          name2:='key';
          description:='A key to unlock the manacles in torture room';
          usage:='r';
          use1:=8;
          affects:=17;
          use_desc:=('You free some of the victims who run off to open the');
          use_desc2:=('jammed door near the supply room.');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[14] do
     begin
          number:=14;
          name:='elephant';
          description:='Well done, you`ve completed this demo game!';
          usage:='i';
          use1:=0;
          use_desc:=('How the.......?');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[15] do
     begin
          number:=15;
          name:='welephant';
          description:='Well done, you`ve completed this demo game!';
          usage:='i';
          use1:=0;
          use_desc:=('How the.......?');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[16] do
     begin
          number:=16;
          name:='chail';
          description:='Well done, you`ve completed this demo game!';
          usage:='i';
          use1:=0;
          use_desc:=('How the.......?');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[17] do
     begin
          number:=17;
          name:='hippo';
          description:='Well done, you`ve completed this demo game!';
          usage:='i';
          use1:=0;
          use_desc:=('How the.......?');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[18] do
     begin
          number:=18;
          name:='turnip';
          description:='Well done, you`ve completed this demo game!';
          usage:='i';
          use1:=0;
          use_desc:=('How the.......?');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[19] do
     begin
          number:=19;
          name:='fiddle';
          description:='Well done, you`ve completed this demo game!';
          usage:='i';
          use1:=0;
          use_desc:=('How the.......?');
          attack_points:=0;
          defend_points:=0;
     end;
     with items[20] do
     begin
          number:=20;
          name:='widdle';
          description:='Well done, you`ve completed this demo game!';
          usage:='i';
          use1:=0;
          use_desc:=('How the.......?');
          attack_points:=0;
          defend_points:=0;
     end;
     with search_items[1] do
     begin
          number:=1;
          name:='straw bed';
          name2:='bed';
          name3:='straw';
          description:='The most uncomfortable bed you`ve slept on';
          item1:=1;
     end;
     with search_items[2] do
     begin
          number:=2;
          name:='chest of drawers';
          name2:='drawer';
          name3:='chest';
          description:='A chest of drawers belonging to the guards';
          item1:=5;
     end;
     with search_items[3] do
     begin
          number:=3;
          name:='desk';
          name2:='drawer';
          description:='The Jailor`s desk, complete with drawers';
          item1:=10;
     end;
     with enemies[1] do
     begin
          number:=1;
          name:='jailor';
          attack:=3;
          defend:=1;
          health:=20;
     end;
     with enemies[2] do
     begin
          number:=2;
          name:='armourer';
          attack:=5;
          defend:=0;
          health:=25;
     end;
     with enemies[3] do
     begin
          number:=3;
          name:='soldier';
          attack:=4;
          defend:=1;
          health:=17;
     end;
     with enemies[4] do
     begin
          number:=4;
          name:='torturer';
          attack:=5;
          defend:=1;
          health:=20;
     end;
end;
begin
     repeat
     initialise;
     main_menu;
     display_screen;
     until (continue='n');
     donewincrt;
end.
Hosted by www.Geocities.ws

1