mIRC Home    About    Download    Register    News    Help

Print Thread
#163593 01/11/06 08:29 PM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
Can i place this in 1 file?

Code:
 GROUP 1

#optnx on

on *:OP:#:{ if ($opnick == $me) { msg # $eval(%x.op, 2) | echo -a 2«01 $+ $timestamp $+ 2» $_(e0009) } }
on *:DEOP:#:{ if ($opnick == $me) { msg # $eval(%x.deop, 2) } }
on *:HELP:#:{ if ($hnick == $me) { msg # $eval(%x.hop, 2) } }
on *:DEHELP:#:{ if ($hnick == $me) { msg # $eval(%x.dehop, 2) } }
on *:VOICE:#:{ if ($vnick == $me) { msg # $eval(%x.voice, 2) } }
on *:DEVOICE:#:{ if ($vnick == $me) { msg # $eval(%x.devoice, 2) } }

#optnx end

GROUP 2

#renkli off
on *:nick:{
  var %rbg = $comchan($newnick,0)
  var %rbg2 = 1
  while (%rbg < %rbg2) { 
    if ($nick = $me) && $comchan($newnick,%rbg2) { cline %rengli.30 $comchan($newnick,%rbg2) $newnick | nick.rengle }
    elseif ($newnick isop $comchan($newnick,%rbg2)) { cline  %rengli.24 $comchan($newnick,%rbg2) $newnick | nick.rengle } 
    elseif ($newnick isvo $comchan($newnick,%rbg2)) { cline %rengli.26 $comchan($newnick,%rbg2) $newnick | nick.rengle }
    elseif ($newnick ishelp $comchan($newnick,%rbg2)) { cline %rengli.34 $comchan($newnick,%rbg2) $newnick | nick.rengle }
    elseif ($address($newnick,5) isignore) { cline %rengli.32 $comchan($newnick,%rbg2) $newnick | nick.rengle } 
    elseif $comchan($newnick,%rbg2) { cline %rengli.22 $comchan($newnick,%rbg2) $newnick | nick.rengle }
    else { break }  
    inc %rbg2
  }
}
on *:op:#:{ if ($opnick != $me) { cline %rengli.24 $chan $opnick | nick.rengle } }
on *:deop:#:{ if ($opnick != $me) { cline %rengli.28 $chan $opnick | nick.rengle } }
on *:voice:#:{ if ($vnick != $me) { cline %rengli.26 $chan $vnick } | nick.rengle }
on *:devoice:#:{ if ($vnick != $me) { cline %rengli.28 $chan $vnick | nick.rengle } }
on *:help:#:{ if ($hnick != $me) { cline %rengli.34 $chan $hnick | nick.rengle } }
on *:dehelp:#:{ if ($hnick != $me) { cline %rengli.34 $chan $hnick | nick.rengle } }

on *:join:#:{
  set %rbg.c $chan
  if $nick = $me { .enable #renklenen | nick.rengle }
  else { cline %rengli.328 $chan $nick | nick.rengle }
}
#renkli end

GROUP 3

#renklenen off
raw 366:*:{ 
  var %tot = $nick(%rbg.c,0)
  var %cont = 1
  while (%cont <= %tot) {
    if ($nick(%rbg.c,%cont) = $me) { cline %rengli.30  %rbg.c $me }
    elseif ($nick(%rbg.c,%cont) isop %rbg.c) { cline %rengli.24 %rbg.c $nick(%rbg.c,%cont) }
    elseif ($nick(%rbg.c,%cont) isvo %rbg.c) { cline %rengli.26 %rbg.c $nick(%rbg.c,%cont) }
    elseif ($nick(%rbg.c,%cont) ishelp %rbg.c) { cline %rengli.34 %rbg.c $nick(%rbg.c,%cont) }
    else  { cline %rengli.28 %rbg.c $nick(%rbg.c,%cont) }
    inc %cont
  }
  .disable #renklenen | unset %rbg.c
}
#renkleken end

on *:join:#:{
  if ($nick == $me) && (%icon.nl != $null) { nlust.chan $chan }
}

if (($1 == nickAdding) && ($notify($3))) return 11 
if ($1 == nickadded) {
  if ($3 == $me) return 2 $rgb(255,0,255) > $me $crlf $+ This is you
}
alias ON *:JOIN:#:{
  if ($nick == $me) {
    haltdef
  }
} 

#163594 01/11/06 08:32 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
As long as the groups aren't conflicting -- you don't have more than one on at the same time -- then it's fine to be in one file.


Invision Support
#Invision on irc.irchighway.net
#163595 01/11/06 08:40 PM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
group 1 and group 2 good be on at the same time.
Anyway to get those together with a if or something ?

#163596 01/11/06 09:22 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
only one group on at a time in one file

put them each in their own file and you can provided the scripts dont conflict

conflicts might be using the same variable names and one resets it over the other or the same alias name (which can be overcome with the alias -l I believe)

there is probably more

#163597 01/11/06 10:32 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The problem is that in each group, you have something that is a duplicate event with a previous group. So, if group 1 and 2 are both on, then the on OP and similar events in group 2 will not work because they are being done by group 1. You can't have a duplicate event in the same script.

Example:

This is okay:
on *:text:hi:#: { }
on *:text:bye:#: { }

This isn't:
on *:text:*:#: { }
on *:text:*:#: { }

That said, you can use $group in IF statements and merge the on OP events together and the other events that are duplicates together. You'd want to check if a the first group is on, then do the first on OP event you have there. If it's off and the second one is on, then do the second on OP event. That sort of thing.

Of course, at that point, groups may not really be that helpful for you because there are other methods of doing the same thing just as easily. But that is up to you.


Invision Support
#Invision on irc.irchighway.net
#163598 01/11/06 10:38 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
The best question would be to ask WHY do you want to put it into one file?

PS: the code break down to garbage near the end, after the 3rd group.


Link Copied to Clipboard