Results 1 to 6 of 6

Thread: count killed creatures.

  1. #1
    Normal User
    Join Date
    Jul 2012
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    count killed creatures.

    Hello, can some1 write an action to count how many creatures u have been killed. <3

  2. #2
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    PHP Code:
    CREATURES_KILLED CREATURES_KILLED or 0
    local MESSAGES 
    getnewmessages("Server Log")
    local MESSAGES_QUANTITY MESSAGES.count 1
    local CREATURES_PER_HOUR 
    math.floor((CREATURES_KILLED 3600) / (System.HuntingTime() / 1000))


    for 
    INDEX 0MESSAGES_QUANTITY do
        if (
    MESSAGES[MESSAGES_QUANTITY INDEX].text:find("Loot of a tarantula")) then
            CREATURES_KILLED 
    CREATURES_KILLED 1
        end
    end

    setfontcolor
    (rgbcolor(255248220))
    addtext("Creatures per hour:"15 30addtext(CREATURES_PER_HOUR,12030)
    addtext("Creatures killed:"1545addtext(CREATURES_KILLED12045
    Requires sirmate library.

  3. #3
    Normal User
    Join Date
    Jul 2012
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    thank you man !

  4. #4
    Normal User
    Join Date
    Jul 2012
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    dam idk why but it don't work for me, i got sirmate library.

  5. #5
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    Make sure this is right:
    text:find("Loot of a tarantula"))
    text:find("Loot of an energy elemental"))

    Also, this is HUD, not action.

  6. #6
    Normal User
    Join Date
    Jul 2012
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    oki it works now <3

Posting Permissions

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