Current mcd: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Zarqon
m Current mind control level() moved to Current mcd(): New function name.
imported>Zarqon
more links, fixed example, consistent formatting, logged-out info
Line 1: Line 1:
'''int current_mind_control_level()'''<br/>
[[int]] [[current_mcd()]]
Returns the level of the Super-Secret Canadian Mind-Control Device


<pre>#This script simply checks to see if the Super-Secret Canadian Mind-Control Device
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.
#is set at level 5 if it is then it will adventure once to attempt to kill the bonerdrag.


boolean Bonerdrag(){
This example ensures that the MCD is set to 5 before attacking the Bonerdagon:
 
if(in_mysticality_sign() && current_mind_control_level() == 5){
 
adventure(1, $location[Haert of the Cyrpt])
}
}
 
</pre>


<code>
[[boolean]] fight_bonerdagon() {
  if ([[current_mcd()]] == 5 || [[change_mcd()|change_mcd]](5)) {
    [[adventure()|adventure]](1,$[[location]][Haert of the Cyrpt])
  }
}
</code>
[[Category:Your Character | Current mind control level()]]
[[Category:Your Character | Current mind control level()]]
[[Category:Ash Functions |Current mind control level()]]
[[Category:Ash Functions |Current mind control level()]]
When not logged in, this function returns 0.

Revision as of 15:00, 29 January 2009

int current_mcd()

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:

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.