Not signed in (Sign In)
    • CommentAuthorkrachtwerk
    • CommentTimeSep 20th 2007
     
    Hi,

    I've been using Auctioneer Advanced and Bottom Scanner quite intensively for a few weeks now, and I really like it :)
    Of course there are little things I think which can be better and instead of pestering the devs, who are already working so hard ;), I decided to do it myself.

    One thing that 'annoyed' me, was the btmscan diaglog box asking me what I wanted. The title asked what I wanted (bid/buy) in too many words, and I had to look three lines down to see for what reason. So I decided to put these together in the title, so it would ask: Bid/Buyout for vendor/disenchant/resale?

    And since I personally react quicker to colors than words, I decided to color-code the 5 key words (bid/buyout/vendor/disenchant/resale).

    Anywho, here's a little patch for btmMain.lua rev2203. Maybe someone will find it useful.


    Index: btmMain.lua
    ===================================================================
    --- btmMain.lua (revision 2203)
    +++ btmMain.lua (working copy)
    @@ -1277,8 +1277,8 @@
    local roi = math.floor( (100 * profit / Vi) + 0.5 )
    local disc = math.floor( (100 * (1 - Vi / Vf)) + 0.5 )

    - local bidText, BidText = "purchase", "Buyout"
    - if (not item.canbuy or item.purchase < item.buy) then bidText, BidText = "bid on", "Bid" end
    + local bidText, BidText = "|cffc83742purchase|r", "|cffc83742Buyout|r"
    + if (not item.canbuy or item.purchase < item.buy) then bidText, BidText = "|cff80c837bid on|r", "|cff80c837Bid|r" end

    local hours
    if (item.remain == 4) then hours = 24
    @@ -1287,16 +1287,22 @@
    elseif (item.remain == 1) then hours = 0.5
    end

    - BtmScan.Prompt.Lines[1]:SetLine(tr("Do you want to %1:", bidText))
    + local reason = "|cffff0000erm...?"
    + if (item.reason == "resale") then reason = "|cff75d8dd"..item.reason
    + elseif (item.reason == "vendor") then reason = "|cffb165e4"..item.reason
    + elseif (item.reason == "disenchant") then reason = "|cffffa54a"..item.reason
    + end
    + reason = reason.."|r"
    +
    + BtmScan.Prompt.Lines[1]:SetLine(tr("%1 for %2?", BidText, reason))
    BtmScan.Prompt.Lines[2]:SetLine(" "..item.link.." x"..item.count)
    BtmScan.Prompt.Lines[3]:SetLine(" "..tr("Seller: %1, Remain: %2h", item.owner, hours))
    BtmScan.Prompt.Lines[4]:SetLine(" "..tr("%1 price:", BidText), BtmScan.Coins(Vi,true))
    - BtmScan.Prompt.Lines[5]:SetLine(" "..tr("Purchasing for:"), item.reason)
    - BtmScan.Prompt.Lines[6]:SetLine(" "..tr("Valuation estimate:"), BtmScan.Coins(Vf,true))
    - BtmScan.Prompt.Lines[7]:SetLine(" "..tr("Potential profit:"), BtmScan.Coins(profit,true))
    - BtmScan.Prompt.Lines[8]:SetLine(" "..tr("Return on investment:"), roi.."%")
    - BtmScan.Prompt.Lines[9]:SetLine(" "..tr("Discounted rate:"), disc.."%")
    - BtmScan.Prompt.Lines[10]:SetLine(" "..tr("Profit above requirements:"), BtmScan.Coins(item.profit,true))
    + BtmScan.Prompt.Lines[5]:SetLine(" "..tr("Valuation estimate:"), BtmScan.Coins(Vf,true))
    + BtmScan.Prompt.Lines[6]:SetLine(" "..tr("Potential profit:"), BtmScan.Coins(profit,true))
    + BtmScan.Prompt.Lines[7]:SetLine(" "..tr("Return on investment:"), roi.."%")
    + BtmScan.Prompt.Lines[8]:SetLine(" "..tr("Discounted rate:"), disc.."%")
    + BtmScan.Prompt.Lines[9]:SetLine(" "..tr("Profit above requirements:"), BtmScan.Coins(item.profit,true))
    BtmScan.Prompt.Item:GetNormalTexture():SetTexture(item.tex)
    BtmScan.Prompt.Item:GetNormalTexture():SetTexCoord(0,1,0,1)
    PlaySoundFile("Interface\\AddOns\\btmScan\\Sounds\\DoorBell.mp3")
    •  
      CommentAuthorMattBnr
    • CommentTimeSep 20th 2007
     
    So exactly where do i copy and paste this code into the lua at?
    •  
      CommentAuthordinesh
    • CommentTimeSep 20th 2007
     
    that is a diff file. it can't be just copied and pasted in, it shows what lines to add, and what lines to delete.
    •  
      CommentAuthorMattBnr
    • CommentTimeSep 20th 2007
     
    oh ok soi have to manually edit each line ok thanks
    •  
      CommentAuthorMattBnr
    • CommentTimeSep 20th 2007
     
    What does the minimum discount settings mean on btm for like disenchant and resale? ive moved them around but they don't seem to be doing anything to affect the prices? maybe im over looking something thanks on such a great addon.
    • CommentAuthorkrachtwerk
    • CommentTimeSep 20th 2007
     
    Not sure either. What I did find out, is that for disenchanting you still have to check 'Use custom levels' for it to work. (at least on my end)
    •  
      CommentAuthorMattBnr
    • CommentTimeSep 21st 2007
     
    i believe the minimum discount affects how much you can resell the items for like earlier i had item i could buy out for 10c and sell to vendor for 20s and it had a minimum discount of 50% cause i could make 50% profit on the item i may be reading this wrong if i am please correct me.
    •  
      CommentAuthorDeckard
    • CommentTimeSep 21st 2007
     
    Could we get a screenshot? Thanks.
    •  
      CommentAuthorMattBnr
    • CommentTimeSep 21st 2007
     
    screenshot of what? and i tried to post a screenshot here once and it was too big i couldn't get it to post. how do i go about posting a screenshot thanks.
    •  
      CommentAuthorDeckard
    • CommentTimeSep 21st 2007
     
    By your description, you've changed the look of the original BTM dialog box, I just wanted to see yours.

    Beats me how to get a screenshot up here, I'd assume you attach it as a file or format your post as HTML and put in a link. If the file is too big, just use a graphics editing program and make it a JPEG file to reduce the size.

    I've seen many other posts in these forums with screenshots.
    •  
      CommentAuthorMattBnr
    • CommentTimeSep 21st 2007 edited
     
    I have changed the original i used the code provided in the first post by krachtwerk. all it does is change the color of the text to make it easier to see what is happening and what your buying.
      24712.WoWScrnShot_092107_005215.jpg
      24712.WoWScrnShot_092107_010442.jpg
      24712.WoWScrnShot_092107_010444.jpg
    •  
      CommentAuthorMattBnr
    • CommentTimeSep 21st 2007 edited
     
    also more settings. and no i don't resell items they never seem to resell for me so i stick to the vendor and DE its a more steady income.
      24716.WoWScrnShot_092107_010445.jpg
      24716.WoWScrnShot_092107_010454.jpg
      24716.WoWScrnShot_092107_010458.jpg
    • CommentAuthorkrachtwerk
    • CommentTimeSep 21st 2007
     
    I did not only add the 'pretty' colors, I also moved the reason for the popup from somewhere in between into the title.

    @Sykora:

    AT YOUR OWN RISK!:

    1 - Go to Interface/Addons/btmscan in your wow dir
    2 - Make a backup copy of the file called 'btmMain.lua', in case you mess things up ;)
    3 - Open 'btmMain.lua' in notepad, or some other text editor (not MS WORD or anything that complicated!)
    4 - Go to line 1269/search for 'BtmScan.PromptPurchase = function(item)', the function that displays the prompt.
    5 - This function is about 40 lines long, and ends with the 'end' statement just after after 'BtmScan.Prompt:Show()'
    6 - Replace this entire block of text with the following:


    BtmScan.PromptPurchase = function(item)
    BtmScan.scanStage = 3
    BtmScan.Prompt.item = item

    -- format the profit percentage as an integer (can still be huge)
    local Vi, Vf = item.purchase, item.valuation

    local profit = Vf - Vi
    local roi = math.floor( (100 * profit / Vi) + 0.5 )
    local disc = math.floor( (100 * (1 - Vi / Vf)) + 0.5 )

    local bidText, BidText = "|cffc83742purchase|r", "|cffc83742Buyout|r"
    if (not item.canbuy or item.purchase < item.buy) then bidText, BidText = "|cff80c837bid on|r", "|cff80c837Bid|r" end

    local hours
    if (item.remain == 4) then hours = 24
    elseif (item.remain == 3) then hours = 8
    elseif (item.remain == 2) then hours = 2
    elseif (item.remain == 1) then hours = 0.5
    end

    local reason = "|cffff0000who knows"
    if (item.reason == "resale") then reason = "|cff75d8dd"..item.reason
    elseif (item.reason == "vendor") then reason = "|cffb165e4"..item.reason
    elseif (item.reason == "disenchant") then reason = "|cffffa54a"..item.reason
    end
    reason = reason.."|r"

    BtmScan.Prompt.Lines[1]:SetLine(tr("%1 for %2?", BidText, reason))
    BtmScan.Prompt.Lines[2]:SetLine(" "..item.link.." x"..item.count)
    BtmScan.Prompt.Lines[3]:SetLine(" "..tr("Seller: %1, Remain: %2h", item.owner, hours))
    BtmScan.Prompt.Lines[4]:SetLine(" "..tr("%1 price:", BidText), BtmScan.Coins(Vi,true))
    BtmScan.Prompt.Lines[5]:SetLine(" "..tr("Valuation estimate:"), BtmScan.Coins(Vf,true))
    BtmScan.Prompt.Lines[6]:SetLine(" "..tr("Potential profit:"), BtmScan.Coins(profit,true))
    BtmScan.Prompt.Lines[7]:SetLine(" "..tr("Return on investment:"), roi.."%")
    BtmScan.Prompt.Lines[8]:SetLine(" "..tr("Discounted rate:"), disc.."%")
    BtmScan.Prompt.Lines[9]:SetLine(" "..tr("Profit above requirements:"), BtmScan.Coins(item.profit,true))
    BtmScan.Prompt.Item:GetNormalTexture():SetTexture(item.tex)
    BtmScan.Prompt.Item:GetNormalTexture():SetTexCoord(0,1,0,1)
    PlaySoundFile("Interface\\AddOns\\btmScan\\Sounds\\DoorBell.mp3")
    BtmScan.Prompt:Show()
    end
    • CommentAuthorSykora
    • CommentTimeSep 21st 2007 edited
     
    AWESOME! It worked! Thanks so much, Krachtwerk!

    And now I'm wondering... is there any way to make certain data bits show up in a different color? For example the Discounted percentage? I really dislike the layout of the new popup window, I'm usually on a different computer, doing other things, and I have to roll over here, and squint at the popup to make my evaluation. >_<

    Can I also make just certain bits bigger? Like a bigger font? Actually, I'd settle for just making the whole thing bigger, if need be.

    I think I'd be able to work with just small codey examples, wouldn't need the whole big code copy-paste this time. (I hope I can handle it, anyhow! =D)
    •  
      CommentAuthorDeckard
    • CommentTimeSep 21st 2007
     
    Excellent stuff krachtwerk! Thanks for posting that code, I like the layout.

    Thanks matt for posting the screenies too, looks like it worked out just fine.
World of Warcraft™ and Blizzard Entertainment™ are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.