Repositorio de scripts de irc.terrachat.cl desde los canales #TRAFFIC y #LATINWAREZ.
⬅️ Volver;;; msg %canal 11New Release Added: %release @ I have a total of8 %total releases available, 9Last Updated %time @ %date
menu channel {
LatinWarez Announce
.Announce On:/startAnnounce
.Announce Off:/stopAnnounce
}
alias startAnnounce {
.timerAnnounce off
.timerAnnounce -m 0 300000 announceRelease
echo -a Announcements started in #LatinWarez every 5 minutes.
}
alias stopAnnounce {
.timerAnnounce off
echo -a Announcements stopped.
}
alias announceRelease {
var %ruta = D:\AxA-MP3
var %canal = #LatinWarez
var %tempfile = announce_temp.txt
if (!$isdir(%ruta)) {
echo -a Error: The folder %ruta does not exist.
return
}
; Borrar archivo temporal si existe
.remove %tempfile
; Buscar archivos .tar
var %i = 1
while ($findfile(%ruta,*.tar,%i)) {
write %tempfile $nopath($ifmatch)
inc %i
}
; Buscar archivos .rar
var %j = 1
while ($findfile(%ruta,*.rar,%j)) {
write %tempfile $nopath($ifmatch)
inc %j
}
; Verificar si se encontraron archivos
if (!$lines(%tempfile)) {
echo -a No .tar or .rar files found in %ruta
return
}
; Obtener release aleatorio
var %randomLine = $rand(1,$lines(%tempfile))
var %release = $read(%tempfile,nt,%randomLine)
var %total = $lines(%tempfile)
var %time = $asctime(hh:nn)
var %date = $asctime(dd-mm-yyyy)
; Enviar mensaje al canal
msg %canal 11New Release Added: %release @ I have a total of8 %total releases available, 9Last Updated %time @ %date
; Borrar el archivo temporal (opcional)
.remove %tempfile
}
👁️ 6 vistas • 📥 0 descargas