Signup Now
Results 1 to 1 of 1

Thread: Combinatorics

  1. #1
    Free User Dolmero's Avatar
    Join Date
    Jun 2016
    Location
    Sweden
    Posts
    118
    Reputation
    56
    Rep Power
    16

    Combinatorics

    Simple HUD I'm using for the combinatorics task. Thought I'd share.

    init start	
    local fontsize = 7
    local fontspacing = fontsize + 6

    setmaskcolorxp(0)
    local biglist = biglist or {}
    local anemone = anemone or 0
    local devourer = devourer or 0
    local golem = golem or 0
    local ci = ci or 1
    init end

    setposition($worldwin.right, $worldwin.bottom-fontspacing*5)

    foreach newmessage m do
    if m.type == 17 and m.content:find("^Combo") or m.content:find("^Consecutive") then
    anemone = string.find(m.content, "anemone")
    devourer = string.find(m.content, "devourer")
    golem = string.find(m.content, "golem")
    biglist = {anemone, devourer, golem}
    table.sort(biglist)
    ci = 1
    end
    if m.type == 20 and m.content:find("^Loot of ") then
    if string.find(m.content, "anemone") ~= nil then
    ci = ci + 1
    end
    if string.find(m.content, "golem") ~= nil then
    ci = ci + 1
    end
    if string.find(m.content, "devourer") ~= nil then
    ci = ci + 1
    end
    end
    end
    for i, v in ipairs(biglist) do
    if ci > i then
    setfontstyle('Tahoma', fontsize, 99, 0x00FF00, 1, 0)
    elseif ci == i then
    setfontstyle('Tahoma', fontsize, 99, 0xFF9900, 1, 0)
    else
    setfontstyle('Tahoma', fontsize, 99, 0xE9D332, 1, 0)
    end
    if v == anemone then
    drawtext('Anemone', 2, fontspacing*i)
    elseif v == devourer then
    drawtext('Devourer', 2, fontspacing*i)
    else
    drawtext('Golem', 2, fontspacing*i)
    end
    end
    Last edited by Dolmero; 08-22-2016 at 05:20 PM.

 

 

Posting Permissions

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