My basestat: Difference between revisions
Jump to navigation
Jump to search
imported>Grotfang Conform to template |
imported>Bale mNo edit summary |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{#vardefine:name|my_basestat}} | {{ | ||
{{#vardefine:return_type|int}} | #vardefine:name|my_basestat}}{{ | ||
#vardefine:return_type|int}}{{ | |||
FunctionPage| | |||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 12: | Line 12: | ||
return_also={{#var:return_also}}| | return_also={{#var:return_also}}| | ||
parameter1={{Param|stat|st}}| | parameter1={{Param|stat|st}}| | ||
p1desc= | p1desc={{pspan|st}} is the stat you want to return the unbuffed value of. | ||
}}| | }}| | ||
Line 24: | Line 24: | ||
print("My base main stat: " + my_basestat(my_primestat())); | print("My base main stat: " + my_basestat(my_primestat())); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} | ||
{{CodeSample| | |||
description=Prints each stat value.| | description=Prints each stat value.| | ||
code= | code= | ||
Line 41: | Line 41: | ||
special=When not logged in, this function will return 0 regardless of parameter. | special=When not logged in, this function will return 0 regardless of parameter. | ||
}} | }} | ||
[[Category:Your Character]] |
Latest revision as of 21:34, 21 May 2010
Function Syntax
- st is the stat you want to return the unbuffed value of.
This function returns the base (unbuffed) value of the logged-in character's particular stat as an int.
Note that this function also accepts $stat[submuscle], $stat[submysticality], and $stat[submoxie] as parameters, in which case it will return the current number of substats as an int.
Code Samples
Prints your unbuffed mainstat.
print("My base main stat: " + my_basestat(my_primestat()));
Prints each stat value.
print("My base muscle: " + my_basestat($stat[muscle]));
print("My base mysticality: " + my_basestat($stat[mysticality]));
print("My base moxie: " + my_basestat($stat[moxie]));
print("My current muscle substats: " + my_basestat($stat[submuscle]));
print("My current mysticality substats: " + my_basestat($stat[submysticality]));
print("My current moxie substats: " + my_basestat($stat[submoxie]));
See Also
Special
When not logged in, this function will return 0 regardless of parameter.