My level: Difference between revisions
Jump to navigation
Jump to search
imported>Zarqon m formatting |
imported>StDoodle mNo edit summary |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:my_level()}} | |||
{{function| | |||
name=my_level| | |||
returns=int| | |||
}} | |||
This function returns the logged-in character's current level as an [[int]]. It is easily used as an initial test to avoid aborts and loops in scripts which attempt to burn adventures in specific areas due to the targeted area being unavailable. For example: | This function returns the logged-in character's current level as an [[int]]. It is easily used as an initial test to avoid aborts and loops in scripts which attempt to burn adventures in specific areas due to the targeted area being unavailable. For example: | ||
Line 15: | Line 19: | ||
</code> | </code> | ||
[[Category:Your Character | My level()]] | [[Category:Your Character | My level()]] | ||
When not logged in, this function returns 1. | When not logged in, this function returns 1. |
Revision as of 20:46, 22 February 2010
[[Data Types#{{{return_type}}}|{{{return_type}}}]] my_level()
This function returns the logged-in character's current level as an int. It is easily used as an initial test to avoid aborts and loops in scripts which attempt to burn adventures in specific areas due to the targeted area being unavailable. For example:
location select_farming_area() {
if (my_level() >= 10) {
if (item_amount($item[S.O.C.K.]) + item_amount($item[intragalactic rowboat]) > 0) {
return $location[Castle in the Clouds in the Sky];
} else {
return $location[Penultimate Fantasy Airship];
}
} else if(my_level() >= 8) {
...
When not logged in, this function returns 1.