Results 1 to 3 of 3

Thread: Task counter doesn't work

  1. #1
    iBot User Xaoo's Avatar
    Join Date
    May 2014
    Location
    London
    Posts
    136
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    63 Post(s)
    Reputation
    21
    Rep Power
    3

    Task counter doesn't work

    From bosse script:
    Lua Code:
     
     
        local CONFIG = {
            TITLE = "Awsome Task Counter",
     
            DRAW_TYPE = "border",
            POSITION = {X = 20, Y = 440},
            MONSTERS = {"Carniphila"},
            COLOR = rgbcolor(113, 113, 198),
     
            VERSION = "1.0",
        }
     
        --[[ DON'T EDIT BELOW THIS LINE ]]--
     
        local MESSAGES = getnewmessages("Server Log")
     
        KILLED_CREATURES = KILLED_CREATURES or 0
     
        for INDEX = 0, MESSAGES.count - 1 do
            local m = MESSAGES[INDEX]
     
            if m.type == 19 and m.text:find("Loot of") then
                local MONSTER_NAME = m.text:match('Loot of (.+): (.+)')
     
                if MONSTER_NAME:sub(1, 4):lower() == 'the ' then
                    MONSTER_NAME = MONSTER_NAME:sub(5)
                elseif MONSTER_NAME:sub(1, 3):lower() == 'an ' then
                    MONSTER_NAME = MONSTER_NAME:sub(4)
                elseif MONSTER_NAME:sub(1, 2):lower() == 'a ' then
                    MONSTER_NAME = MONSTER_NAME:sub(3)
                end
     
                MONSTER_NAME = MONSTER_NAME:lower()
     
                for _, NAME_MATCH in ipairs(CONFIG.MONSTERS) do
                    if NAME_MATCH:lower() == MONSTER_NAME then
                        KILLED_CREATURES = KILLED_CREATURES + 1
                    end
                end
            end
        end
     
        function addcustomtext(TEXT, X, Y, COLOR)
            setfontcolor(rgbcolor(10, 10, 10))
            if CONFIG.DRAW_TYPE:upper() == "SHADOW" then
                addtext(TEXT, X + 1, Y + 1)
            elseif CONFIG.DRAW_TYPE:upper() == "BORDER" then
                addtext(TEXT, X + 1, Y + 1)
                addtext(TEXT, X - 1, Y - 1)
                addtext(TEXT, X - 1, Y + 1)
                addtext(TEXT, X + 1, Y - 1)
                addtext(TEXT, X, Y + 1)
                addtext(TEXT, X, Y - 1)
                addtext(TEXT, X + 1, Y)
                addtext(TEXT, X - 1, Y)
            end
            setfontcolor(COLOR)
            return addtext(TEXT, X, Y)
        end
     
        addcustomtext(string.format("Currently killed %s creatures.", KILLED_CREATURES), CONFIG.POSITION.X, CONFIG.POSITION.Y, CONFIG.COLOR)


    Even if killed 300 Carn, he won't go to finish the task.

  2. #2
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Thats just the hud, the hud works fine.

    There must/should be another action that checks how many you've killed and goes off and does the boss and starts the task again.

  3. #3
    iBot User Xaoo's Avatar
    Join Date
    May 2014
    Location
    London
    Posts
    136
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    63 Post(s)
    Reputation
    21
    Rep Power
    3
    Theres one action called killed_count, its off and its always 0. Is it right?

Posting Permissions

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