Room & Dimension

version 1 by Sebastian Rahn

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 2.5 - Printing a normal room

    Map_Location is a room that varies.
    Show map is a truth state that varies.

    Already_Shown is a truth state that varies.

    To say map:
    Change compass to player;
    calculate coordinates;
    say "[If Tmp_Width > 2] A [end if][if Tmp_Width > 3]B [end if][if Tmp_Width > 4]C [end if][if Tmp_Width > 5]D [end if][if Tmp_Width > 6]E [end if][if Tmp_Width > 7]F [end if][if Tmp_Width > 8]G [end if]"; say "[if Tmp_Width > 9]H [end if][if Tmp_Width > 10]I [end if][if Tmp_Width > 11]J [end if][if Tmp_Width > 12]K [end if][if Tmp_Width > 13]L [end if]"; say "[if Tmp_Width > 14]M [end if][if Tmp_Width > 15]N [end if][if Tmp_Width > 16]O [end if][if Tmp_Width > 17]P [end if][if Tmp_Width > 18]Q [end if][if Tmp_Width > 19]R [end if][if Tmp_Width > 20]S [end if]"; say "[if Tmp_Width > 20]T [end if][if Tmp_Width > 21]U [end if][if Tmp_Width > 22]V [end if][if Tmp_Width > 23]W [end if][if Tmp_Width > 24]X [end if][if Tmp_Width > 25]Y [end if][if Tmp_Width > 26]Z [end if]";
    say conditional paragraph break;
    Choose row with Sector Room of the location of Compass in Table 997;
    Change Table_Location to Table Entry;
    Change Map_Location to Sector Room Entry;
    repeat with X running from 1 to tmp
    begin;
    Choose row X in Table_Location;
    say Number Entry;
    pick sector 1 and X in Map_Location;
    If Number Entry < 10
    begin;
    If Tmp_Picked is player, say " ";
    If Tmp_Picked is not a person, say " ";
    end if;
    repeat with Y running from 1 to tmp_Width
    begin;
    pick sector Y and X in Map_Location;
    Change Compass to tmp_Picked;
    If Y is 1
    begin;
    If Compass is None
    begin;
    say "[second custom style].[roman type]";
    Change Already_Shown to true;
    end if;
    If Compass is player
    begin;
    If Looking Direction of compass is Face North, say "[second custom style]^[roman type]";
    If Looking Direction of compass is Face West, say "[second custom style]<[roman type]";
    If Looking Direction of compass is Face East, say "[second custom style]>[roman type]";
    If Looking Direction of compass is Face South, say "[second custom style]v[roman type]";
    Change Already_Shown to true;
    end if;
    end if;
    If Y is not 1
    begin;
    If Y is not tmp_Width
    begin;
    If X is not 1
    begin;
    If X is not tmp
    begin;
    If Compass is -Wall
    begin;
    say " [second custom style]-[roman type]";
    Change Already_Shown to true;
    end if;
    end if;
    end if;
    end if;
    end if;
    If Y is tmp_Width
    begin;
    If Compass is None
    begin;
    say " [second custom style].[roman type]";
    Change Already_Shown to true;
    end if;
    If Compass is |Wall
    begin;
    say " [Avatar]";
    Change Already_Shown to true;
    end if;
    end if;
    If Already_Shown is false, say "[Avatar]";
    Change Already_Shown to false;
    end repeat;
    say conditional paragraph break;
    end repeat;
    say line break.