Difference between revisions of "Change mcd"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
imported>Bale
m
Line 5: Line 5:
 
FunctionPage|
 
FunctionPage|
 
name={{#var:name}}|
 
name={{#var:name}}|
function_category=Adventuring|
 
  
 
function1={{Function|
 
function1={{Function|
Line 39: Line 38:
 
special=When not logged in, this function returns false.
 
special=When not logged in, this function returns false.
 
}}
 
}}
 +
 +
[[Category:Adventuring]]

Revision as of 22:20, 21 May 2010

Function Syntax

boolean change_mcd(int mcd_level )

  • mcd_level is an integer between 0 and 10 (11 if myst sign) to change your sign-specific mind control device to (the device that alters monster level).

Attempts to change your mind-control device (MCD) to the specified level, returning true if successful. Attempting to change the MCD to an impossible number will generate this abort error: "The dial only goes from 0 to 10." (11 for mysticality signs).

Code Samples

The following function attempts to set your MCD to the maximum.

boolean mcd_max() {
   int maxmcd = 10;
   if(in_mysticality_sign()) {
      maxmcd = 11;
   }
   if(current_mcd() == maxmcd) {
      return true;
   }
   return change_mcd(maxmcd);
}

See Also

current_mcd() | in_mysticality_sign()

Special

When not logged in, this function returns false.