mIRC Home    About    Download    Register    News    Help

Print Thread
#159251 15/09/06 04:36 PM
Joined: Jul 2006
Posts: 26
I
Inky Offline OP
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jul 2006
Posts: 26
Is there a way to turn your bots scripts off for a channel, like disable or enable it?

I don't think there is such a command, so I am guessing it's a script? I don't know how to make one.

Thanks in advance.


Very new to mIRC, don't know much.
#159252 15/09/06 04:55 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
I use a variable for that.
Normally a script would start with:
on *:TEXT:sometrigger:*:{

I replace that with:
on *:TEXT:sometrigger:%botchannel:{

Now, if you put in the variables window a variable:
%botchannel #channel1,#channel2,#channel3

The above script will only work on the channels that are specifed in that variable.
I like having it this way, since I can easily control where the scripts will work, and where not...

There are other ways, but this is what I use for it.

Good luck.

#159253 16/09/06 01:19 PM
Joined: Jul 2006
Posts: 26
I
Inky Offline OP
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jul 2006
Posts: 26
Ok, I get the first line, but Im still learning scripts, sooo, I don't really get the rest.


Very new to mIRC, don't know much.
#159254 16/09/06 05:34 PM
Joined: Sep 2003
Posts: 261
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
What kind of "bot" do you have? Is it another mirc opened, an mirc script that uses another instance of mirc? Or a socket connected bot? For enable and disable i use a variable which sets itself on if i type /toggleblah and if i type it again it goes off. I use the $iif() for that.

$iif(%bottoggle,unset %bottoggle,set %bottoggle on)

which is:

if %bottoggle is set, unset it. Else if it's unset, set it.

#159255 16/09/06 08:39 PM
Joined: Aug 2006
Posts: 44
X
Ameglian cow
Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
Well, another easy way is:
if $chan == #channelname { to work for only that chan

or

if ($chan == #channelname) { Halt } to work in all the channels bot that channel.

This isnt the best way to do it but its just another way you can.


Newbie Scripter. Learning pretty fast...lol :P
#159256 16/09/06 09:55 PM
Joined: Sep 2003
Posts: 261
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
I think I got what you want. Use groups.

remote script:

Code:
#botscripts on
on 1:text:*:#: {
  your stuff
}
alias morestuff { blah blah }
#botscripts end


That bit of script is enabled, typing "/disable #botscripts" in a command window will turn it off:
Code:
#botscripts off
on 1:text:*:#: {
  your stuff
}
alias morestuff { blah blah }
#botscripts end


typing "/enable #botscripts" will turn it on again. When off, mirc ignores the information between #botscripts off and #botscripts end

#159257 17/09/06 12:17 PM
Joined: Jul 2006
Posts: 26
I
Inky Offline OP
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jul 2006
Posts: 26
So does it do it for a specific channel, or for the whole bot's mIRC window?

And yes, I'm using a custom made bot, in another window.


Very new to mIRC, don't know much.

Link Copied to Clipboard