Signup Now
Results 1 to 6 of 6

Thread: Anti Idle

  1. #1
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28

    Anti Idle

    Anti Idle


    Description

    Turns different directions every 5 ~ 10 minutes if you have been standing still for longer than that.


    Requirements




    Code

    init start
    local lastStand = $standtime
    local randTime = math.random(300000, 600000)
    init end

    auto(100)

    if $standtime < lastStand then
    lastStand = $standtime
    end

    if $standtime - lastStand > randTime then
    local dirs = {'n', 'e', 's', 'w'}

    -- Makes sure it's random and not the same we're facing right now
    table.remove(dirs, table.find(dirs, $self.dir))
    turn(dirs[math.random(1, 3)])
    waitping()

    lastStand = $standtime
    randTime = math.random(300000, 600000)
    end

    Gist
    Last edited by Raphael; 12-26-2013 at 01:28 AM.

  2. #2
    Free User jakub's Avatar
    Join Date
    Dec 2013
    Location
    Poland
    Posts
    132
    Reputation
    32
    Rep Power
    21
    An other way to determinate facing direction :-)
    Thank you

  3. #3
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Script updated, was fucked up.

  4. #4
    Helper StaR's Avatar
    Join Date
    Dec 2013
    Location
    Manchester
    Posts
    713
    Reputation
    50
    Rep Power
    22
    Removed - Posted in wrong thread
    Last edited by StaR; 09-03-2014 at 09:30 PM.



  5. #5
    Free User downloadkct's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    1,167
    Reputation
    25
    Rep Power
    23
    Quote Originally Posted by Raphael View Post
    Anti Idle


    Description

    Turns different directions every 5 ~ 10 minutes if you have been standing still for longer than that.


    Requirements




    Code

    init start
    local lastStand = $standtime
    local randTime = math.random(300000, 600000)
    init end

    auto(100)

    if $standtime < lastStand then
    lastStand = $standtime
    end

    if $standtime - lastStand > randTime then
    local dirs = {'n', 'e', 's', 'w'}

    -- Makes sure it's random and not the same we're facing right now
    table.remove(dirs, table.find(dirs, $self.dir))
    turn(dirs[math.random(1, 3)])
    waitping()

    lastStand = $standtime
    randTime = math.random(300000, 600000)
    end

    Gist
    thanks mate
    Old 'n Proud Neobot-Elfbot and blackd user

  6. #6
    Free User
    Join Date
    Nov 2014
    Posts
    3
    Reputation
    10
    Rep Power
    0
    Hello could someone help me with this ?
    i need elp with persistent for if the char stand 10 seconds without move he will turn on cavebot

    init start
    local $standtime = (10000)
    setsetting('Cavebot/Enabled', 'yes')
    end

    is this right? Thanks

 

 

Posting Permissions

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