mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2014
Posts: 40
Feyl0rd Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Dec 2014
Posts: 40
So I'm currently working on a large project for mIRC as a twitch rob0t. I'm running into a bunch of stuff I don't know how to do (Which is good).

Is there a way for it to use maybe a while loop to wait for a response -- a on text event taking and storing the next thing they say?

I'll write an example:
Code:
on *:text:!note:#: {
  set %note on
  msg $chan what note would you like to leave?
}

on *:text:*:#: {
  while (%note = on)
  blah blah blah save what they say here to a file.
}


I would like to keep it to separate events but I'm not sure why it doesn't work / what would work.

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Change 'while' with 'if'

e.g:

Code:
if (%note == on) { do_stuff }

Last edited by westor; 06/09/15 06:20 PM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2014
Posts: 40
Feyl0rd Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Dec 2014
Posts: 40
That didn't work for me. I think it has to do with it reading !note and taking note as what was said which is why I am looking for a loop or some other fix.

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
If you are looking an function to write the log then you have to look into the /write command about it, also you dont need any loop for this!

/help /write

e.g:

Code:
write test.log The $nick just said into the $chan channel the message: $1-

Last edited by westor; 06/09/15 07:01 PM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Btw, you can have a look into this link about mirc loops: http://en.wikichip.org/wiki/mirc/while_loops


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-

Link Copied to Clipboard