Current mcd: Difference between revisions
Jump to navigation
Jump to search
imported>Zarqon more links, fixed example, consistent formatting, logged-out info |
imported>Zarqon m semicolon |
||
Line 3: | Line 3: | ||
Returns the current level of the logged-in character's mind-control device (Detuned Radio, Super-Secret Canadian Mind-Control Device, or Annoy-o-Tron 5000) as an [[int]]. Possible values are 0-11 for mysticality signs and 0-10 for others. | Returns the current level of the logged-in character's mind-control device (Detuned Radio, Super-Secret Canadian Mind-Control Device, or Annoy-o-Tron 5000) as an [[int]]. Possible values are 0-11 for mysticality signs and 0-10 for others. | ||
This example ensures that the MCD is set to 5 before attacking the Bonerdagon: | This example function ensures that the MCD is set to 5 before attacking the Bonerdagon: | ||
<code> | <code> | ||
[[boolean]] fight_bonerdagon() { | [[boolean]] fight_bonerdagon() { | ||
if ([[current_mcd()]] == 5 || [[change_mcd()|change_mcd]](5)) { | if ([[current_mcd()]] == 5 || [[change_mcd()|change_mcd]](5)) { | ||
[[adventure()|adventure]](1,$[[location]][Haert of the Cyrpt]) | [[adventure()|adventure]](1,$[[location]][Haert of the Cyrpt]); | ||
} | } | ||
} | } |
Revision as of 09:13, 31 January 2009
Returns the current level of the logged-in character's mind-control device (Detuned Radio, Super-Secret Canadian Mind-Control Device, or Annoy-o-Tron 5000) as an int. Possible values are 0-11 for mysticality signs and 0-10 for others.
This example function ensures that the MCD is set to 5 before attacking the Bonerdagon:
boolean fight_bonerdagon() {
if (current_mcd() == 5 || change_mcd(5)) {
adventure(1,$location[Haert of the Cyrpt]);
}
}
When not logged in, this function returns 0.