Difference between revisions of "Holiday"

From Kolmafia
Jump to navigation Jump to search
imported>Bale
(start page)
 
imported>Relyk
Line 1: Line 1:
{{DISPLAYTITLE:holiday (CLI)}}
+
{{
 +
#vardefine:name|holiday}}{{
 +
#vardefine:return_type|string}}{{
  
<p>In case an unpredicted holiday occurs, this command can be used to inform mafia to make use of the modifiers for the holiday. Possible uses are:</p>
+
FunctionPage|
 +
name={{#var:name}}|
 +
function1={{Function|
 +
name={{#var:name}}|
 +
aggregate={{#var:aggregate}}|
 +
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}|
 +
}}|
  
holiday Feast of Boris
+
function_description=A string representation of the [http://kol.coldfront.net/thekolwiki/index.php/Kingdom_of_Loathing_Calendar in-game holiday]. Returns an empty string otherwise.|
holiday Festival of Jarlsberg
 
  
<p>Note that this command is case sensitive. The only holidays that KoLmafia needs to adjust for are Festival of Jarlsberg and Feast of Boris. No other holidays require KoLmafia to adapt.</p>
+
code1={{CodeSample|
 +
title=Code Samples|
 +
description=|
 +
code=
 +
<syntaxhighlight>
 +
if(holiday() == "Veracity's Birthday")
 +
  private_message("veracity", "Happy Birthday!");
 +
</syntaxhighlight>}}
 +
|
 +
cli_equiv=Also available as the CLI command "holiday".
 +
}}
  
[[Category:CLI Commands]]
+
[[Category:Miscellaneous Functions]]

Revision as of 02:52, 27 September 2015

Function Syntax

string holiday()

A string representation of the in-game holiday. Returns an empty string otherwise.

Code Samples

if(holiday() == "Veracity's Birthday")
   private_message("veracity", "Happy Birthday!");

CLI Equivalent

Also available as the CLI command "holiday".