Results 1 to 3 of 3

Thread: Action para contar Gold Coin

  1. #1
    iBot User srjhon's Avatar
    Join Date
    Jun 2012
    Location
    Brasil
    Posts
    335
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5

    Action para contar Gold Coin

    Tem alguma action para contar o gold em uma bp que ja esta fechada ?
    Só consigo contar das bp's abertas...
    I'm back!

  2. #2
    Normal User Diabolic's Avatar
    Join Date
    Apr 2012
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    27
    Rep Power
    5
    Code:
    -- Loots
    local lootsitems = {'gold coin'}
    local lootsvalue = {1}
    
    -- Supplie
    local suppliesitems = {}
    local suppsvalue = {}
    
    -- Start Position
    local startpos = 200
    
    
    --dont change things below
    
    local loots = getitems(unpack(lootsitems))
    local qtdl = loots.count-1
    local totall = 0
    
    local supps = getitems(unpack(suppliesitems))
    local qtds = supps.count-1
    local totals = 0
    
    local startloot = 0
    
    setfontcolor("white")
    addtext("________________________________", 0,10+startpos)
    setfontcolor("red")
    
    -- Supplies
    for i=0,qtds do
       addtext(supps[i].name, 10,30+(startloot*15)+20+startpos)
       addtext(":", 140,30+(startloot*15)+20+startpos)
       addtext(supps[i].usage*suppsvalue[i+1], 150,30+(startloot*15)+20+startpos)
       startloot = startloot + 1
       totals = totals + supps[i].usage*suppsvalue[i+1]
    end
    
    setfontcolor("red")
    addtext("Supplie", 10,30+startpos)
    addtext(":", 140,30+startpos)
    addtext(totals, 150,30+startpos)
    
    setfontcolor("white")
    addtext("________________________________", 0,45+(startloot*15)+startpos)
    
    -- Loots
    
    setfontcolor("green")
    local posloot = 50+(startloot*15)+20+startpos
    
    for i=0,qtdl do
       addtext(loots[i].name, 10,50+(startloot*15)+40+startpos)
       addtext(":", 140,50+(startloot*15)+40+startpos)
       addtext(loots[i].loot*lootsvalue[i+1], 150,50+(startloot*15)+40+startpos)
       startloot = startloot + 1
       totall = totall + loots[i].loot*lootsvalue[i+1]
    end
    
    setfontcolor("green")
    addtext("Loots", 10,posloot)
    addtext(":", 140,posloot)
    addtext(totall, 150,posloot)
    
    setfontcolor("white")
    addtext("________________________________", 0,85+(startloot*15)+startpos)
    
    if totall-totals > 0 then
    setfontcolor("blue")
    else
    setfontcolor("red")
    end
    
    addtext("Total", 10,50+(startloot*15)+20+startpos+35)
    addtext(":", 140,50+(startloot*15)+20+startpos+35)
    addtext(totall-totals, 150,50+(startloot*15)+20+startpos+35)
    
    setfontcolor("white")
    addtext("________________________________", 0,115+(startloot*15)+startpos)
    Eu só peguei a HUD de loot counter do Jonatas e coloquei só pra contar gps...

    Créditos: Jonatas

    Att,
    Diabolic
    Att,
    Diabolic

  3. #3
    iBot User srjhon's Avatar
    Join Date
    Jun 2012
    Location
    Brasil
    Posts
    335
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    Quote Originally Posted by Diabolic View Post
    Code:
    -- Loots
    local lootsitems = {'gold coin'}
    local lootsvalue = {1}
    
    -- Supplie
    local suppliesitems = {}
    local suppsvalue = {}
    
    -- Start Position
    local startpos = 200
    
    
    --dont change things below
    
    local loots = getitems(unpack(lootsitems))
    local qtdl = loots.count-1
    local totall = 0
    
    local supps = getitems(unpack(suppliesitems))
    local qtds = supps.count-1
    local totals = 0
    
    local startloot = 0
    
    setfontcolor("white")
    addtext("________________________________", 0,10+startpos)
    setfontcolor("red")
    
    -- Supplies
    for i=0,qtds do
       addtext(supps[i].name, 10,30+(startloot*15)+20+startpos)
       addtext(":", 140,30+(startloot*15)+20+startpos)
       addtext(supps[i].usage*suppsvalue[i+1], 150,30+(startloot*15)+20+startpos)
       startloot = startloot + 1
       totals = totals + supps[i].usage*suppsvalue[i+1]
    end
    
    setfontcolor("red")
    addtext("Supplie", 10,30+startpos)
    addtext(":", 140,30+startpos)
    addtext(totals, 150,30+startpos)
    
    setfontcolor("white")
    addtext("________________________________", 0,45+(startloot*15)+startpos)
    
    -- Loots
    
    setfontcolor("green")
    local posloot = 50+(startloot*15)+20+startpos
    
    for i=0,qtdl do
       addtext(loots[i].name, 10,50+(startloot*15)+40+startpos)
       addtext(":", 140,50+(startloot*15)+40+startpos)
       addtext(loots[i].loot*lootsvalue[i+1], 150,50+(startloot*15)+40+startpos)
       startloot = startloot + 1
       totall = totall + loots[i].loot*lootsvalue[i+1]
    end
    
    setfontcolor("green")
    addtext("Loots", 10,posloot)
    addtext(":", 140,posloot)
    addtext(totall, 150,posloot)
    
    setfontcolor("white")
    addtext("________________________________", 0,85+(startloot*15)+startpos)
    
    if totall-totals > 0 then
    setfontcolor("blue")
    else
    setfontcolor("red")
    end
    
    addtext("Total", 10,50+(startloot*15)+20+startpos+35)
    addtext(":", 140,50+(startloot*15)+20+startpos+35)
    addtext(totall-totals, 150,50+(startloot*15)+20+startpos+35)
    
    setfontcolor("white")
    addtext("________________________________", 0,115+(startloot*15)+startpos)
    Eu só peguei a HUD de loot counter do Jonatas e coloquei só pra contar gps...

    Créditos: Jonatas

    Att,
    Diabolic

    Muito bom amigo, muito obrigado, +rep pra você e pro Jonatas
    I'm back!

Posting Permissions

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