XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 4 of 4

Thread: When stay X playsound?

  1. #1
    Elizabeth's Avatar
    Join Date
    Mar 2016
    Location
    Poland
    Posts
    53
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb When stay X playsound?

    I need script .lua when my character stay 60 second my client play alarm.
    This is possible?

  2. #2
    Senior Member Trykon's Avatar
    Join Date
    Nov 2014
    Location
    UK
    Posts
    940
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    It is possible:

    local seconds = 0
    local pos = Self.Position()

    while true then
    if Self.Position().x == pos.x and Self.Position().y == pos.y then
    seconds = seconds + 1
    if seconds >= 60 then
    alert()
    end
    else
    seconds = 0
    pos = Self.Position()
    end
    end

    This is not tested and written on the phone so you might want to check it before you run it
    All my full afk scripts are accessible at:
    My thread
    My store
    My project
    Looking for RL Tibia testers - RP and EK scripts for FREE. Link to info.

  3. #3
    Elizabeth's Avatar
    Join Date
    Mar 2016
    Location
    Poland
    Posts
    53
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Trykon View Post
    It is possible:

    local seconds = 0
    local pos = Self.Position()

    while true then
    if Self.Position().x == pos.x and Self.Position().y == pos.y then
    seconds = seconds + 1
    if seconds >= 60 then
    alert()
    end
    else
    seconds = 0
    pos = Self.Position()
    end
    end

    This is not tested and written on the phone so you might want to check it before you run it
    Line #: 4
    Error: 'do' expected near 'then'

    Not work my friend

  4. #4
    Senior Member Trykon's Avatar
    Join Date
    Nov 2014
    Location
    UK
    Posts
    940
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    local seconds = 0
    local pos = Self.Position()

    while true do
    if Self.Position().x == pos.x and Self.Position().y == pos.y then
    seconds = seconds + 1
    if seconds >= 60 then
    alert()
    end
    else
    seconds = 0
    pos = Self.Position()
    end
    end

    @Elizabeth
    All my full afk scripts are accessible at:
    My thread
    My store
    My project
    Looking for RL Tibia testers - RP and EK scripts for FREE. Link to info.

Posting Permissions

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