Difference between revisions of "Notify"

From Kolmafia
Jump to navigation Jump to search
imported>Zarqon
imported>Zarqon
m (linked comments)
Line 26: Line 26:
  
 
<code>
 
<code>
   # ------------------------------------------------------------------------------------------
+
   [[comments|# ------------------------------------------------------------------------------------------]]
   # EatDrink.ash by dj_d
+
   [[comments|# EatDrink.ash by dj_d]]
   #  
+
   [[comments|# ]]
   # inspired by reportConsumables.ash, by Sandiman
+
   [[comments|# inspired by reportConsumables.ash, by Sandiman]]
   # ------------------------------------------------------------------------------------------
+
   [[comments|# ------------------------------------------------------------------------------------------]]
 
   [[notify]] dj_d;
 
   [[notify]] dj_d;
 
    
 
    

Revision as of 04:10, 31 January 2009

notify playername

The notify command is a special ASH command which sends a kmail to the specified player saying:

I have opted to let you know that I have chosen to run <C:Program FilesKoL mafiascriptsscriptname.ash>. Thanks for writing this script!

Its intended purpose is for script authors to get feedback on who is using their scripts.

Mafia will send a notify kmail only once per filename per character. After sending the initial kmail, only clearing the global settings file or renaming the script (including moving it to another folder) will cause the notify command to send a second kmail about that script.

Using the notify command

The proper syntax is notify playername;

Note that no parentheses or quotes are necessary.

The notify command must be the first command in the script, or attempting to run the script will generate an abort error. Only comments and whitespace can safely precede it.

Do not use notify for consult scripts -- you cannot send kmail during combat.

notify cannot be used from the CLI using the "ash" command.

Example

The following is taken from the top of dj_d's EatDrink.ash:

 # ------------------------------------------------------------------------------------------
 # EatDrink.ash by dj_d
 # 
 # inspired by reportConsumables.ash, by Sandiman
 # ------------------------------------------------------------------------------------------
 notify dj_d;
 
 import <value.ash>;
 
 string EATDRINK_VERSION = "1.0";
 ...