( SPACEBALLS--The Exit Messager 9/15/95 by Ginger ) ( ) ( When you set up an environment room, the first thing you do is ) ( open an exit called ne;nw;se;sw;south;north;east;west and ) ( set up the messages people see when they 'bump into the walls' ) ( of your buildings and use exits that don't exist. This program ) ( will allow you to set up those messages without creating an env ) ( room for them, as well as to have different messages for each of ) ( your rooms. ) ( ) ( Exits supported: ) ( n s e w ne nw se sw u d up down fly sky dig burrow ) ( north south east west northeast southeast northwest southwest ) ( ) ( To set the messages: [The Easy Way] ) ( For "up" fake exits: ) ( @udesc here= @ufail here= @uofail here= ) ( For "down" fake exits: ) ( @ddesc here= @dfail here= @dofail here= ) ( For cardinal direction fake exits [east, west]: ) ( @edesc here= @efail here= @eofail here= ) ( Those unfamiliar with @messages should type 'help @desc' as well ) ( as 'help @fail' and 'help @ofail'. ) ( [The Hard Way] ) ( For up messages, set the _/ufl and _/uofl props on the room. ) ( For down messages, set the _/dfl and _/dofl properties, and for ) ( all other messages, set the _/efl and _/eofl properties. ) ( For the desc messages, use _/ude [up], _/dde[down], and _/ede. ) ( ) ( The user's name is prepended to the omessages, and all messages ) ( are run through the MPI parser and pronoun-subbed as well. If ) ( there is no omessage set, nothing will be shown to others [this ) ( is the default]. ) lvar obj lvar obj2 lvar mesg lvar prop lvar omesg lvar room lvar oprop : help "SPACEBALLS--The Exit Messager 9/15/95 by Ginger@FurToonia" .tell " " .tell " Allows you to have specialised descriptions/fail&ofail messages" .tell "for the cardinal directions that don't exist in a room--taking the" .tell "place of the 'n;s;w;e;north;south....' exit in an environment room." .tell "Searches up the environment tree for messages when someone tries to" .tell "go in a direction (i.e., north) that doesn't really exist." .tell " To use:" .tell "False Exit Type | Message | Syntax" .tell " Up;u | @desc | @udesc here=" .tell " | @fail | @ufail here=" .tell " | @ofail | @uofail here=" .tell " Down;d | @desc | @ddesc here=" .tell " | @fail | @dfail here=" .tell " | @ofail | @dofail here=" .tell " Cardinal Direction | @desc | @edesc here=" .tell " (east,west,ne,s) | @fail | @efail here=" .tell " | @ofail | @eofail here=" .tell " " .tell "Please @view #" prog intostr strcat " for further info." strcat .tell ; : addmyname dup "'" stringpfx if me @ name swap strcat else me @ name " " strcat swap strcat then ; : show_desc loc @ prop @ envpropstr swap pop "" stringcmp 0 = if "You see that you cannot go that way." else loc @ prop @ envpropstr pop prop @ "looks" 0 parseprop me @ swap pronoun_sub then .tell ; : show_mesg command @ "{up|u|fly|sky}" smatch if "_/ufl" prop ! "_/uofl" oprop ! else command @ "{down|d|dig|burrow}" smatch if "_/dfl" prop ! "_/dofl" oprop ! else "_/efl" prop ! "_/eofl" oprop ! then then loc @ prop @ envpropstr swap pop "" stringcmp 0 = if "I don't think you can go that way." else loc @ prop @ envpropstr pop prop @ "goes" 0 parseprop me @ swap pronoun_sub then .tell loc @ oprop @ envpropstr swap pop "" stringcmp 0 = not if loc @ oprop @ envpropstr pop oprop @ "goes" 0 parseprop addmyname me @ swap pronoun_sub loc @ swap me @ swap notify_except then ; : set_mesg obj @ match dup #-1 dbcmp if "I don't see that here." .tell exit then dup #-2 dbcmp if "I don't know which one you mean." .tell exit then dup owner me @ dbcmp me @ "wizard" flag? or not if "You don't own that." .tell exit then dup room? not if command @ " doesn't make sense on anything but a room." strcat .tell exit then obj ! obj @ prop @ mesg @ 1 addprop prop @ " set." strcat .tell exit ; : main dup "" stringcmp 0 = if pop show_mesg exit then dup "#h" stringpfx if pop help exit then dup dup "{east|west|north|south|e|w|n|s|ne|nw|se|sw}" smatch swap "{northeast|northwest|southeast|southwest}" smatch or if "_/ede" prop ! show_desc exit then dup "{up|u|fly|sky}" smatch if "_/ude" prop ! show_desc exit then dup "{d|down|dig|burrow}" smatch if "_/dde" prop ! show_desc exit then dup "=" instr dup 0 = if pop "Set it on what?" .tell exit then strcut mesg ! dup strlen 1 - strcut pop obj ! command @ "@" stringpfx not if show_mesg exit then command @ "@efail" stringcmp 0 = if "_/efl" prop ! set_mesg exit then command @ "@eofail" stringcmp 0 = if "_/eofl" prop ! set_mesg exit then command @ "@edesc" stringcmp 0 = if "_/ede" prop ! set_mesg exit then command @ "@ufail" stringcmp 0 = if "_/ufl" prop ! set_mesg exit then command @ "@uofail" stringcmp 0 = if "_/uofl" prop ! set_mesg exit then command @ "@udesc" stringcmp 0 = if "_/ude" prop ! set_mesg exit then command @ "@dfail" stringcmp 0 = if "_/dfl" prop ! set_mesg exit then command @ "@dofail" stringcmp 0 = if "_/dofl" prop ! set_mesg exit then command @ "@ddesc" stringcmp 0 = if "_/dde" prop ! set_mesg exit then ;