Results 1 to 9 of 9

Thread: Need help action

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

    Need help action

    I need an action that activates the cavebot only if X player is on the screen,
    if not, cavebotting stop ...
    I think this way because I want to hunt an heavy area with two chaars, and could not think of anything better, if you can help me thank you

  2. #2
    Focus Group Gryllz's Avatar
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    3,482
    Mentioned
    89 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    236 Post(s)
    Reputation
    342
    Rep Power
    10
    Try this:


    Lua Code:
    local players =  "Nick"
     
     
    if paround(10) >= players then
    setcavebot("yes")
    wait(1000)
    else setcavebot("no")
    wait(1000)
    end
    Last edited by Gryllz; 12-12-2013 at 10:15 PM.

  3. #3
    Normal User serialbob's Avatar
    Join Date
    Jul 2012
    Location
    Goroma depot
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    11
    Rep Power
    5
    hi Gryllz ! i have a question about that too .. why did u put (10) after paround ?

  4. #4
    Focus Group Gryllz's Avatar
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    3,482
    Mentioned
    89 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    236 Post(s)
    Reputation
    342
    Rep Power
    10
    Players around 10.

  5. #5
    Normal User
    Join Date
    Jun 2012
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    but in this local have other players hunting..
    so I need something that specify the nickname of chaar;/

  6. #6
    Focus Group Gryllz's Avatar
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    3,482
    Mentioned
    89 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    236 Post(s)
    Reputation
    342
    Rep Power
    10
    I thought you meant X amount of players. Replace local players = "3" on the correct nick.
    Last edited by Gryllz; 12-12-2013 at 10:16 PM.

  7. #7
    Normal User
    Join Date
    Jun 2012
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    perfect!!! thank you so much

  8. #8
    Focus Group Gryllz's Avatar
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    3,482
    Mentioned
    89 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    236 Post(s)
    Reputation
    342
    Rep Power
    10
    You welcome!

    //Thread closed.

  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
    Quote Originally Posted by Gryllz View Post
    I thought you meant X amount of players. Replace local players = "3" on the correct nick.
    Quote Originally Posted by Gryllz View Post
    Try this:


    Lua Code:
    local players =  "Nick"
     
     
    if paround(10) >= players then
    setcavebot("yes")
    wait(1000)
    else setcavebot("no")
    wait(1000)
    end
    This wont work.

    Even if you use this

    Lua Code:
    local players =  "3"
     
     
    if paround(10) >= players then
    setcavebot("yes")
    wait(1000)
    else setcavebot("no")
    wait(1000)
    end


    In both instances you are trying to compare an int to a string, so it will always result in an exception. Putting a number in quotes mates it a string



    What you probably want is

    Lua Code:
    local namePlayers =  {"Oblivion", "Bubble", "My other char"} -- Array of player names
    local numberPlayer = 1
     
    if paround(10, unpack(namePlayers)) >= numberPlayer then
    	setcavebot("yes")
    else
    	setcavebot("no")
    end


    This will check to see if the listered players around you is equal to or more than the number specified before it keeps botting.

    This way, you can put 1 char name in the list and set the count to 1, so if your alt goes off screen, it will stop.

    However, note that if one is on slow supplies, and leaves, your other char will also stop and could die, so be careful with turning off cavebotting.


    Me noob scripter

    //Gryllz
    Last edited by Gryllz; 12-13-2013 at 06:12 AM.

Posting Permissions

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