Introduction ============ This document describes the script commands that cfbot.pl understands and how to use the scripting feature. (Things marked with '*' aren't implemented yet.) Defining a script ================= As admin, tell the cfbot to "learn script-name" where will be everything until the end of the message. Then tell the bot the script commands one per message. After the last command, tell it "end script-name". Scripts will be stored to disk regularly during run time and when the bot is leaving, and they're loaded again at startup. Executing a script ================== As admin, tell the cfbot to "execute script-name". Removing a script ================= As admin, tell the cfbot to "forget script-name". Script commands =============== These commands are the standard commands and are passed directly to the server: north|south|east|west|northwest|northeast|southwest|southeast apply say tell shout get take drop cast invoke fire (north|south|east|west) fire_stop pickup The following commands are processed by the script: wait wait for the specified amount of seconds before proceeding with the script when wait until the condition is true before proceeding assert stop the script if the condition is false end stop the script Loop commands for times ... end_for forever ... end_forever Conditions ========== Valid conditions are: hearing stats_event lowfood|maxhp|maxsp|maxgrace this will trigger when food < 80 (lowfood) or the max stat is reached for the other cases. *seing