mIRC Home    About    Download    Register    News    Help

Print Thread
#140927 31/01/06 10:29 PM
Joined: Apr 2005
Posts: 64
V
Vinniej Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Apr 2005
Posts: 64
Hi there,

I'm learning more and more via this forum about mirc scripting. But one thing does not work for me frown

I just want to have this 2 scripts in one. If I say $chattr nick +Chanlev, in #chan, the bot have to msg $chan with the reply of the Chanserv. Now its only working with notice, but the bot is on more channels, and it has to work on more channels.

$chattr script:
Quote:
on 1000:text:$chattr *:#: {
if (L isop $chan) { msg L chanlev $chan $2- }
elseif (Q isop $chan) { msg Q chanlev $chan $2- }
else { msg # No chanlev in channel. }
}

The notice:
Quote:
on *:notice:*:?: {
if ($nick == L) { notice nick -» 02-L02- $1- }
elseif ($nick == Q) { notice nick -» 02-Q02- $1- }
else { halt }
}

#140928 31/01/06 11:53 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Try this instead:

on 1000:text:$+($,chattr,$chr(32),*):#: {

mIRC tries to interpret $chattr as an identifier and not a text string wink

Zyzzy.


"All we are saying is give peace a chance" -- John Lennon
#140929 01/02/06 12:10 AM
Joined: Apr 2005
Posts: 64
V
Vinniej Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Apr 2005
Posts: 64
No, its all working. But when the "L" bot or "Q" bot reply's "Done.", it have to be showed in the channel where I typed $chattr nick +ao.

In other words, I want this in one script. L or Q is a Chanserv of Quakenet btw.

It must work for more then one channel, so I dont want to make more scripts like this. I only want the MSG in #chan instead of a notice to myself.

#140930 01/02/06 12:42 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
on 1000:text:$chattr *:#: { 
set %chan $chan
if (L isop $chan) { msg L chanlev $chan $2- } 
elseif (Q isop $chan) { msg Q chanlev $chan $2- } 
else { msg # No chanlev in channel. } 
} 
on *:notice:*:?: { 
if ($nick == L) { .msg %chan -» 02-L02- $1- } 
elseif ($nick == Q) { .msg %chan -» 02-Q02- $1- } 
} 
  


That should work for any channel that you (ie: the person/bot running the script) is in. Please note that there is a possibility of the channel being set incorrectly if the command is used in a second channel before a response from the previous usage. If there's a way around that, I wasn't able to think of it.

#140931 01/02/06 12:46 AM
Joined: Apr 2005
Posts: 64
V
Vinniej Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Apr 2005
Posts: 64
Thanks, I didnt looked to the set option... frown Shame on me..

And btw, I only have userlevel 1000 smile


Link Copied to Clipboard