Overview


Custom reports allow your players to interact directly with AutoTroll by sending an e-mail message with a report command in it (or having something like WebTroll send them for the player). These report commands cause AutoTroll to load a custom report you've made and reply back to the player. The process is very similar to template files, only you create as many reports (or template files) as you want.

For AutoTroll to recognize an e-mail command, your player should follow the rules for properly identifying a player. Then, AutoTroll will scan the message body for reportl commands. A report command is defined by a word that starts with a '!' character, and is at the beginning of a line. When AutoTroll finds a report command, AutoTroll will look for a file with the same base name as the report command, plus a ".atf" file extension. AutoTroll will look for this file in the "EMail Templates\" directory under where AutoTroll is installed.

For example, if a player sends a properly formatted message that looks something like this:
---------------------------------------------------------------
From: Red Troll <red.troll@sharenet.com>
To: Auto Troll <auto.troll@sharenet.com>
Subject: mypassword3423224

!ShowGames
---------------------------------------------------------------

Then AutoTroll will look for a file named "!ShowGames.atf" in the email templates\ directory where you installed AutoTroll. If this filename is found, AutoTroll will load up the template and execute any template variables and commands you have in there and deliver the results back to the player. An example of what might be in this !ShowGames.atf :
---------------------------------------------------------------
Hello [Player.Name]!

You've requested a list of games from AutoTroll. Below are the public games
currently available:
[CycleEach Game SortBy GameNumber]
#[Game.Number] [Game.Name]
[EndCycle]

Thanks !

---------------------------------------------------------------

What would be returned would be something like:
---------------------------------------------------------------
Hello Red Troll!

You've requested a list of games from AutoTroll. Below are the public games
currently available:
#1 Seek and Destroy
#2 5 on 5 Game
#3 Age of Empire Game

Thanks!

---------------------------------------------------------------

You can develop special reports that only you know the report name too. For example, you could create a "!XXYYZZ.atf" template file and put it in your email templates\ directory. This template could list all the players and their passwords and whatever else you need. Then if you're not at home but need some important information you can send AutoTroll this report filename that only you know and you'll get back the information!

See also
templates