<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.kolmafia.us/index.php?action=history&amp;feed=atom&amp;title=Is_coinmaster_item</id>
	<title>Is coinmaster item - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kolmafia.us/index.php?action=history&amp;feed=atom&amp;title=Is_coinmaster_item"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Is_coinmaster_item&amp;action=history"/>
	<updated>2026-04-30T15:32:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Is_coinmaster_item&amp;diff=7516&amp;oldid=prev</id>
		<title>Gnocchi masala: fix obsolete syntax</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Is_coinmaster_item&amp;diff=7516&amp;oldid=prev"/>
		<updated>2012-03-18T05:42:53Z</updated>

		<summary type="html">&lt;p&gt;fix obsolete syntax&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:42, 18 March 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l25&quot;&gt;Line 25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;boolean buyit(int qty, item it) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;boolean buyit(int qty, item it) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if(is_coinmaster_item(it)) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if(is_coinmaster_item(it)) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       coinmaster seller = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to_coinmaster(&lt;/del&gt;it.seller&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/del&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       coinmaster seller = it.seller;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       int price = sell_price(seller, it);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       int price = sell_price(seller, it);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       if(!is_accessible(seller) || seller.available_tokens &amp;lt; price) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       if(!is_accessible(seller) || seller.available_tokens &amp;lt; price) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gnocchi masala</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Is_coinmaster_item&amp;diff=7515&amp;oldid=prev</id>
		<title>Bale: r9555</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Is_coinmaster_item&amp;diff=7515&amp;oldid=prev"/>
		<updated>2011-07-23T04:54:29Z</updated>

		<summary type="html">&lt;p&gt;r9555&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|is_coinmaster_item}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type=boolean|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|item|it}}|&lt;br /&gt;
p1desc={{pspan|it}} is the item to check|&lt;br /&gt;
&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Returns true if {{pspan|it}} can be &amp;#039;&amp;#039;&amp;#039;purchased&amp;#039;&amp;#039;&amp;#039; from a coinmaster. You&amp;#039;ll need to discover which coinmaster by checking the seller proxy record.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=Purchases an item from a coinmaster if possible. Otherwise purchased from the mall.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
boolean buyit(int qty, item it) {&lt;br /&gt;
   if(is_coinmaster_item(it)) {&lt;br /&gt;
      coinmaster seller = to_coinmaster(it.seller);&lt;br /&gt;
      int price = sell_price(seller, it);&lt;br /&gt;
      if(!is_accessible(seller) || seller.available_tokens &amp;lt; price) {&lt;br /&gt;
         print(&amp;quot;You cannot afford to purchase that from the &amp;quot;+ seller+ &amp;quot;.&amp;quot;, &amp;quot;red&amp;quot;);&lt;br /&gt;
      } else if(seller.available_tokens &amp;lt; price * qty) {&lt;br /&gt;
         print(&amp;quot;You don&amp;#039;t have enough &amp;quot;+ seller.token+ &amp;quot;s to purchase that many. &amp;quot;&lt;br /&gt;
            +&amp;quot; Buying as many from the coinmaster as you can afford.&amp;quot;);&lt;br /&gt;
         buy(seller, floor(qty / price), it);&lt;br /&gt;
      } else return buy(seller, qty, it);&lt;br /&gt;
   }&lt;br /&gt;
   return buy(qty, it);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|sells_item|sell_price|is_accessible}}|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Item Management]]&lt;/div&gt;</summary>
		<author><name>Bale</name></author>
	</entry>
</feed>