Jump to content
UBot Underground

[Free Plugin] Time Plugin - Make Your Own Scheduler!


Recommended Posts

  • 2 months later...
  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hello, I am providing this plugin for FREE. This plugin can be helpful for people who wish to make their own scheduler. For example. You can use this plugin to make bot run on every sunday to make web

quick example to show you guys how to make a small scheduler   set(#time to execute, "07:09", "Global") set(#current time, "{$plugin function("time.dll", "$currenthour-12h")}:{$plugin function("time.

Minor update* Changed  category  from "System functions" to "Time functions" Get it here : http://socialcracker.com/ubot/timeplugin/   Here is the updated link : https://drive.google.com/file/d/0B4rg

thanks for this great plugin :)

here is a example for time ranges:

 

ui button("timetest") {

    set(#current time"{$plugin function("time.dll""$currenthour-24h")}{$plugin function("time.dll""$currentminute")}""Global")
    set(#starttime, 0800, "Global")
    set(#endtime, 2200, "Global")
    thread {
        loop while($either($comparison(#starttime">="#current time), $comparison(#endtime"<="#current time))) {
            wait(5)
            alert("wait")
            set(#current time"{$plugin function("time.dll""$currenthour-24h")}{$plugin function("time.dll""$currentminute")}""Global")
        }
        alert("its time")
    }
}

  • Like 1
Link to post
Share on other sites
  • 1 month later...

Appreciate the plugin! :)

 

Got a problem using it tho as I want to add x minutes to the current time to establish the scheduled next run time.

 

I have added an eval to add the time to minutes but when I debug it all I see in the #First Run Time var is the hour with no minutes shown...

 

It works fine if I right click and run it but it won't work in the "on load"

 

Any ideas?

 

Thx

 

Here's the code:

on load("Bot Loaded") {
    wait(10)
    set(#current time, "{$plugin function("time.dll", "$currenthour-24h")}:{$plugin function("time.dll", "$currentminute")}", "Global")
    set(#Minutes, $eval($add($plugin function("time.dll", "$currentminute"), 1)), "Global")
    if($comparison($text length(#Minutes), "=", 1)) {
        then {
            set(#Minutes, "0{#Minutes}", "Global")
        }
        else {
        }
    }
    set(#First Run Time, "{$plugin function("time.dll", "$currenthour-24h")}:{#Minutes}", "Global")
    set(#time to execute, #First Run Time, "Global")
    Schedule Next Run()
}

define Schedule Next Run {
    thread {
        loop while($comparison(#time to execute, "!=", #current time)) {
            wait(1)
            set(#current time, "{$plugin function("time.dll", "$currenthour-12h")}:{$plugin function("time.dll", "$currentminute")}", "Global")
        }
        task()
    }
define task {
        Run Main Program()
    }
}


Link to post
Share on other sites

It seems it's the "on load" that causes this problem...

 

I did it with javascript instead and it now runs fine.

 

Seems that "on load" needs sorting out a little... must be a Ubot5 function! lol :)

Link to post
Share on other sites

It seems it's the "on load" that causes this problem...

 

I did it with javascript instead and it now runs fine.

 

Seems that "on load" needs sorting out a little... must be a Ubot5 function! lol :)

 

I've reported several bugs in the onload to the tracker... at this point Ubot 5 is completely unusable for me because of this...  I cant get most things to work in an onload command.

Link to post
Share on other sites

Two issues have been reported on the tracker for the onload command and they have both been resolved and fixed here: http://tracker.ubotstudio.com/issues/142

and here: http://tracker.ubotstudio.com/issues/55

 

Hope the fixes are helpful.

 

Let us know if the tracker if you find any other issues related to the command.

Link to post
Share on other sites
  • 3 weeks later...

It seems it's the "on load" that causes this problem...

 

I did it with javascript instead and it now runs fine.

 

Seems that "on load" needs sorting out a little... must be a Ubot5 function! lol :)

on load for example on alert boxes is a pain in the axx

Link to post
Share on other sites
  • 3 months later...

Elapsed time in seconds example:

 

 

define $TimeDifference(#set) {
    set(#hour$plugin function("time.dll""$currenthour-24h"), "Global")
    set(#minute$plugin function("time.dll""$currentminute"), "Global")
    set(#second$plugin function("time.dll""$currentsecond"), "Global")
    if(#set) {
        then {
            set(#SavedTime$add($add($multiply($multiply(#hour, 60), 60), $multiply(#minute, 60)), #second), "Global")
        }
        else {
        }
    }
    set(#CurrentTime$add($add($multiply($multiply(#hour, 60), 60), $multiply(#minute, 60)), #second), "Global")
    
    if($comparison(#CurrentTime">"#SavedTime)) {
        then {
            return($subtract(#CurrentTime#SavedTime))
        }
        else {
            return($add($subtract(86400, #SavedTime), #CurrentTime))
        }
    }
}

Link to post
Share on other sites
  • 1 year later...

Ahh! recently wiped my plugins for Ubot and need this time.dll back, and download not working :(

 

Can anyone please share?

 

Cant update one of my bots without it :(

Link to post
Share on other sites
  • 1 month later...
  • 1 month later...

HI, can somebody please re-upload this plugin? Thanks a lot in advance.

Hi matabond,

I moved to new server and forgot to reupload the files.

Plugin is up for download again. Try downloading again.

 

Link to post
Share on other sites
  • 5 months later...

Just booted up old lappy and found a copy :)

 

 

 

Hi UBOTEM, 

 

I know im dragging up an old thread here but i noticed that you had a copy of this plugin stashed on your PC,

any chance i could grab a copy please  :rolleyes:

 

pretty please ... Im quite good at grovelling if that will help :P 

 

 

 

Cheers

CJ 

Link to post
Share on other sites
  • 3 weeks later...
  • 4 weeks later...

Just booted up old lappy and found a copy :)

 

 

Hi, sorry to be a pain but did you forget about us mate ?

 

I dont really need it anymore as i built my scheduler with alternate methods, 

but there is quite a que building up for this infamous file lol

 

any chance you could drop us a DL link ? 

 

 

 

 

Cheers

CJ

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...