mIRC Home    About    Download    Register    News    Help

Print Thread
[help] 2 scripts interfering with each other #42114 16/08/03 02:58 AM
Joined: Jan 2003
Posts: 39
Q
quiglag Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Jan 2003
Posts: 39
I got both of these scripts from these boards and work seperate, but when both are loaded they interfere. Problem: The message i type is said twice, and now the acros dont work. Ex.
<Quiglag> fhfh
14«0@Quiglag14» fhfh

can anyone help me? Thanks
Code:
on ^*:TEXT:*:*:{
  var %nick = $iif($chan,$left($remove($nick($chan,$nick).pnick,$nick),1) $+ $nick,$nick)
  var %window = $iif($chan,$chan,$nick)
  echo -tmi2 %window 14«0 $+ %nick $+ 14» $1-
  haltdef
}
on *:INPUT:*: {
  if (($left($1,1) == / || $left($1,1) == $readini($mircini,text,commandchar)) &amp;&amp; (!$ctrlenter)) return
  /msg $active $1-
  var %nick = $iif($chan,$left($remove($nick($chan,$nick).pnick,$nick),1) $+ $nick,$nick)
  echo $color(own) -atmi2 14«0 $+ %nick $+ 14» $1-
  halt 
}

---------------------------------------------------------------------------
Second script (Acros)

On *:input:#:{
  if /* iswm $1 || $ctrlenter { return }
  var %i = 1, %total = $0, %word, %string
  while %i &lt;= %total {
    %word = $ [ $+ [ %i ] ]
    if $readini(acro.mrc,acro,%word) {
      %string = %string $ifmatch
    }
    else %string = %string %word
    %i = %i + 1
  }
  say %string
  halt
}
  

Re: [help] 2 scripts interfering with each other #42115 16/08/03 05:10 AM
Joined: Feb 2003
Posts: 143
N
naki Offline
Vogon poet
Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
If both the on inputs are in the same script file they wont work. Try moving them to another file or make it all one thing.


We don't just write the scripts, we put them to the test! (ScriptBusters)
Re: [help] 2 scripts interfering with each other #42116 16/08/03 05:24 AM
Joined: Jan 2003
Posts: 39
Q
quiglag Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Jan 2003
Posts: 39
They are in different files, and how would I go about combining the two.

Re: [help] 2 scripts interfering with each other #42117 16/08/03 09:58 AM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Code:
 on *:INPUT:*: {
  if (($left($1,1) == / || $left($1,1) == $readini($mircini,text,commandchar)) &amp;&amp; (!$ctrlenter)) return
  var %i = 1, %total = $0, %word, %string
  while %i &lt;= %total {
    %word = $ [ $+ [ %i ] ]
    if $readini(acro.mrc,acro,%word) {
      %string = %string $ifmatch
    }
    else %string = %string %word
    %i = %i + 1
  }
  .msg $active %string
  var %nick = $iif($chan,$left($remove($nick($chan,$nick).pnick,$nick),1) $+ $nick,$nick)
  echo $color(own) -atmi2 14«0 $+ %nick $+ 14» %string
  halt 
} 


Code:
//if ( khaled isgod ) echo yes | else echo no
Re: [help] 2 scripts interfering with each other #42118 16/08/03 05:31 PM
Joined: Jan 2003
Posts: 39
Q
quiglag Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Jan 2003
Posts: 39
Using your code theRat anything I type is messeged "1"

Re: [help] 2 scripts interfering with each other #42119 16/08/03 05:43 PM
Joined: Jan 2003
Posts: 39
Q
quiglag Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Jan 2003
Posts: 39
Nevermind, I typed the code out wrong. Works great. Thanks. smile