What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

How can I make an auction listing? Having problem using MakeAuctionLot

Voyager92

Member
Joined
Nov 3, 2014
Messages
287
Reaction score
1
Good evening guys,

Can someone plz post a snippet on how to create an auction for a specific product with a certain amount? For example, I want to create an auction for 500 Barley with a Buyout of 3s per item and the Starting Bid of 10g. I searched a lot in the forums in the API and could not make it work.

The best idea I could find was that I needed to create an stack of 500 barley and do a MakeAuctionLot, but had problems doing that, since C# isn't my main programming language, I appreciate if someone could let me a hand, thx.
 
Code:
//or getInvItems(ITEM_ID)
var item = getInvItem("Barley");
if (item != null)
{
    //1 silver = 100 copper
    //baseSellPrice - starting price for one item
    //buyBackPrice - buyback price for one item.
    item.MakeAuctionLot(300 /*baseSellPrice*/, 500/*buyBackPrice*/, AuctionSellTime.TwentyFourHours);
    //this will put stack of item to auction.
    //if you need to put two or more stacks or find stack that you need - you can use something like    
    foreach (var item in getInvItems("Barley"))
    {
         if (item..... ......)
                ...........
    }
}
 
Code:
//or getInvItems(ITEM_ID)
var item = getInvItem("Barley");
if (item != null)
{
    //1 silver = 100 copper
    //baseSellPrice - starting price for one item
    //buyBackPrice - buyback price for one item.
    item.MakeAuctionLot(300 /*baseSellPrice*/, 500/*buyBackPrice*/, AuctionSellTime.TwentyFourHours);
    //this will put stack of item to auction.
    //if you need to put two or more stacks or find stack that you need - you can use something like    
    foreach (var item in getInvItems("Barley"))
    {
         if (item..... ......)
                ...........
    }
}

Big thx for the help Out, but I was wondering, is it possible to sell stacks of 200 for example of a given item?
 
Last edited:
Big thx for the help Out, but I was wondering, is it possible to sell stacks of 200 for example of a given item?
Split them first into stacks with needed count
 
Back
Top