Difference between revisions of "My meat"

From Kolmafia
Jump to navigation Jump to search
imported>Efilnikufecin
imported>Efilnikufecin
Line 1: Line 1:
 
<strong>int my_meat()</strong><br />
 
<strong>int my_meat()</strong><br />
 
Returns the amount of meat you currently have in your inventory. This does not include meat you have in Your Colossal Closet or Hagnk's storage.
 
Returns the amount of meat you currently have in your inventory. This does not include meat you have in Your Colossal Closet or Hagnk's storage.
 
+
<br />
 +
<br />
 +
<br />
 
The following sample checks to see if you have enough meat to buy a hermit Permit and if you do, it will buy one.
 
The following sample checks to see if you have enough meat to buy a hermit Permit and if you do, it will buy one.
 
<code>
 
<code>
Line 11: Line 13:
 
</code>  
 
</code>  
  
The following code does the same, but uses my_meat in a slightly different way.
+
The following code does the same, but places my_meat in the if statement rather than storing it in a variable first.
 
<code>
 
<code>
 
   if(my_meat() <= 100)
 
   if(my_meat() <= 100)

Revision as of 01:02, 17 January 2007

int my_meat()
Returns the amount of meat you currently have in your inventory. This does not include meat you have in Your Colossal Closet or Hagnk's storage.


The following sample checks to see if you have enough meat to buy a hermit Permit and if you do, it will buy one.

 int a = my_meat();
 if(a <= 100)
   {
   buy(1, $item[hermit permit]);
   }

The following code does the same, but places my_meat in the if statement rather than storing it in a variable first.

 if(my_meat() <= 100)
   {
   buy(1, $item[hermit permit]);
   }

See Also:
my_closetmeat || item_amount