[mIRC Scripting] Temporizzare i comandi con un timer, specificando l'orario di attivazione

Richieste per scripts, codici, software e quant'altro saranno pubblicate in questa sezione del forum. Hai una richiesta? Pubblicala qui!
Rispondi
Avatar utente
YodAlex
Messaggi: 36
Iscritto il: 25/04/2022, 13:29

Salve. E' possibile programmare una serie di comandi da eseguire ad una data ora?
Mi spiego meglio...
Vorrei inviare un saluto (ad esempio) , ad un nick alle 16 , un altro saluto ad un altro nick alle 16,15 , etc...
Oppure bannare un utente ad una determinata ora.
Praticamente impostare un timer che invece di avere un tempo assegnato ( /timer 1 200 "Fai questo") , sia del tipo:

/timer 1 alle ore 16,00 "FAI QUESTO

Potrebbe essere qualcosa del genere?

Codice: Seleziona tutto

/.timer 16:00 1 0 /mode #CANALE +b NICK_DA_BANNARE!*@*
Questo dovrebbe impostare un ban (quindi una volta sola, senza ripetizioni) , alle 16:00

E'corretto?

Grazie.
"E' meglio tacere e dare l'impressione di essere scemi , piuttosto che aprire la bocca e togliere ogni dubbio."
Avatar utente
Dragone2
Amministratore
Messaggi: 145
Iscritto il: 30/07/2014, 18:35
Località: Italia
Contatta:

Ciao,
Come descritto qua: https://en.wikichip.org/wiki/mirc/commands/timer (o in generale, nel manuale utente di mIRC)
/timers [off]
/timer[n|name] [off]
/timer[n|name] [-cdeomhipPrzN] [time] <repetitions> <interval> <code>

Switches

Creation Manipulators

-o - Creates a offline timer
-c - Creates a catch-up timer
-h - Creates a high-resolution timer (interval is in millisecond just like -m)

Attributes

-m - Treats the interval parameter as milliseconds instead of seconds
-d - Keeps the order of all -d timers
-i - Dynamically associates itself with the active connection

Manipulator

-e - Executes the code associated with a timer (note: it decrease the number of repetition of the timer, probably resets the time counter as well)
-p - Pauses a timer, but the countdown is not paused, this switch should serve no real purpose because of the countdown weirdness, -P was added to pause correctly the countdown.
-P - Makes a real pause of the timer, countdown included.
-r - Resumes a timer paused with -p or -P
-zN - Resets an online timer; N=2 resets total time, N=1, resets current time, and N=0 is the same as N=1 AND N=2

Parameters

[off] - A literal 'off' keyword, used to turn off a timer.
[n|name] - The name or index of the timer
[time] - Time to activate the timer, for example '15:30' for 3:30PM
<repetitions> - The amount of times the timer should repeat itself. A repetition value of '0' will repeat forever.
<interval> - The delay between two consecutive timer executions
<code> - Code to be executed.
Conseguentemente se vuoi attivare un comando ad un orario specifico, devi digitare:

Codice: Seleziona tutto

/timerbannanick 16:00 1 0 /mode #CANALE +b NICK_DA_BANNARE!*@*
Ricorda:

Codice: Seleziona tutto

/timer<nome-del-timer> <orario> <numero-ripetizioni> <intervallo> <comando>
Ciao
Immagine
Rispondi