Total turns played: Difference between revisions
Jump to navigation
Jump to search
imported>Bale No edit summary |
imported>Bobson Fixing the example |
||
Line 20: | Line 20: | ||
code= | code= | ||
<syntaxhighlight> | <syntaxhighlight> | ||
print( "Number of turns to next 'Lights Out' adventure: " + ( total_turns_played() % 37 ) ); | print( "Number of turns to next 'Lights Out' adventure: " + (37 - total_turns_played() % 37 ) ); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
}}| | }}| |
Latest revision as of 12:38, 26 December 2014
Function Syntax
int total_turns_played()
This function returns the total number of adventures used by the logged-in character since they were created.
Code Sample
Turns until a "Lights Out" adventure in Spookyraven is based on total turns played.
print( "Number of turns to next 'Lights Out' adventure: " + (37 - total_turns_played() % 37 ) );
See Also
Special
When not logged in, this function returns 0.