Results 1 to 2 of 2

Thread: Counter

  1. #1

    Join Date
    Jun 2012
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    7 Post(s)
    Reputation
    13
    Rep Power
    5

    Counter

    Hello again!

    I made a script that gets Heart of the Seas and use it on the Qjell statue.
    What I'm interrested in now is a counter that counts everytime I get the message after using the Heart of the Sea on the Qjell statue.

    "You carefully insert the blood red gem but it would take a hundred hearts to replace the original."

    I have no idea how to make it work. Tried something like:

    Code:
    getnewmessages("Server Log").text = "You carefully insert the blood red gem but it would take a hundred hearts to replace the original."
    then
    HeartCount = HeartCount + 1
    end
    Can someone help me out please?

    Yours Juden

  2. #2
    Banned
    Join Date
    May 2012
    Posts
    680
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    24
    Rep Power
    0
    I see you're really trying to understand, and I'm glad! This is why I'll take the time to help you out.

    PHP Code:
    local msgs getmessages("Server Log")
    local qtd msgs.count-1
    for i=0,qtd do
        if 
    msgs[qtd-i].text:find("You carefully insert the blood red gem but it would take a hundred hearts to replace the original."then
            HeartCount 
    HeartCount 1
        end
    end 
    Should work! If not, let me know

Posting Permissions

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