Results 1 to 3 of 3

Thread: Setting hotkeys.

  1. #1
    iBot User
    Join Date
    Mar 2013
    Location
    Poland
    Posts
    169
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    17
    Rep Power
    4

    Setting hotkeys.

    Hello!

    I need a hotkey which turns off/on hud. I made that one based on the PauseBot hotkey. Why it doesn't work? Could you help me with this?

    PauseBot:
    Code:
    local cavebot = getsettings("Settings/CaveBot/Enabled")
    local targeting = getsettings("Settings/Targeting/Enabled")
    
    if cavebot == 'no' or targeting == 'no' then
       setcavebot('on')
       settargeting('on')
       setlooting('on')
    else
       setcavebot('off')
       settargeting('off')
       setlooting('off')
    end
    wait(500)
    Hud:
    Code:
    local hud = getsettings("Settings\\Hud\\Enabled")
    
    if hud == "no" then
       setsettings("Settings\\Hud\\Enabled","on")
    else
        setsettings("Settings\\Hud\\Enabled","off")
    end
    wait(500)
    I don't know whether it's a matter of spelling becuase if I change getsettings("Settings\\Hud\\Enabled" into getsettings("Settings/Hud/Enabled" it still doeasn't work.

    Cheers!



    EDIT: It semms that the problem is with getsetting because the first action changes hud but second does not:

    Code:
    local cavebot = getsettings("Settings/CaveBot/Enabled")
    local targeting = getsettings("Settings/Targeting/Enabled")
    
    if cavebot == 'no' or targeting == 'no' then
       setcavebot('on')
       settargeting('on')
       setlooting('on')
       setsettings("Settings\\Hud\\Enabled","yes")
    else
       setcavebot('off')
       settargeting('off')
       setlooting('off')
       setsettings("Settings\\Hud\\Enabled","no")
    end
    wait(500)
    Code:
    local hud = getsettings("Settings/Hud/Enabled")
    
    if hud == 'no' then
    
       setsettings("Settings\\Hud\\Enabled","yes")
    else
    
        setsettings("Settings\\Hud\\Enabled","no")
    end
    wait(500)
    Last edited by bombek92; 01-26-2014 at 01:47 PM.
    "Do or do not. There is no try"
    Master Yoda

  2. #2
    iBot User
    Join Date
    Aug 2012
    Posts
    805
    Mentioned
    18 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    38 Post(s)
    Reputation
    180
    Rep Power
    7
    second works for me, also thats my hud on/off hotkey

    PHP Code:
    if getsettings("Settings\\Hud\\Enabled") == "yes" then
        setsettings
    ("Settings\\Hud\\Enabled""no")
        
    wait(1000)
        elseif 
    getsettings("Settings\\Hud\\Enabled") == "no" then
        setsettings
    ("Settings\\Hud\\Enabled""yes")
        
    wait(1000)
    end 

  3. #3
    iBot User
    Join Date
    Mar 2013
    Location
    Poland
    Posts
    169
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    17
    Rep Power
    4
    Thanks! This one works.

    Thread can be closed.
    "Do or do not. There is no try"
    Master Yoda

Posting Permissions

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