mIRC Homepage
Posted By: Vinniej on Notice - 31/01/06 10:29 PM
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 }
}
Posted By: Zyzzyx26 Re: on Notice - 31/01/06 11:53 PM
Try this instead:

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

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

Zyzzy.
Posted By: Vinniej Re: on Notice - 01/02/06 12:10 AM
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.
Posted By: RusselB Re: on Notice - 01/02/06 12:42 AM
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.
Posted By: Vinniej Re: on Notice - 01/02/06 12:46 AM
Thanks, I didnt looked to the set option... frown Shame on me..

And btw, I only have userlevel 1000 smile
© mIRC Discussion Forums