Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Counter with Reset

  1. #1
    iBot User
    Join Date
    Oct 2012
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    10
    Rep Power
    5

    Exclamation Counter with Reset

    Anyone could help me?
    I need a counter with a reset.

    Ex: When the char talks to a NPC, and recieve a determinated message, it reset the counter.
    Ty
    Last edited by pulquerio; 04-26-2014 at 07:07 PM.

  2. #2
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    956 Post(s)
    Reputation
    586
    Rep Power
    10
    Do you need Recent PM HUD? if so then:

    Lua Code:
    -- max lines to display at once 
    local maxindex = 20
    -- spacing between lines
    local spacing = 10
    local index = 0
    local msgs = getmessages("Local Chat")
    local qtd = msgs.count-1
    for i=0,qtd do
    if msgs[qtd-i].type == 7
    then
    setfontcolor("red")
    addtext(msgs[qtd-i].text, worldwin.left+10,worldwin.top+30+(index*spacing))
    index=index+1
    if index == maxindex then
    break
    end
    end
    end
    Last edited by Eli; 04-21-2014 at 04:50 PM.

  3. #3
    iBot User
    Join Date
    Oct 2012
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    10
    Rep Power
    5
    Im sorry. It's a recent monster killed counter that i need.

  4. #4
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    956 Post(s)
    Reputation
    586
    Rep Power
    10
    Quote Originally Posted by pulquerio View Post
    Im sorry. It's a recent monster killed counter that i need.
    Ok, here you've got made by @pink_panther Link: http://www.tibiaibot.com/forum/showt...by-PinkPanther

  5. #5
    iBot User
    Join Date
    Oct 2012
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    10
    Rep Power
    5
    And how should I reset the hud?

  6. #6
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    956 Post(s)
    Reputation
    586
    Rep Power
    10
    Reset HUD in iBot main console

  7. #7
    iBot User
    Join Date
    Oct 2012
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    10
    Rep Power
    5
    Yeah, but it works manually.
    I actually need a function to work with the hud.

  8. #8
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    956 Post(s)
    Reputation
    586
    Rep Power
    10
    add where you want in wpt action resethud()

  9. #9
    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
    Just do an action that checks for npc message and have it execute reaethud ()

  10. #10
    iBot User
    Join Date
    Oct 2012
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    10
    Rep Power
    5
    I tested it, and it kept the number of recent killed.
    And I need a variable that return that number.

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
  •