Daily special: Difference between revisions
Jump to navigation
Jump to search
imported>Bale mNo edit summary |
imported>Eliteofdelete No edit summary |
||
Line 15: | Line 15: | ||
function_description=Returns the item offered as a daily special at either Chez Snootée or The Gnomish Micromicrobrewery, per your current moon sign.| | function_description=Returns the item offered as a daily special at either Chez Snootée or The Gnomish Micromicrobrewery, per your current moon sign.| | ||
code1={{CodeSample| | |||
title=Code Samples| | |||
description=Gives you basic information about the current daily special, if you are able to access one.| | |||
code= | |||
<syntaxhighlight> | |||
item special = daily_special(); | |||
if (special == $item[none] && !knoll_available()) | |||
print("You are currently not logged in!", "red"); | |||
else if (knoll_available()) | |||
print("You currently do not have any food specials available to you", "blue"); | |||
else if (special.fullness > 0) //Check to see if it is food | |||
print("Chez Snootée is offering "+special+" today. It has quality of "+special.quality+" that gives "+special.adventures+" adventures for "+special.fullness+" fullness.", "blue"); | |||
else | |||
print("The Gnomish Micromicrobrewery is offering "+special+" today. It has quality of "+special.quality+" that gives "+special.adventures+" adventures for "+special.inebriety+" drunkenness.", "blue"); | |||
</syntaxhighlight>| | |||
}}| | |||
cli_equiv=The CLI commands "restaurant" and "*brewery*" work similarly, for their specific eateries (the asterisks padding "*brewery*" serve as wildcard matchers).| | cli_equiv=The CLI commands "restaurant" and "*brewery*" work similarly, for their specific eateries (the asterisks padding "*brewery*" serve as wildcard matchers).| |
Latest revision as of 08:45, 11 January 2015
Function Syntax
item daily_special()
Returns the item offered as a daily special at either Chez Snootée or The Gnomish Micromicrobrewery, per your current moon sign.
Code Samples
Gives you basic information about the current daily special, if you are able to access one.
item special = daily_special();
if (special == $item[none] && !knoll_available())
print("You are currently not logged in!", "red");
else if (knoll_available())
print("You currently do not have any food specials available to you", "blue");
else if (special.fullness > 0) //Check to see if it is food
print("Chez Snootée is offering "+special+" today. It has quality of "+special.quality+" that gives "+special.adventures+" adventures for "+special.fullness+" fullness.", "blue");
else
print("The Gnomish Micromicrobrewery is offering "+special+" today. It has quality of "+special.quality+" that gives "+special.adventures+" adventures for "+special.inebriety+" drunkenness.", "blue");
CLI Equivalent
The CLI commands "restaurant" and "*brewery*" work similarly, for their specific eateries (the asterisks padding "*brewery*" serve as wildcard matchers).
Special
If you are not in a sign with access to a special eatery, or not logged in, this function returns $item[none].