Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Museum.inf

Entry point routines (lines 1813-1853)

1813  [ Initialise;
1814    location = Foyer; move samples_bag to player;
1815    thedark.short_name = "An odd-smelling darkness";
1816    thedark.initial = GoMothGo;
1817    NormalWorld(); lookmode=2;
1818    SetTime(SUNRISE-10,1);
1819   
1820   "^^^^^Welcome indeed to the...^";
1821  ];
1822   
1823  [ InScope actor;
1824   
1825     if (actor==martha) PlaceInScope(player);
1826     if (actor==player && scope_reason==TALKING_REASON && player in booth)
1827         PlaceInScope(martha);
1828   
1829     if (location==window_w && window_e has light)
1830         ScopeWithin(window_e);
1831     if (location==window_e && window_w has light)
1832         ScopeWithin(window_w);
1833     rfalse;
1834  ];
1835   
1836  [ BeforeParsing i j;
1837    for (i=parse->1,j=2:j<i:j++)
1838    {   wn=j-1;
1839        if (NextWord()=='fly' && NextWord()=='in' && NextWord()=='amber')
1840            parse-->(j*2-1) = 'fly';
1841    }
1842     if (genies_lamp hasnt general) return;
1843     for (wn=1::)
1844     {   switch(NextWordStopped())
1845         {   'white': parse-->(wn*2-3) = 'black';
1846             'black': parse-->(wn*2-3) = 'white';
1847             -1: return;
1848         }
1849     }
1850  ];
1851   
1852  ! --------------------------------------------------------------------------
1853   


Last updated 23 June 2004. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.