Difference between revisions of "Black market available"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
imported>Bale
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div style="height: 0">
+
{{
{{#vardefine:name|black_market_available}}
+
#vardefine:name|black_market_available}}{{
{{#vardefine:return_type|boolean}}
+
#vardefine:return_type|boolean}}{{
</div>{{FunctionPage|
+
 
 +
FunctionPage|
 
name={{#var:name}}|
 
name={{#var:name}}|
function_category=Your Character|
 
  
 
function1={{Function|
 
function1={{Function|
Line 19: Line 19:
 
<syntaxhighlight>
 
<syntaxhighlight>
 
if(black_market_available()) {
 
if(black_market_available()) {
   use((my_maxmp()-my_mp())/10 , $item[black cherry soda]);
+
   use(floor((my_maxmp() - my_mp()) / 10) , $item[black cherry soda]);
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 27: Line 27:
 
special=When not logged in, this function returns false.
 
special=When not logged in, this function returns false.
 
}}
 
}}
 +
 +
[[Category:Your Character]]

Latest revision as of 21:40, 21 May 2010

Function Syntax

boolean black_market_available()

This function returns true if the logged-in character has unlocked the Black Market. Otherwise, it returns false.

Code Samples

If the character can access the Black Market, this code will buy black cherry sodas to restore MP to max.

if(black_market_available()) {
   use(floor((my_maxmp() - my_mp()) / 10) , $item[black cherry soda]);
}

See Also

guild_store_available() | hippy_store_available() | white_citadel_available()

Special

When not logged in, this function returns false.