Change mcd: Difference between revisions
Jump to navigation
Jump to search
imported>Grotfang mNo edit summary |
imported>Bale Valhalla revamp in r9307 |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{#vardefine:name|change_mcd}} | {{ | ||
{{#vardefine:return_type|boolean}} | #vardefine:name|change_mcd}}{{ | ||
#vardefine:return_type|boolean}}{{ | |||
FunctionPage| | |||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 12: | Line 12: | ||
return_also={{#var:return_also}}| | return_also={{#var:return_also}}| | ||
parameter1={{Param|int|mcd_level}}| | parameter1={{Param|int|mcd_level}}| | ||
p1desc= | p1desc={{pspan|mcd_level}} is an integer between 0 and 10 (11 in Little Canadia) to change your sign-specific mind control device to (the device that alters monster level). | ||
}}| | }}| | ||
function_description=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 | function_description=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 in Little Canadia).| | ||
code1={{CodeSample| | code1={{CodeSample| | ||
Line 24: | Line 24: | ||
boolean mcd_max() { | boolean mcd_max() { | ||
int maxmcd = 10; | int maxmcd = 10; | ||
if( | if(canadia_available()) { | ||
maxmcd = 11; | maxmcd = 11; | ||
} | } | ||
Line 35: | Line 35: | ||
}}| | }}| | ||
see_also={{SeeAlso|current_mcd| | see_also={{SeeAlso|current_mcd|canadia_available}}| | ||
special=When not logged in, this function returns false. | special=When not logged in, this function returns false. | ||
}} | }} | ||
[[Category:Adventuring]] |
Latest revision as of 10:11, 19 May 2011
Function Syntax
boolean change_mcd(int mcd_level )
- mcd_level is an integer between 0 and 10 (11 in Little Canadia) 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 in Little Canadia).
Code Samples
The following function attempts to set your MCD to the maximum.
boolean mcd_max() {
int maxmcd = 10;
if(canadia_available()) {
maxmcd = 11;
}
if(current_mcd() == maxmcd) {
return true;
}
return change_mcd(maxmcd);
}
See Also
Special
When not logged in, this function returns false.