Results 1 to 7 of 7

Thread: hud for wyrms

  1. #1
    Normal User kapaya's Avatar
    Join Date
    Mar 2014
    Location
    Sweden
    Posts
    16
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    12 Post(s)
    Reputation
    10
    Rep Power
    3

    Exclamation hud for wyrms

    Do Someon have or can make a 100% working wyrms HuD pls.?

  2. #2
    Moderator Furieri's Avatar
    Join Date
    Jun 2012
    Location
    Vitoria - ES / Brasil
    Posts
    792
    Mentioned
    62 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    199 Post(s)
    Reputation
    158
    Rep Power
    7

  3. #3
    Normal User kapaya's Avatar
    Join Date
    Mar 2014
    Location
    Sweden
    Posts
    16
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    12 Post(s)
    Reputation
    10
    Rep Power
    3
    that must have come up today cuz was not up erlier today when i looked for it.

  4. #4
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    Quote Originally Posted by kapaya View Post
    that must have come up today cuz was not up erlier today when i looked for it.
    My HUD has been up for weeks and weeks so..

  5. #5
    Normal User kapaya's Avatar
    Join Date
    Mar 2014
    Location
    Sweden
    Posts
    16
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    12 Post(s)
    Reputation
    10
    Rep Power
    3
    Quote Originally Posted by Drakke View Post
    My HUD has been up for weeks and weeks so..
    im i just copy this one
    local HUD =
    {
    TITLE = "DRAKKE'S SCRIPT",

    CONFIG =
    {
    ORIENTATION = "left",
    START_POSITION = {35, 30},
    MAX_TEXT_LENGTH = 20,
    TEXT_DISTANCE = 135,
    LINE_DISTANCE = 15,
    },

    LOOT_BASED_MESSAGE = true,

    ITEMS =
    {
    LOOT = getlootitems(),
    SUPPLY = getsupplieitems(),
    },

    COLORS = {
    SHADOW = rgbcolor(0, 0, 0),
    TITLE = rgbcolor(205, 200, 177),
    TEXT1 = rgbcolor(205, 200, 177),
    TEXT2 = rgbcolor(255, 255, 255),
    SUBTITLE = rgbcolor(210, 20, 10),
    TOTALLOOT = rgbcolor(107, 142, 35),
    TOTALSUPS = rgbcolor(178, 34, 34),
    PROFIT = rgbcolor(107, 142, 35),
    WASTE = rgbcolor(178, 34, 34),
    },
    }

    AMMO_COUNT, AMMO_COUNT_BP = AMMO_COUNT or 0, AMMO_COUNT_BP or 0

    local DISTANCE_WEAPONS, AMMUNITION, AMMO_NAME, AMMO_TYPE_COUNT, ADD_TO_HUD = {"assassin star", "enchanted spear", "hunting spear", "mean paladin spear", "royal spear", "small stone", "snowball", "spear", "throwing knife", "throwing star", "viper star"}, {"arrow", "burst arrow", "crystalline arrow", "earth arrow", "envenomed arrow", "flaming arrow", "flash arrow", "onyx arrow", "poison arrow", "shiver arrow", "sniper arrow", "tarsal arrow", "infernal bolt", "drill bolt", "power bolt", "prismatic bolt", "vortex bolt", "piercing bolt", "bolt"}, nil, 0, 0

    if (weapon ~= 0) and (table.find(DISTANCE_WEAPONS, itemname(weapon):lower())) then
    AMMO_NAME, AMMO_TYPE_COUNT = itemname(weapon) or nil, weaponamount or 0
    elseif (ammo ~= 0) and (table.find(AMMUNITION, itemname(ammo):lower())) then
    AMMO_NAME, AMMO_TYPE_COUNT = itemname(ammo) or nil, ammoamount or 0
    end

    if (AMMO_NAME ~= nil) then
    local CURRENT_AMMO_COUNT = itemcount(AMMO_NAME)
    if (AMMO_TYPE_COUNT < AMMO_COUNT) then
    ADD_TO_HUD = math.max(0, AMMO_COUNT-AMMO_TYPE_COUNT)
    elseif (AMMO_TYPE_COUNT > AMMO_COUNT) and (CURRENT_AMMO_COUNT < AMMO_COUNT_BP) then
    ADD_TO_HUD = math.max(0, (AMMO_COUNT+(AMMO_COUNT_BP-CURRENT_AMMO_COUNT))-100)
    end

    addhudsupplie(AMMO_NAME, ADD_TO_HUD)
    AMMO_COUNT, AMMO_COUNT_BP = AMMO_TYPE_COUNT, CURRENT_AMMO_COUNT
    end

    function formatnumber(n, s)
    local result, sign, before, after = '', string.match(tostring(n), '^([%+%-]?)(%d*)(%.?.*)$')

    while #before > 3 do
    result = (s or '.') .. string.sub(before, -3, -1) .. result
    before = string.sub(before, 1, -4)
    end

    return sign .. before .. result .. after
    end

    local X, Y, INDEX, TOTAL, TOTAL_LOOTED, TOTAL_WASTED = (HUD.CONFIG.ORIENTATION:lower() == "right" and worldwin.right + 10 or clientwin.left + 10) + HUD.CONFIG.START_POSITION[1], worldwin.top + 10 + HUD.CONFIG.START_POSITION[2], 1, 0, 0, 0

    setpen(0,0,0)
    setfillcolor(92,92,92)
    local var = addrect(X + 170, Y-10, 40,15)
    addevent(var, MOUSE_LEFT_DOWN, "resethud()")
    setpen(205,205,205)
    addtext("Reset", X + 170+3, Y+2)

    setfontcolor(HUD.COLORS.TITLE)
    addtextstroke(HUD.TITLE, X, Y)

    Y = Y + 20

    setfontcolor(HUD.COLORS.SUBTITLE)
    addtextstroke("ITEMS LOOTED:", X, Y)

    Y = Y + 5

    local lootqtd = HUD.ITEMS.LOOT.count-1
    for it = 0, lootqtd do
    local ITEM = HUD.ITEMS.LOOT[it]
    local itemamount = ITEM.loottake
    if HUD.LOOT_BASED_MESSAGE then
    itemamount = ITEM.lootmessage
    end

    if itemamount > 0 then
    Y = Y + HUD.CONFIG.LINE_DISTANCE
    local itemvalue = ITEM.npcsell
    if ITEM.custom ~= 0 then
    itemvalue = ITEM.custom
    end

    additem(ITEM.id, X - 20, Y - 14, 50)

    setfontcolor(HUD.COLORS.TEXT1)
    addtextstroke((#ITEM.name < HUD.CONFIG.MAX_TEXT_LENGTH and ITEM.name or ITEM.name:sub(1, HUD.CONFIG.MAX_TEXT_LENGTH) .. "..."):gsub("(%a)([%w_']*)", function(s1, s2) return s1:upper() .. s2:lower() end), X, Y)
    setfontcolor(HUD.COLORS.TEXT2)
    addtextstroke(string.format("%s (%s k)", formatnumber(itemamount), math.floor(itemamount * itemvalue / 100) / 10), X + HUD.CONFIG.TEXT_DISTANCE, Y)

    TOTAL, TOTAL_LOOTED = TOTAL + itemamount * itemvalue, TOTAL_LOOTED + (itemamount * itemvalue)
    end
    end

    Y = Y + HUD.CONFIG.LINE_DISTANCE + 2

    setfontcolor(HUD.COLORS.TEXT2)
    addtextstroke("Total: ", X, Y)

    setfontcolor(HUD.COLORS.PROFIT)
    addtextstroke('+' .. formatnumber(TOTAL_LOOTED) .. " GPs", X+35, Y)

    Y = Y + 25

    setfontcolor(HUD.COLORS.SUBTITLE)
    addtextstroke("SUPPLIES USED:", X, Y)

    Y = Y + 5

    local supplyqtd = HUD.ITEMS.SUPPLY.count-1
    for it = 0, supplyqtd do
    local ITEM = HUD.ITEMS.SUPPLY[it]
    if ITEM.usagemessage > 0 then
    Y = Y + HUD.CONFIG.LINE_DISTANCE
    additem(ITEM.id, X - 20, Y - 14, 50)

    setfontcolor(HUD.COLORS.TEXT1)
    addtextstroke((#ITEM.name < HUD.CONFIG.MAX_TEXT_LENGTH and ITEM.name or ITEM.name:sub(1, HUD.CONFIG.MAX_TEXT_LENGTH) .. "..."):gsub("(%a)([%w_']*)", function(s1, s2) return s1:upper() .. s2:lower() end), X, Y)

    setfontcolor(HUD.COLORS.TEXT2)
    addtextstroke(string.format("%s (%sk)", formatnumber(ITEM.usagemessage), math.floor(ITEM.usagemessage * (ITEM.buyvalue or itemvalue(ITEM.name)) / 100) / 10), X + HUD.CONFIG.TEXT_DISTANCE, Y)

    TOTAL, TOTAL_WASTED = TOTAL - ITEM.usagemessage * (ITEM.buyvalue or itemvalue(ITEM.name)), TOTAL_WASTED + (ITEM.usagemessage * (ITEM.buyvalue or itemvalue(ITEM.name)))
    end
    end

    Y = Y + HUD.CONFIG.LINE_DISTANCE + 2

    setfontcolor(HUD.COLORS.TEXT2)
    addtextstroke("Total: ", X, Y)

    setfontcolor(HUD.COLORS.WASTE)
    addtextstroke("-" .. formatnumber(TOTAL_WASTED) .. " GPs", X + 35, Y)

    Y = Y + 25

    setfontcolor(TOTAL_LOOTED - TOTAL_WASTED >= 0 and HUD.COLORS.PROFIT or HUD.COLORS.WASTE)
    addtextstroke(string.format("%s %s GPs (%s k/h)", TOTAL_LOOTED - TOTAL_WASTED >= 0 and "PROFIT:" or "WASTE:", formatnumber(TOTAL_LOOTED - TOTAL_WASTED), math.floor(((TOTAL_LOOTED - TOTAL_WASTED) / (tosec(timehunt) / 3600)) / 100) / 10), X, Y)
    And it shall count every loot/gps Exatclty 100%?

  6. #6
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    Quote Originally Posted by kapaya View Post
    im i just copy this one And it shall count every loot/gps Exatclty 100%?
    Think that one is for iBot+ tho, so take the other one

    And use [.luas] [./luas] when writing code :3
    Last edited by Drakke; 09-17-2014 at 06:37 PM.

  7. #7
    Normal User kapaya's Avatar
    Join Date
    Mar 2014
    Location
    Sweden
    Posts
    16
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    12 Post(s)
    Reputation
    10
    Rep Power
    3
    Quote Originally Posted by Drakke View Post
    Think that one is for iBot+ tho, so take the other one

    And use [.luas] [./luas] when writing code :3
    okay thanks for your help and sory for my poor english skills.

Posting Permissions

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