
RTSoft REF Script Examples!
---
Included with this archive are three of Seth's original, first party REF
scripts. I've included these with the author's permission as they serve as
perfect examples of both the use and, being from Seth himself, the intention
behind REF script. Plus, I was too lazy to write my own. *shrug*



RTNEWS02.REF (included in RTREAD02.ZIP)
---
The Bloody Claw Newsletter Issue 2.

Included with the original RTReader, this REF script served as the primary
demonstration of REF script's capabilities and includes examples of quite a few
of its commands and features:

* REF's chaotic allowance of comments *everywhere*
* The @SHOW command for display text and ANSI art
* Lots of examples of using labels for program flow.
* A rare example of the NPC chat system!
* Use of input and variables for a simple guessing game.
* Lots of use of variables, including randomization.
* A simple madlibs type game complete with some insane Seth Robinson humor.
* Saving and loading variables to text files to use them as "data" files.
* The @CHOICE command is used quite a bit.
* Using the @DISPLAY command to display library files via headers (by calling
  them in the script itself, interestingly!)
* The @SHOW SCROLL reader.
* The "newsletter" overall, is a nice example of a diskmag or e-mag.

No modification required to run in REFDoor, though I'd recommended removing
@NOCHECK if running in memory mode on 90s era machines.



RTWALL.REF (included in RTWALL.ZIP)
---
The RT Wall

Seth's first standalone REF script release for RTReader seems to have been
made mostly to serve as a more practical example of REF script. It includes:

* More chaotic comment usage. Seth loved this stuff.
* Use of variables to work as if constants, setting door parameters.
* Lots of file usage, including checking if a file exists, writing to a file,
  and using the @DO TRIM file command.
* Lots of string manipulation, including determining a string's length without
  color codes, checking strings for numbers, and replacing words in strings.
* Displaying random strings!
* Overall a nice example of a simple utility door.

No modification required to run in REFDoor, though I'd recommended removing
@NOCHECK if running in memory mode on 90s era machines.



BRADY.REF (included in BRADYREF.ZIP)
---
The Brady Bunch Adventure

This is actually an entire (but small) adventure game in the RTSoft style. It's
probably the most over the top example of Seth's insane (and not so PC) humor I
know of to boot. It was released as a standalone REF script for the LORD 2
engine, I believe as an example of the LORD 2 engine's flexibility. As it was
developed later than the above two RTReader scripts it uses some different
commands and methods and an overall different style:

* Recursive use of the @ROUTINE command instead of @DO GOTO for calling new
  sections of code, including use of @ROUTINEABORT.
* Lots of examples of using @DO READSPECIAL for menus and prompts!
* Use of variables to simulate a player record, inventory, and game state, and
  player score.
* Use of the `K control code instead of the @KEY commands for pausing, as well
  as the @MOREMAP command to customize the prompt.
* Advanced (if not pretty messy) program flow, including the use of nested
  @BEGIN/@END sections.
* Good example of what a door game written in REF might look like.

As this was developed for the LORD 2 engine it requires some modifications to
make it work with REFDoor. Luckily, only a few:

* Remove the @VERSION command on line 19. @VERSION worked differently in LORD 2
  and Seth's use of it here will result in the occasional annoying popup.
* Replace all references to the "`p25" variable (there are 7)  with an unused
  variable, such as `p13. LORD 2 expanded the number of variables available
  considerably, and REFDoor (and RTReader) only support up 20 "p" variables.
* Add "nopause" parameter to the @DISPLAYFILE command on line 1492. i.e.
  "@displayfile brady.dat nopause". When displaying a file, REFDoor begins
  counting the number of lines from the current cursor position when figuring
  out when to pause the screen. LORD 2 begins counting from 1 at the top of the
  file. This is a relatively minor difference, but results in a weird pause
  when displaying the score. It looks correct (and better) without it!
* Not required but recommended, add "@DES The Brady Bunch Adventure" to the
  first line of the script.

---
EOF
