Is trendy: Difference between revisions
Jump to navigation
Jump to search
imported>Eliteofdelete No edit summary |
imported>Eliteofdelete No edit summary |
||
Line 49: | Line 49: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
if (my_path() == "Trendy") { | if (my_path() == "Trendy") { | ||
foreach it in $familiars[] | |||
if (have_familiar(it) && is_trendy(it)) | |||
print("You can currently use familiar "+it+".", "blue"); | |||
} | } | ||
else print("You are not on the Trendy path.", "blue"); | else print("You are not on the Trendy path.", "blue"); |
Latest revision as of 14:20, 17 January 2015
Function Syntax
boolean is_trendy(item thing )
boolean is_trendy(familiar thing )
boolean is_trendy(skill thing )
boolean is_trendy(string thing )
- thing is checked for trendiness
This function checks to see if the thing is currently trendy. thing can be an item, familiar, skill. It can also be a string to check all categories. Using the string parameter is the only way to check a campground items. Bookshelf skills are checked by the skill parameter.
Fuzzy matching is not used for a string parameter so you need to spell it properly, including character entities. Otherwise it will not match against the item, familiar or skill in the database.
Code Samples
Ouputs which familiars can be used if you are on the Trendy Path.
if (my_path() == "Trendy") {
foreach it in $familiars[]
if (have_familiar(it) && is_trendy(it))
print("You can currently use familiar "+it+".", "blue");
}
else print("You are not on the Trendy path.", "blue");