mIRC Home    About    Download    Register    News    Help

Print Thread
#249309 24/11/14 10:33 AM
Joined: Nov 2014
Posts: 4
S
stonez Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Nov 2014
Posts: 4
Good day fellow members.

I am looking for a simple timer script to do the following:

The timer must perform an action in channel #test every 72 hours. If I disconnect perhaps for a few hours the timer must check if the command has been used in the past 72 hours and hold until 72 hours has past since last used.

Perhaps check when (date + time) the command was last used if <72 hours = hold timer until 72 hours has past.
If of on connect >72 hours has past it must perform the command specified

Regards
stonez

Joined: Nov 2014
Posts: 4
S
stonez Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Nov 2014
Posts: 4
What I have so far is this:

menu channel {
Announce
.Start: .timerAnnounce. $+ $chan 0 259200 msg $chan $$?="Enter Message"
.Stop: .timerAnnounce. $+ $chan off
}

But I still can't seem to get it to check if my last message was posted in the last 72 hours if so then hold until 72 hours has passed.

Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
Hi smile your thought was right. Now! To check when the command was last used you need an alias which will do the same but also keep $ticks in a var to check the last time it was sent right now i cant script cause im on phone but you can try to do it . Type /help $ticks . Also i think it would be better to keep the message for each channel in a var like $+(%,timedmsg,$chan)
Also type /help $+( and /help $( .. if you find trouble i will be able to script in 2 or.3 days


Link Copied to Clipboard