• 1 page(s)
BidManiac code change

Hey there guys.

 

I'm trying to alter the code to the BidManiac addon, this addon has been inactive for over six months, so i assume that the author is no longer working on it.

Basically, i'm trying to change it so bids are silent, and that it will not report that there is a new high bidder or what the new high bid is.

 

I  have changed the origional code:

    if( (BidManiac_currentTime - BidManiac_lastUpdateTime) >= BidManiac_goingOnceTime ) then
        -- Change state to going once
        BidManiac_bidState = BidManiac_goingOnce ;
        BidManiac_updateGUI() ;
        BidManiac_PrintAll( "Current Bid " .. BidManiac_getMaxBidString() .. " going ONCE ("
            .. BidManiac_itemLink .. ")" ) ;
        BidManiac_lastUpdateTime = time() ;
    end

To:

    if( (BidManiac_currentTime - BidManiac_lastUpdateTime) >= BidManiac_goingOnceTime ) then
        -- Change state to going once
        BidManiac_bidState = BidManiac_goingOnce ;
        BidManiac_updateGUI() ;
        BidManiac_PrintAll("Going Once!") ;
        BidManiac_lastUpdateTime = time() ;
    end

this makes sence to me, but for some reason the addon seems to have stopped working alltogether.

What did I do wrong?

 

Varine on Thaurissan, Horde. Guild Leader of

Report this thread post

maybe you can provide the error log?

Report this thread post

My guess would be that either BidManiac_GetMaxBidString() or BidManiac_ItemLink() has side effects -- that is, does something besides just return a string, and the addon was relying on that/those side effects.

Try putting the calls to those back in, but outside of the PrintAll, so they get called, but you don't see their output.

Report this thread post

Hmm, I seem to have gotten it working for the time being, it's no longer posting the bid, just the text, yay.

I'll need to make a few more ajustments before it's exactly what I want tho. Thanks for the help guys, if I need any more i'll be back :D

Varine on Thaurissan, Horde. Guild Leader of

Report this thread post

Okay! I've gotten the addon to correctly stop telling me what the bid is, now, I need to make a complicated change.

For the record, here is the addon:

http://wow.curse.com/downloads/wow-addons/details/bid-maniac.aspx

Basically, this addon gets a bid from a whisper, and stores that whisper in an array somewhere. If the player bids a bid higher then the last high bid, it seems to discard it and store the new high bid only.

What I want the addon to do is to store the TOP TWO bids, and the winner will pay an amount equal to the AVERAGE of his/her bid and the second highest bidder.

Just in case i'm making no sence,

Player 1 bids 100,
Player 2 bids 200,
Auction ends, player 2 wins, but pays 150 instead of 200. Currently i'm not sure how to edit the addon to correctly replicate this.

I'm guessing you will need to download the addon and look at the code yourself to understand how it works.
If you can do this for me, I would be very appreciative XD I've never written an addon before, and I only have basic coding experience, not enough to do what I think I need to do.

Varine on Thaurissan, Horde. Guild Leader of

Report this thread post
  • 1 page(s)
Subscribe to this thread: (you will receive emails when new posts are made)