Post
Topic
Board Gambling discussion
Re: Seuntjie' Dice bot programmers mode discussion.
by
B4RF
on 22/06/2017, 06:09:03 UTC

hello, i would like to simply know how to add a time delay to my script, for example, to delay for say 1minute after an action , before commencing another one

you should be able to put in a simple blocking delay using something like:

Code:
delay = 60 -- measured in seconds

local start = os.clock()
while os.clock() - start < delay do end

The only problem with sleep functions like this is that they consume processor time.

But without external libraries I dont really know any better solution.

Is it possible to import lua libraries in the seuntje bot?