mIRC Home    About    Download    Register    News    Help

Print Thread
#237813 06/06/12 06:56 AM
Joined: May 2012
Posts: 5
E
eggyesd Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: May 2012
Posts: 5
Hi everyone,

So i have a match text script which looks like this:

on BOT1:TEXT:*channel*:#:{
msg $chan Welcome to the Channel
}
on BOT2:TEXT:*channel*:#:{
msg $chan Welcome to the Channel
}
on BOT3:TEXT:*channel*:#:{
msg $chan Welcome to the Channel!!!
}

It works extremely well.

I was wondering if it would be possible to create a variable which would unload the script once one of these matches was triggered.

Some help?

Thanks in advance

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Sure, set a variable once it triggered and check the variable isn't set before doing so, for example:

Code:
on BOT1:TEXT:*channel*:#:{
if (!%BOT1) {
msg $chan Welcome to the Channel
set %BOT1 1
 }
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: May 2012
Posts: 5
E
eggyesd Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: May 2012
Posts: 5
on BOT1:TEXT:*channel*:#:{
if (!%BOT1) {
msg $chan Welcome to the Channel
set %BOT1 unload -rs remote.ini
}
}

Would that be correct or am I totally not understanding this variable things

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
If you want to unload the file, you don't even need a variable:

Code:
on *:TEXT:*channel*:#:{
if ($istok(BOT1 BOT2 BOT3,$ulevel,32)) {
msg $chan Welcome to the Channel
unload -rs $qt($script)
 }
}
Using $istok and $ulevel, I used only one event.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard