Signup Now
Results 1 to 8 of 8
  1. #1
    Free User
    Join Date
    Apr 2014
    Posts
    4
    Reputation
    10
    Rep Power
    0

    Ignore monsters with NO Spears

    I need a script with when my spears over the character ignore the monsters and go to the X waypoint (But this script need to be atived in all cavebot time, and not in only a Action Waypoint) understand? Sorry for my bad english

  2. #2
    Free User
    Join Date
    Dec 2013
    Posts
    190
    Reputation
    11
    Rep Power
    21
    Try adding this on your scripter

    don't forget to change "Monster" in each setting for the monsters on your script


    local ammo = "spear"
    local amount_ammo = 3

    auto(200)

    if itemcount(ammo) <= amount_ammo then
    setsetting('Targeting/Creatures/Monster/Setting1/OnlyIfTrapped', 'yes')
    setsetting('Targeting/Creatures/Monster/Setting1/OnlyIfTrapped', 'yes')
    setsetting('Targeting/Creatures/Monster/Setting1/OnlyIfTrapped', 'yes')
    else
    setsetting('Targeting/Creatures/Monster/Setting1/OnlyIfTrapped', 'no')
    setsetting('Targeting/Creatures/Monster/Setting1/OnlyIfTrapped', 'no')
    setsetting('Targeting/Creatures/Monster/Setting1/OnlyIfTrapped', 'no')
    end

  3. #3
    Free User
    Join Date
    Apr 2014
    Posts
    4
    Reputation
    10
    Rep Power
    0
    (sorry for bad english)

    And if i use this? will works fine with what i need?

    local ammo = "royal spear"
    local amount_ammo = 5

    auto(200)

    if itemcount(ammo) <= amount_ammo then
    set('Targeting/Enabled', 'yes')
    else
    set('Targeting/Enabled', 'no')
    end

  4. #4
    Free User CroiX's Avatar
    Join Date
    Jan 2014
    Posts
    890
    Reputation
    61
    Rep Power
    22
    Quote Originally Posted by arruda View Post
    Try adding this on your scripter

    don't forget to change "Monster" in each setting for the monsters on your script


    local ammo = "spear"
    local amount_ammo = 3

    auto(200)

    if itemcount(ammo) <= amount_ammo then
    setsetting('Targeting/Creatures/Monster/Setting1/OnlyIfTrapped', 'yes')
    setsetting('Targeting/Creatures/Monster/Setting1/OnlyIfTrapped', 'yes')
    setsetting('Targeting/Creatures/Monster/Setting1/OnlyIfTrapped', 'yes')
    else
    setsetting('Targeting/Creatures/Monster/Setting1/OnlyIfTrapped', 'no')
    setsetting('Targeting/Creatures/Monster/Setting1/OnlyIfTrapped', 'no')
    setsetting('Targeting/Creatures/Monster/Setting1/OnlyIfTrapped', 'no')
    end

    Just a tip, add a table instead of writing onto every line

    local ammo = "royal spear"
    local amount_ammo = 3
    local monsters = "Rat", "Cave Rat", "Bug"
    auto(200)
    if itemcount(ammo) <= amount_ammo then
    for _, v in ipairs(monsters) do
    setsetting('Targeting/Creatures/' .. v .. '/Setting1/OnlyIfTrapped', 'yes')
    end
    else
    for _, v in ipairs(monsters) do
    setsetting('Targeting/Creatures/' .. v .. '/Setting1/OnlyIfTrapped', 'no')
    end
    end

    Quote Originally Posted by Felipex View Post
    (sorry for bad english)

    And if i use this? will works fine with what i need?
    Well, if you get trapped you'll die cus targeting is off.
    Last edited by CroiX; 04-13-2014 at 08:24 PM.

    ---

    Quote or Tag me if you want me to reply quicker


  5. #5
    Free User
    Join Date
    Apr 2014
    Posts
    4
    Reputation
    10
    Rep Power
    0
    Error using the croix script /\

    error in Persistent script NewPersistentScript1:
    [" for _, v in ipairs(monster..."]:NewPersistentScript1:10 bad argument #1 to 'ipairs' (table expected, got string)
    stack traceback:
    [" for _, v in ipairs(monsters) do"]:NewPersistentScript1:10 in user script

  6. #6
    Free User Sajean's Avatar
    Join Date
    Feb 2014
    Posts
    386
    Reputation
    26
    Rep Power
    21
    @Felipex change for this.
    PHP Code:
    local monsters = {"Rat""Cave Rat""Bug"

  7. #7
    Free User
    Join Date
    Apr 2014
    Posts
    4
    Reputation
    10
    Rep Power
    0
    Now dont have errors but i cant test now, but thanks if are right.
    If dont work i repply, rep to all

  8. #8
    Free User CroiX's Avatar
    Join Date
    Jan 2014
    Posts
    890
    Reputation
    61
    Rep Power
    22
    Quote Originally Posted by Sajean View Post
    @Felipex change for this.
    PHP Code:
    local monsters = {"Rat""Cave Rat""Bug"
    Quote Originally Posted by Felipex View Post
    Now dont have errors but i cant test now, but thanks if are right.
    If dont work i repply, rep to all
    Yeah lol, sorry. forgot about the {}'s.

    ---

    Quote or Tag me if you want me to reply quicker


 

 

Posting Permissions

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