mIRC Homepage

!PEAK Help

Posted By: DbzDP

!PEAK Help - 19/11/03 12:05 AM

This is the code:

on *:TEXT:!Peak:#: {
if ($2 == $null) {
/msg $chan %col1 $+ The Peak for: $+ $chr(91) $+ %col2 $+ $chan $+ %col1 $+ $chr(93) is: $+ $chr(91) $+ %col2 $+ $gettok([ % $+ [ max_user $+ [ $chan ] ] ],1,32) $+ %col2 Users $+ 4 $+ $chr(93) set on: $+ $chr(91) $+ %col2 $+ $gettok([ % $+ [ max_user $+ [ $chan ] ] ],2,32) $+ %col1 $+ $chr(93) at: $+ $chr(91) $+ %col2 $+ $gettok([ % $+ [ max_user $+ [ $chan ] ] ],3,32) $+ %col1 $+ $chr(93) GMT: $+ $chr(91) $+ 12 $+ $gmt(z) $+ 4 $+ $chr(93) 4That was: $+ $chr(91) $+ %col2 $+ $duration($calc($ctime - $gettok([ % $+ [ max_user $+ [ $chan ] ] ],4,32))) $+ %col1 $+ $chr(93) ago. Set by: $+ $chr(91) $+ %col2 $+ $gettok([ % $+ [ max_user $+ [ $chan ] ] ],5,32) $+ %col1 $+ $chr(93)
}
if ($2 != $null) {
/msg $chan %col1 $+ The Peak for: $+ $chr(91) $+ %col2 $+ $2 $+ %col1 $+ $chr(93) is: $+ $chr(91) $+%col2 $+ $gettok([ % $+ [ max_user $+ [ $2 ] ] ],1,32) $+ %col2 Users $+ 4 $+ $chr(93) set on: $+ $chr(93) $+ %col2 $+ $gettok([ % $+ [ max_user $+ [ $2 ] ] ],2,32) $+ %col1 $+ $chr(93) at: $+ $chr(91) $+ %col2 $+ $gettok([ % $+ [ max_user $+ [ $2 ] ] ],3,32) $+ %col1 $+ $chr(93) GMT: $+ $chr(91) $+ 12 $+ $gmt(z) $+ 4 $+ $chr(93) That was: $+ $chr(91) $+ %col2 $+ $duration($calc($ctime - $gettok([ % $+ [ max_user $+ [ $2 ] ] ],4,32))) $+ %col1 $+ $chr(93) ago. Set by: $+ $chr(91) $+ %col2 $+ $gettok([ % $+ [ max_user $+ [ $2 ] ] ],5,32) $+ %col1 $+ $chr(93)
}
}

it works fine when some types "!PEAK" but e.g. the peak of the channel is 100. and when the 101 person enters the channel i want it to show they are the 101 person that entered the channel. So they don't have to type "!PEAK".
Posted By: Online

Re: !PEAK Help - 19/11/03 12:29 AM

Maybe on *:TEXT:!Peak*:#: {
Posted By: LocutusofBorg

Re: !PEAK Help - 19/11/03 06:46 AM

I assume you have some kind of on join check to check if the channel number is larger than the peak? Simply add the following line in the raw event for /names

Code:
if ($nick([color:blue]#channelname[/color],0) > $gettok([ % $+ [ max_user $+ [ $chan ] ] ],1,32)) .notice $nick whatever-goes-here


Check the exact syntax for the raw event to see which token holds the channelname.
Posted By: DbzDP

Re: !PEAK Help - 19/11/03 09:56 AM

Thanks Lotuousofborg, i think that worked.
Posted By: DbzDP

Re: !PEAK Help - 21/11/03 02:28 AM

I asked someone they told me to chage a lot of stuff with the script (It didn't work at the end), but what "LocutusofBorg" wrote was simple, and works. lol. Now on I will listen to you. Not those people at #mIRC on EFnet.


Thank You.
© 2020 mIRC Discussion Forums