PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: Daros on 11 May, 2004, 12:26:26

Title: is there ...
Post by: Daros on 11 May, 2004, 12:26:26
is in lua function called "delay" which parameters are amount of time in seconds ot other time format

for examle delay(4) it waits 4 seconds betwen next post or something?
Title:
Post by: plop on 11 May, 2004, 12:52:57
use a timer.
set it to 4 seconds and continue where you left.

plop
Title:
Post by: Daros on 12 May, 2004, 15:13:27
so there goes my second question , do i have place the timmer in dcpp listener or just make some function which will be called every time , timer gives bnumber ( ex 4) , no matter if someone send something on chat, someone send myinfo or someone search something on the hub?;)
Title:
Post by: Daros on 12 May, 2004, 15:16:33
and what for is it to me? hmm i want to give the bot thing like searching thorught hubs somme files which szhould be in share , but i need timmer to it else it sends something about 20 searches at one time , this is my problem;)
Title:
Post by: plop on 12 May, 2004, 18:07:53
there is this.
function OnTimer()
-- Called every second.
end
which you can use a counter 2 slow down the searching, and  handle 1 search @ a time.

plop
Title:
Post by: Daros on 12 May, 2004, 22:52:39
and i dont have to call this function? it runs every second?
Title:
Post by: plop on 13 May, 2004, 03:14:34
QuoteOriginally posted by Daros
and i dont have to call this function? it runs every second?
indeed, it's called every sec.

plop