Daily special: Difference between revisions
Jump to navigation
Jump to search
imported>Heeheehee m Answered RFI, which had already been answered in the Talk page. |
imported>Eliteofdelete No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
FunctionPage| | FunctionPage| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 16: | 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).| | ||
special=If you are not in a sign with access to a special eatery, or not logged in, this function returns $item[none].| | special=If you are not in a sign with access to a special eatery, or not logged in, this function returns $item[none].| | ||
}} | }} | ||
[[Category:Your Character]] |
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].