Results 1 to 4 of 4

Thread: StandTime Not Working

  1. #1
    Normal User push22's Avatar
    Join Date
    Mar 2012
    Location
    USA
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    30
    Rep Power
    5

    StandTime Not Working

    I'm trying to make a persistent that turns off some settings when you're running around or killing monsters and turns them back on when they're standing still.

    Basically, this is how the code looks like

    if (standtime > 2000) then
    turn settings on
    else
    turn settings off
    end

    The settings are always off, and the problem appears to be with the standtime variable. I displayed standtime in my hud to see how the variable works, and for whatever reason it's constantly 0. I don't know if I'm doing something wrong or if standtime just isn't working. If anyone can help, I appreciate it.

  2. #2
    Normal User Tibianator's Avatar
    Join Date
    Jun 2012
    Location
    Poland
    Posts
    129
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    19
    Rep Power
    5
    what kind of settings you want to turn on/of?

    anyway action for change things should looks like f.e. setalarms('off')

  3. #3
    Normal User push22's Avatar
    Join Date
    Mar 2012
    Location
    USA
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    30
    Rep Power
    5
    well for now i want to turn mana pots on and off to avoid the bot from trying to heal mana unnecessarily while running... but the turning settings on and off isn't the problem. the problem seems to be with the standtime variable. if standtime really returns just a constant zero, the persistent will always revert to the else statement, thus always leaving the mana pots off.

    This is the code I made:

    if (mppc < 50) then
    setsettings("Settings\\Healer\\Rules\\SMP\\Enabled","yes")
    else
    if (standtime > 2000) then
    setsettings("Settings\\Healer\\Rules\\SMP\\Enabled","yes")
    else
    setsettings("Settings\\Healer\\Rules\\SMP\\Enabled","no")
    end
    end

    In theory it should work. Instead, it turns manas off until my mana is below 50%, which is not what I want.

  4. #4
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    815
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    344 Post(s)
    Reputation
    462
    Rep Power
    10
    Standtime only work if cavebot is enabled.


    ------------------------------------Latest Releases:------------------------------------
    Vocations:
    Darashia Lions Rock
    Oramond Seacrest Serpents X1

    For a better iBot!

    (◣_◢)

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
  •