Results 1 to 7 of 7

Thread: Hud kill count possible?

  1. #1
    Normal User
    Join Date
    May 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4

    Hud kill count possible?

    Is there a string that can be used to count the amount of times you have killed a specific type of creature, that will show on the HUD?

  2. #2
    Normal User Nidray's Avatar
    Join Date
    Feb 2013
    Location
    Sweden
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    15
    Rep Power
    4
    Code:
    local SCREEN_X, SCREEN_Y = 20, 35
    local CONSIDER_MONSTERS = {"lizard high guard", "lizard legionnaire", "lizard chosen"} -- can add more
    
    --[[ ENGINE ]]--
    local SCRIPT_INFO = "Name: Task Helper\nVersion: 1.3.1\nAuthor: Ropiderz"
    local SERVER_LOG_MSG, SERVER_LOG_MSG_COUNT, KILLED_CREATURES = getmessages("Server Log"), SERVER_LOG_MSG.count - 1, 0
    for INDEX = 0, SERVER_LOG_MSG_COUNT do
    	if (SERVER_LOG_MSG[SERVER_LOG_MSG_COUNT - INDEX].text:find('Loot of a') and SERVER_LOG_MSG[SERVER_LOG_MSG_COUNT - INDEX].type == 19) then
    		for _, MONSTER in ipairs(CONSIDER_MONSTERS) do
    			if (SERVER_LOG_MSG[SERVER_LOG_MSG_COUNT - INDEX].text:find(MONSTER:lower)) then
    				KILLED_CREATURES = KILLED_CREATURES + 1
    			end
    		end
    	end
    end
    addtext('Currently killed ' .. KILLED_CREATURES .. ' Monsters', SCREEN_X, SCREEN_Y)




    Free Scripts from me can be found here

  3. #3
    Normal User
    Join Date
    May 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    ok, so I am kind of new to this scripting. Can you simplify this for me. What portions should I be editing for my situation, and does the engine go under actions? or with the addtext in the hud?

    Sorry, I am just trying to understand this, lol.

  4. #4
    Normal User Nidray's Avatar
    Join Date
    Feb 2013
    Location
    Sweden
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    15
    Rep Power
    4
    It all goes as a HUD

    local CONSIDER_MONSTERS = {"lizard high guard", "lizard legionnaire", "lizard chosen"} -- can add more <--- Thats the part you need to edit




    Free Scripts from me can be found here

  5. #5
    Normal User
    Join Date
    May 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    After adding this to my HUD, the HUD wont show anything, which usually means there is an error in the script, is that right? and how do I fix it?

  6. #6
    Normal User Nidray's Avatar
    Join Date
    Feb 2013
    Location
    Sweden
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    15
    Rep Power
    4
    Hmm no idea, it should work :/ Is the HUD enabled (stupid question but sometimes you forget it ^^)




    Free Scripts from me can be found here

  7. #7
    Normal User
    Join Date
    May 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    yes. it is. I am not sure why its not working. oh well. Thanks for your help anyway.

Tags for this Thread

Posting Permissions

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