In hardcore: Difference between revisions
Jump to navigation
Jump to search
imported>Degrassi m Clean up example - code box was ending before the code did. |
imported>Zarqon better example, wiki formatting, logged-out info |
||
Line 1: | Line 1: | ||
[[boolean]] [[ | [[boolean]] [[in_hardcore()]] | ||
This function returns | This function returns ''true'' if the logged-in character is currently subject to Hardcore restrictions. If not subject to such restrictions this function returns ''false''. | ||
The following example attempts to pull items from storage if the character is in Ronin: | |||
<code> | <code> | ||
if (![[can_interact()]] && ![[in_hardcore()]] && [[storage_amount()|storage_amount]]($[[item]][not-a-pipe])) | |||
[[take_storage()|take_storage]](3,$[[item]][not-a-pipe]); | |||
</code> | </code> | ||
[[Category:Your Character | In hardcore()]] | [[Category:Your Character | In hardcore()]] | ||
[[Category:Ash Functions |In hardcore()]] | [[Category:Ash Functions |In hardcore()]] | ||
When not logged in, this function returns ''false''. |
Revision as of 07:22, 29 January 2009
This function returns true if the logged-in character is currently subject to Hardcore restrictions. If not subject to such restrictions this function returns false.
The following example attempts to pull items from storage if the character is in Ronin:
if (!can_interact() && !in_hardcore() && storage_amount($item[not-a-pipe]))
take_storage(3,$item[not-a-pipe]);
When not logged in, this function returns false.