mIRC Home    About    Download    Register    News    Help

Print Thread
#248035 17/09/14 09:02 PM
Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
Hello, So I would like to know if there is a way for me to add
an auto message to my twitch.tv bot. Yet this is what i need
Something like a /timer That says the msg ever 5 minutes.
To check if someone has talked the last 10 seconds, If nobody has talked on the last 10 seconds to not message until someone talks again.

Thanks laugh

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Code:
on *:TEXT:*:#: {
  set -u10 %chatinpast10seconds On
}
alias announcements {
  if (%chatinpast10seconds == On) {
    var %a1 $read($($+(announcements.,$1,.txt)))
    .msg $1 %a1
  }
}
on me:*:JOIN:#: {
  .timerannouncer. $+ $chan 0 300 announcements $chan
}


UHHH...lol I think this would work...I dunno its close. with announcements in a textfile.

Last edited by Belhifet; 17/09/14 11:51 PM.
Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
It isnt quite working :P

Here is how i edited it .. :P

Code:
on *:TEXT:*:#: {
  set -u10 %chatinpast10seconds On
}
alias announcements {
  if (%chatinpast10seconds == On) {
    var %a1 $read($($+(C:\Users\Stracked\Desktop\announcements.txt,$1,.txt)))
    .msg $1 %a1
  }
}

on me:*:JOIN:#: {
  .timerannouncer. $+ $chan 0 5 announcements $chan
}

btw i am a newb

Last edited by Stracked; 18/09/14 12:11 AM.
Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Uhh ya..I wrote that in the new post dialog box so it could be a mess..lol..you have that timer set to fire every 5 seconds though, I had it at 300 seconds (5 min)

How is it not working? If you jus copy and pasted it you'd need to leave the channel and rejoin so it would turn on the timer.


Last edited by Belhifet; 18/09/14 12:32 AM.
Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
Seconds were to test... I did indeed Rejoin....
It doesnt do anything at all :P

Last edited by Stracked; 18/09/14 12:46 AM.
Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
var %a1 $read($($+(C:\Users\Stracked\Desktop\announcements.txt,$1,.txt))

its looking for C:\Users\Stracked\Desktop\announcements.txt.CHANNELNAME.txt

you could probably change that to var %a1 $read(C:\Users\Stracked\Desktop\announcements.txt) if you only wanna use this in a single channel.

Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
Ok so i tried it and it didnt work either...
But Here ill show you my old timer:
Code:
on *:TEXT:!timedmsg1*:#: {
  if ($nick isop $chan) && ($2) {
    .timer1 0 $2 /msg $chan $3-
    msg # your timer was added.
  }
}

Basically it was used like this !timedmsg1 300 message here...
But Plenty times nobody was talking and he kept on spamming that message until the point it became annoying.
Adding something to make it like do it unless nobody has talked in the past 10 seconds would be pretty useful

Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
Hmp....
I tried editing the code you gave me a little bit, At first it was sort of working but it isnt.
Like the set -u10 does work indeed and the msg used to work but now it isnt sending it.
I need some help frown

Code:
on *:TEXT:* *#: {
  set -u10 %chat 1
}


alias test { 
  if (%chat == 1) {
    msg $1 $read(file.txt, n)
  }
}

on *:TEXT:!timers:#: { /timerStartTest 0 300 /test $chan }

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Originally Posted By: Stracked

Code:
on *:TEXT:* *#: {
  set -u10 %chat 1



Uhhh...is this a thing? "on *:TEXT:* *#:"

Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
On any text i beleive... am i wrong?
Can you help me with any text? frown

Last edited by Stracked; 20/09/14 04:00 PM.
Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
on *:TEXT:* *#:
should be
on *:TEXT:*:#:

Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
Yay you are amazing it works now! :3

Last edited by Stracked; 20/09/14 08:21 PM.

Link Copied to Clipboard