Jump to content
UBot Underground

How To Disable A Bot For A Certain Period Of Time


Recommended Posts

Any ideas on how to disable the bot for X amount of time?

Let's say 24hrs?

 

I will create some free bots but i don't want the users to abuse the system.

So i thought that adding a 24hrs break after doing it's job, would be a good idea?

 

That even if he/she fires up the bot again, it's got a timer or something, showing how much time they have to wait before using the bot again.

 

How could i do this?

 

Thanks

Link to post
Share on other sites

Maybe you could write out to a text file the future date when the bot can continue and read this file / compare everytime the bot is started. If the current time is less than the future date, simply create a function to wait and check the date / time every minute or so. Put the code in a thread so it does not lock up the bot. The code could set a Gobal variable when the bot is #OKTORUN

 

Sorry, I would give example code but I don't have uBot available now.

  • Like 1
Link to post
Share on other sites

Maybe you could write out to a text file the future date when the bot can continue and read this file / compare everytime the bot is started. If the current time is less than the future date, simply create a function to wait and check the date / time every minute or so. Put the code in a thread so it does not lock up the bot. The code could set a Gobal variable when the bot is #OKTORUN

 

Sorry, I would give example code but I don't have uBot available now.

right idea

 

right to file encrypted date(meters encryption plugin)

onload

if file exists

    read and decrypt date/time

 

    if time_now !>= time_later:

       close bot(Aymens plugin) or taskkill

 

 

set new time to file

   encrypt time_now + time_later(86400 = 24 hrs in sconds) and write to file

 

 

Regards,

Nick

Link to post
Share on other sites

time code

comment("seconds from epoch")
set(#time now,$python result("","from time import time

time()"),"Global")
alert(#time now)
set(#time later,$add(#time now,86400),"Global")
alert("new time to encrpt {#time later}")
if($comparison(#time now,"!= Does not equal",#time later)) {
    then {
        alert("No go, please wait.")
        comment("close bot")
    }
}

you can also get fancy and display time remaining in some way

 

Regards,
Nick

Link to post
Share on other sites

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...