#!/usr/local/bin/perl # # talk -- Golem request progam (typically for ``Talking to NPCs'') # Version 1.5 # # Given a golem file location and user supplied message/request, # determine what is the correct page to jump the user to in response. # # This is done by taking the user input `message', simplifing it and # preforming a simple table lookup for the document URL to jump the users # WWW client to in response to the users input. # # Golem (n) : A magically created being, which is able to perform # simple tasks as requested by its maker. # # A Golem created via this program could be... # NPCs: people/monsters the adventurer meets to which can answer very # simple questions (word or two type) or perform a simple task. # Guards: requiring only a password (they are not very talkative) # Locks: needing a key with a particular word or label # Transport: specify a destination for transport # And many other posibilities. # # This cgi script is called from a `message' input form suppling the # location of the talk data file (under the $WWW_DIR directory hardcoded # below) as a QUERY_STRING in the URL call to this cgi-script. The form # itself only requires one string "mesg" element into which the user can # type the request, question, passwd, answer, as required for the # situation. See examples below. # # the location of the ``talk response file'' (minus the $SUFFIX) under the # $WWW_DIR directory, hardcoded below. EG: The location of this # file is "$WWW_DIR/QUERY_STRING$SUFFIX" # # # Example of a form to ``talk to the elf'' # =======8<-------- #