Difference between pages "Talk:Use familiar" and "Have shop"

From Kolmafia
(Difference between pages)
Jump to navigation Jump to search
imported>Slyz
 
imported>Eliteofdelete
 
Line 1: Line 1:
This always seems to return false for me, can anyone confirm?<br />
+
{{
--[[User:Slyz|Slyz]] 20:56, 9 April 2010 (UTC)
+
#vardefine:name|have_shop}}{{
 +
#vardefine:return_type|boolean}}{{
  
 +
FunctionPage|
  
> ash use_familiar($familiar[sandworm])
+
name={{#var:name}}|
  
Putting Mexicana the Hovering Sombrero back into terrarium...<br />
+
function1={{Function|
Taking Hecho en Mexico the Baby Sandworm out of terrarium...<br />
+
name={{#var:name}}|
Returned: true<br />
+
aggregate={{#var:aggregate}}|
I assume that the ash command should be enough to check return value; correct me if I'm wrong. --[[User:Heeheehee|Heeheehee]] 21:03, 9 April 2010 (UTC)
+
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}
 +
}}|
  
I'll have to recheck after RO, but here is what I was getting (doing things slightly differently):
+
function_description=Returns true if you have a mall store, false otherwise.|
  
> ash print( use_familiar($familiar[slimeling]) )
+
code1={{CodeSample|
 +
title=Code Samples|
 +
description=Informs you if you have a shop in the mall of loathing. If not, it checks to see if you are able to get one.|
 +
code=
 +
<syntaxhighlight>
 +
if (have_shop())
 +
  print("You have a shop in the Mall of Loathing!", "green");
 +
else if (my_meat() < 50000)
 +
  print("You need 50,000 meat for a shop!", "red");
 +
else if (my_level() < 9)
 +
  print("You need to be at least level 9 to purchase a shop", "red");
 +
else print("You currently do not have a shop but have the means to get one. You should buy one.", "green");
 +
</syntaxhighlight>|
  
Putting Dusty the Baby Sandworm back into terrarium...<br />
+
}}|
Taking Yuk the Slimeling out of terrarium...<br />
+
 
false<br />
+
see_also={{SeeAlso|have_display}}|
Returned: void<br />
+
special=This function returns false if no character is logged in.|
--[[User:Slyz|Slyz]] 03:33, 10 April 2010 (UTC)
+
}}
 +
 
 +
[[Category:Item Management]]

Latest revision as of 03:37, 14 January 2015

Function Syntax

boolean have_shop()

Returns true if you have a mall store, false otherwise.

Code Samples

Informs you if you have a shop in the mall of loathing. If not, it checks to see if you are able to get one.

if (have_shop())
   print("You have a shop in the Mall of Loathing!", "green");
else if (my_meat() < 50000)
   print("You need 50,000 meat for a shop!", "red");
else if (my_level() < 9)
   print("You need to be at least level 9 to purchase a shop", "red");
else print("You currently do not have a shop but have the means to get one. You should buy one.", "green");

See Also

have_display()

Special

This function returns false if no character is logged in.