Results 1 to 4 of 4

Thread: on/off healer

  1. #1
    iBot User sto1p's Avatar
    Join Date
    Feb 2012
    Posts
    483
    Mentioned
    32 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    120 Post(s)
    Reputation
    31
    Rep Power
    5

    on/off healer

    Hello why not work this ?
    Code:
    local cavebot = getsettings("Settings/Healer/Enabled")
    
    
    if healer == 'no' then
       sethealer('on')
    else
       sethealer('off')
    end
    wait(500)

  2. #2
    Normal User Tswift's Avatar
    Join Date
    Aug 2012
    Location
    USA
    Posts
    114
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    13
    Rep Power
    5
    I don't understand what you're trying to do.

    Your local cavebot variable isn't even used in your script. Then you want it to turn healing on if healing is off, but then turn healing off if healing is on?

    You could write this to turn the healer on if it's off:

    Code:
    if (getsettings("Settings\\Healer\\Enabled") == "no") then
    setsettings("Settings\\Healer\\Enabled","yes")
    end

  3. #3
    iBot User sto1p's Avatar
    Join Date
    Feb 2012
    Posts
    483
    Mentioned
    32 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    120 Post(s)
    Reputation
    31
    Rep Power
    5
    use hotke for heal on / off
    if (getsettings("Settings\\Healer\\Enabled") == "no") then
    setsettings("Settings\\Healer\\Enabled","yes")
    else
    setsettings("Settings\\Healer\\Enabled","no")
    end

  4. #4
    Normal User Tswift's Avatar
    Join Date
    Aug 2012
    Location
    USA
    Posts
    114
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    13
    Rep Power
    5
    But using "else" makes it pointless. All it does is continuously turn healer on and then turn if back off.

    That's why I don't understand what you're trying to accomplish.

Posting Permissions

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