Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Adventureland.inf

Other entry point routines (lines 738-782)

738  [ Initialise;
739    location=Forest; score = 0;
740   
741    StartDaemon(chiggers);
742   
743    "^^^^^A voice booms out ...^
744    Treasures have an * in their name. Say 'SCORE'^
745    If you need a hint on something, try 'HELP'.^";
746  ];
747   
748  [ TimePasses i;
749    if (location ~= Inside_Stump) rfalse;
750   
751    score=0;
752    objectloop (i in Inside_Stump && i ofclass Treasure)
753        score = score + i.depositpoints;
754   
755    if (score ~= 100) rfalse;
756   
757    deadflag=2;
758    "Congratulations! By finding and depositing all 13 *TREASURES*, you 
759     have solved Scott Adams's ~Adventureland~ and it remains only to say 
760     that...";
761  ];
762   
763  [ AfterLife;
764     if (deadflag==3) { deadflag=1; rfalse; }
765     remove chigger_bites; remove infected_bites;
766     deadflag=0; PlayerTo(Misty_Room);
767  ];
768   
769  [ PrintRank; "."; ]; 
770   
771  [ DarkToDark;
772    if (dark_warning==0)
773    {   dark_warning=1; "It is now pitch dark. 
774                         If you proceed you will likely fall into a pit.";
775    }
776    if (random(4) == 1)
777    {   deadflag=1;
778        "You fell into a pit and broke every bone in your body!";
779    }
780    rfalse;
781  ];
782   


Last updated 23 June 2004. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.