+ Reply to Thread
Results 1 to 5 of 5

  Click here to go to the first Rift Team post in this thread.   Thread: Inspect.Auction.Detail: Min. bid required

  1. #1
    Plane Touched
    Join Date
    Feb 2012
    Posts
    228

    Default Inspect.Auction.Detail: Min. bid required

    Does anybody know if there is any way to know the min. bid required for an auction using the API?

    When I call Inspect.Auction.Detail with a valid auction identifier, it returns a table with the current bid price on its "bid" field.

    If I wanted to bid on that auction and it has already been bidded, I'd have to bid that amount + 1 silver (at least).

    However, if the auction hasn't been bidded so far, it'd be enough to bid the current bid price and, in fact, the native auction UI knows if an auction has been bidded or not.

    To check it, do a search ordering by Unit Price ascending: you'll get a lot of crap with a bid price of 1 silver both in the UI and in the Inspect.Auction.Detail table, BUT, if you select them, the native UI allows you to bid 1 silver on some of them (so they haven't been bidded so far), but, for others, it requires 2 silver (so they've already been bidded).

    I know I could just stick on bidding the bid price + 1 silver and don't care about it anymore as nobody would care for a single silver, but it could be useful to have this info.

  2. #2
    Rift Disciple
    Join Date
    Mar 2011
    Posts
    130

    Default

    Is there a way to detect if a bid was successful ? If so, try 1s, if it bid, you're ok, if it fails, try 2s.

    Event.Auction.Bid ?

  3. #3
    Plane Touched
    Join Date
    Feb 2012
    Posts
    228

    Default

    I'm checking what you propose, but if the first Command.Auction.Bid fails I think I wouldn't be able to "auto"-call it a second time as the first call would have consumed the click event.

    While checking it I've found that the "id" field returned by Inspect.Auction.Detail is prefixed by a "c" instead of an "o". According to the_real_seebs the "c" prefix is for achievements, not for auctions so perhaps it's a bug.

    Results of the test:

    The Command.Auction.Bid doesn't fail (pcall returns true) but a red error message ("Your bid is too low") is displayed in the middle of the screen and it gives the money back.

    I expected it to give an error so I could figure out if the bid has failed or not. After a successful bid you receive an Event.Auction.Scan, but the auction you've bidded on might be on that scan or may not be...

    So, in addition to the original question, Is there any way to know if a bid has been successful or not?

    I mean, without:

    1) Needing the user to push another button in order to perform a new scan and see if the auction detail has the "bidder" field or not (as it would hinder usability)
    2) Having to check some frames after if Inspect.Currency.Detail("coin").stack has changed (as it doesn't change immediately)
    3) Assuming that the bid has been successful if you receive an unexpected Event.Auction.Scan shortly after the Command.Auction.Bid call (as I'd prefer not having to rely on unexpected events)

    Update:
    I've found this works well enough to check if an auction has been succesful:

    Code:
        function bidButton.Event:LeftDown()
            if not self:GetEnabled() then return end
            local auctionID = "o04E580000267A8E1"
            local auctionDetail = Inspect.Auction.Detail(auctionID)
            Command.Auction.Bid(auctionID, auctionDetail.bid)
        end
        function bidButton.Event:LeftUp()
            if not self:GetEnabled() then return end
            Command.Auction.Scan({type = "bids"})
        end
        function bidButton.Event:LeftUpoutside()
            if not self:GetEnabled() then return end
            Command.Auction.Scan({type = "bids"})
        end
    -- If the bid is successful, the incoming Event.Auction.Scan with type "bids" will show the auction ID
    But it looks too dirty, and I suppose we shouldn't use something like that to call two hardware event restricted commands with a single user click, as eventually we'd end abusing it. Ok, the Wheel events can be abused more than this, but I think they'll be removed from the list of hardware events, as right now they can be used to send mass spam (at least according to the documentation, not that I've tried to).
    Last edited by Baanano; 02-29-2012 at 03:23 PM.

  4.   Click here to go to the next Rift Team post in this thread.   #4
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by Baanano View Post
    Does anybody know if there is any way to know the min. bid required for an auction using the API?

    When I call Inspect.Auction.Detail with a valid auction identifier, it returns a table with the current bid price on its "bid" field.

    If I wanted to bid on that auction and it has already been bidded, I'd have to bid that amount + 1 silver (at least).

    However, if the auction hasn't been bidded so far, it'd be enough to bid the current bid price and, in fact, the native auction UI knows if an auction has been bidded or not.
    That'd be a missing feature. I'll toss it into the small-improvements pile.

    Quote Originally Posted by Baanano View Post
    While checking it I've found that the "id" field returned by Inspect.Auction.Detail is prefixed by a "c" instead of an "o". According to the_real_seebs the "c" prefix is for achievements, not for auctions so perhaps it's a bug.
    And that's a bug - it's actually fixed on the PTS, I might push it up to live.

  5.   This is the last Rift Team post in this thread.   #5
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by Baanano View Post
    But it looks too dirty, and I suppose we shouldn't use something like that to call two hardware event restricted commands with a single user click, as eventually we'd end abusing it. Ok, the Wheel events can be abused more than this, but I think they'll be removed from the list of hardware events, as right now they can be used to send mass spam (at least according to the documentation, not that I've tried to).
    The point of hardware events isn't really to prevent spam - you can click at a ridiculously spammy rate anyway, it doesn't solve anything. The intention is to require that the user be at the keyboard and actively interacting with the game. I agree it's a bit weird to trigger two hardware restricted commands that way, but I haven't managed to come up with a situation where it's actually a problem, so, as far as I'm concerned, go for it.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts