Results 1 to 5 of 5

Thread: how to set actions 'off' at certain time of day?

  1. #1
    iBot User
    Join Date
    Aug 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    how to set actions 'off' at certain time of day?

    hi

    could someone help me to use my computers clock to turn a couple of actions off just before server save, and then turn them on 20 mins later.

    this is what im trying to do but i don't know how script it.

    if time = 05:59 then set (Action, 'off')
    if time = 06:20 then, set (Action, 'on'
    else do nothing

  2. #2
    Normal User
    Join Date
    May 2012
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    11
    Rep Power
    5
    Try playing with this variable ;P
    time() [string]: Returns string with the current time.

  3. #3
    Normal User blablabla's Avatar
    Join Date
    Jun 2012
    Location
    Curitiba, Brazil
    Posts
    242
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    22
    Rep Power
    5
    PHP Code:
    local time1 '05:59'
    local time2 '06:20'

    if time() == time1 then
       setsettings
    ('Settings\\Actions\\List\\Action_Name\\Enabled''no')
    elseif 
    time() == time2 then
       setsettings
    ('Settings\\Actions\\List\\Action_Name\\Enabled''yes')
    end 
    Change Action_Name to the name of your action exactly as it's written.

  4. #4
    iBot User
    Join Date
    Aug 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    thanks blablabla ill give that a go

  5. #5
    iBot User
    Join Date
    Aug 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    doesn't seem to work idk why. i tested it by changing to 1 minute ahead, and nothing happens what it hits the right time.

Posting Permissions

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