mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2015
Posts: 3
B
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Sep 2015
Posts: 3
Part of my remote script is below:


on *:NOTICE:*Password accepted*:*:{
if ($nick == Nickserv && $network == mynetwork) {
.join #room1,#room2,#room3
.msg botname invite keyword
.clearall
}

Basically once identified I'd like to join some rooms and be invited to another. The last thing I'd like to do is issue a /clearall command. However that last line doesn't execute so I assume I have the syntax wrong (.clearall /clearall and just clearall all gave the same result).

Edit: Also, if possible, can I make the script wait a couple of seconds between joining the rooms and messaging the bot?

Last edited by blabberer; 05/09/15 07:13 AM.
Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
I can't understand why the clearall doesnt work.Maybe you need to add the -a switch, not sure, but try it! You can use timers to have a small pause between joins
Code:
on *:NOTICE:*Password accepted*:*:{
if ($nick == Nickserv && $network == mynetwork) {
join #room1
.timer 1 2 join #room2
.timer 1 4  join #room3
.timer 1 6 .msg botname invite keyword
.clearall -a
}

this will wait 2 seconds! to change the time to what you want you simply change 1 2 4 6 to whatever time you want
Check the help files for more info about the timers, they are one of the most usefull!

Joined: Sep 2015
Posts: 3
B
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Sep 2015
Posts: 3
Brilliant, thank you!

For some reason adding -a let clearall work smile If I type just /clearall it's fine but in the script it needs -a to achieve the same thing.

Thanks for the heads up about timers. I was looking for pause or wait or sleep but not timer. Should have thought of timer.

Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
Great!! :)))


Link Copied to Clipboard