Results 1 to 4 of 4

Thread: need target-off if smp<20 and target-on if traped

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

    Post need target-off if smp<20 and target-on if traped

    Please, help me
    need target-off if smp<20 and target-on if traped.
    thanks

  2. #2
    iBot User
    Join Date
    Nov 2012
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    15
    Rep Power
    5
    PHP Code:
    if itemcount(strong mana potion) < 20
    then 
    setsettings
    ("Settings\\Targeting\\Monsters\\hydra\\OnlyIfTrapped""yes"

    Should work just change hydra to whatever monster you have in targetting.
    You could do "all" if you have "all" in targetting
    Test and give feedback please.
    Last edited by degreeme; 11-14-2013 at 07:19 AM.

  3. #3
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    Quote Originally Posted by degreeme View Post
    PHP Code:
    if itemcount(strong mana potion) < 20
    then 
    setsettings
    ("Settings\\Targeting\\Monsters\\hydra\\OnlyIfTrapped""yes"

    Should work just change hydra to whatever monster you have in targetting.
    You could do "all" if you have "all" in targetting
    Test and give feedback please.
    nope. your action won't work... He wanted something else

    Lua Code:
     
    local potion = "strong mana potion"
    local amount = 20
     
    if itemcount(potion) < amount and not istrapped()
    then 
    settargeting("off")
    else
    settargeting("on")
    end
    Last edited by RafiXWPT; 11-14-2013 at 07:26 AM.

  4. #4
    iBot User
    Join Date
    Nov 2012
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    15
    Rep Power
    5
    I think i could make it work but the action I have has mana name in setup. Either way I gave it a shot but you showed be a better way to do it. Thanks.

    Mine has it like this...
    In setup:
    PHP Code:
    mananame "great mana potion"
    manaleave 75 
    Below is my waypoint resupply checker:

    PHP Code:
    if itemcount(mananame) > manaleave then
        gotolabel
    ('start_spawn')
    else
        
    gotolabel('leave')
    end 
    On my label for "leave" its an action waypoint that says this
    PHP Code:
    setsettings("Settings\\Targeting\\Monsters\\hydra\\OnlyIfTrapped""yes"


    So yeah just another way around it but I think his way is better.
    Last edited by degreeme; 11-14-2013 at 07:34 AM.

Tags for this Thread

Posting Permissions

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