<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ABuyAuction</id>
	<title>API:BuyAuction - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ABuyAuction"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:BuyAuction&amp;action=history"/>
	<updated>2026-10-18T04:54:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:BuyAuction&amp;diff=30204&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:BuyAuction&amp;diff=30204&amp;oldid=prev"/>
		<updated>2026-10-16T19:40:53Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Auction}}&lt;br /&gt;
Asks the server to buy an auction listing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BuyAuction(auctionIdHigh, auctionIdLow, revision, price)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;auctionIdHigh : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – High part of the auction id (&amp;lt;code&amp;gt;auctionIDHigherNum&amp;lt;/code&amp;gt; in the stock search results).&lt;br /&gt;
;auctionIdLow : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Low part of the auction id (&amp;lt;code&amp;gt;auctionIDLowerNum&amp;lt;/code&amp;gt;).&lt;br /&gt;
;revision : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Revision number of the listing (&amp;lt;code&amp;gt;revision&amp;lt;/code&amp;gt;).&lt;br /&gt;
;price : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Price offered, in brass. The stock UI passes the listing&amp;#039;s &amp;lt;code&amp;gt;buyOutPrice&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* Sends a bid request to the server. It is the same request that [[API:CancelAuction|CancelAuction]] sends, with the cancel marker cleared and the price filled in.&lt;br /&gt;
* The client does not check the player&amp;#039;s money. The stock UI compares &amp;lt;code&amp;gt;Player.GetMoney()&amp;lt;/code&amp;gt; with the price first.&lt;br /&gt;
* The function needs at least four arguments and only reads the last four.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None besides the generic &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; message when an argument is not a number.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/ea_auctionhousewindow/source/auctionwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if( Player.GetMoney() &amp;lt; auctionData.buyOutPrice )&lt;br /&gt;
then&lt;br /&gt;
    ...&lt;br /&gt;
    return&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
BuyAuction( auctionData.auctionIDHigherNum, auctionData.auctionIDLowerNum, auctionData.revision, auctionData.buyOutPrice )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:CancelAuction|CancelAuction]]&lt;br /&gt;
* [[API:CreateAuction|CreateAuction]]&lt;br /&gt;
* [[API:SendAuctionSearch|SendAuctionSearch]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>