mIRC Home    About    Download    Register    News    Help

Print Thread
#165841 01/12/06 07:35 PM
S
S3R0
S3R0
S
Hi i have got a litle problem with my script

on *:TEXT:*:#:{
if ( $1 == test ){ write -a " $+ $mircdir\logs\Trigger\ $+ $date(dd.mm.yyyy) Trigger.log" $time $nick $1-
window @TriggerBox
echo @TriggerBox $time $nick $1-
}
}


ok the problem is it triggers an sends the sentence to the trigger window and writes it in to the ini file but in the trigger window everything will be echod not only the sentence with the trigger word

would be helpful if someone could help me

Last edited by S3R0; 01/12/06 07:37 PM.
#165842 01/12/06 07:49 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Try this (untested):

Code:
on *:TEXT:test *:#:{ 
  write -a " $+ $mircdir\logs\Trigger\ $+ $date(dd.mm.yyyy) Trigger.log" $time $nick $1- 
  if (!$window(@TriggerBox)) { window @TriggerBox }
  echo @TriggerBox $time $nick $1- 
} 

#165843 01/12/06 07:51 PM
Z
Zonk
Zonk
Z
maybe, its some syntax issue, also id advise you to put the trigger word into the matchtext..

Code:
on *:text:test *:#:{
   write -a " $+ $mircdir\logs\Trigger\ $+ $date(dd.mm.yyyy) Trigger.log" $time $nick $1- 
   if (!$window(@TriggerBox)) { window @TriggerBox }
   echo @TriggerBox $time $nick $1-
}

#165844 01/12/06 08:05 PM
S
S3R0
S3R0
S
thx for your help however it doesen`t work it doesen`t write in the ini file and the trigger window doens`t open and nothing is echod
frown

#165845 01/12/06 09:18 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Is there color in the text before the trigger (or bold/underline)?

This will trigger on:
test something else

It will not trigger on:
test
or
Ctrl-K10test

It will also not work if YOU type it. Only when someone else types it.

Btw, you keep saying "ini file" ... nowhere in your code or what was given to you is an ini file used. A text file is used. If you want an ini file, you need to use writeini.

#165846 01/12/06 09:34 PM
S
S3R0
S3R0
S
oh sorry i mean log I had it as ini

i have tried with 2 mircs 1 with the script and one to send the triger text without color codes it will not work ok i have drunk a few beer :tongue:

ok i don`t realy know if my script works becouse i have changed few times

but i had it working vor the log file the main problem is the trigger window confused

#165847 01/12/06 10:14 PM
Joined: Mar 2003
Posts: 612
B
Pan-dimensional mouse
Offline
Pan-dimensional mouse
B
Joined: Mar 2003
Posts: 612
there was a space missing:

Code:
 
on *:TEXT:*:#:{
    if ( $1 == test [color:red]) { [/color] 
      var %i $time $nick $1-
      write -a $qt($+($mircdirlogs\Trigger\,$date(dd.mm.yyyy),Trigger.log)) %i
      window @TriggerBox
      echo @TriggerBox %i
    }
} 



billythekid
#165848 01/12/06 10:51 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
That shouldn't prevent what I wrote from working, though. I wonder if maybe he has his original script above the one I wrote. If so, it will prevent mine from working.

#165849 01/12/06 11:03 PM
Joined: Mar 2003
Posts: 612
B
Pan-dimensional mouse
Offline
Pan-dimensional mouse
B
Joined: Mar 2003
Posts: 612
it's just he mentioned that it was echoing everything(which i took to be all on *:text:*:#:) that i was thinking.

I wonder if he has his original code, and if the code he has looks anything like any of the codes we posted! lol

btk blush


billythekid
#165850 02/12/06 08:18 AM
S
S3R0
S3R0
S
my code was something like this

on *:TEXT:*:#:{
if ( $1 == test ){ write -a " $+ $mircdir\logs\Trigger\ $+ $date(dd.mm.yyyy) Trigger.log" $time $nick $1-
window @TriggerBox
echo @TriggerBox $time $nick $1-
}
}

thx four your help now my code looks like this

on *:TEXT:*:#:{
var %bt1 * $+ cheater $+ *
var %bt2 * $+ hdf $+ *
var %bt3 * $+ [censored] $+ *
var %bt4 * $+ ntg $+ *
var %bt5 * $+ arschloch $+ *
var %bt6 * $+ hitler $+ *
var %bt7 * $+ sack $+ *
var %bt8 * $+ heil $+ *
var %bt9 * $+ nazi $+ *
var %bt10 * $+ huso $+ *

if (%bt1 iswm $strip($1-,buc)) { goto next }
if (%bt2 iswm $strip($1-,buc)) { goto next }
if (%bt3 iswm $strip($1-,buc)) { goto next }
if (%bt4 iswm $strip($1-,buc)) { goto next }
if (%bt5 iswm $strip($1-,buc)) { goto next }
if (%bt6 iswm $strip($1-,buc)) { goto next }
if (%bt7 iswm $strip($1-,buc)) { goto next }
if (%bt8 iswm $strip($1-,buc)) { goto next }
if (%bt9 iswm $strip($1-,buc)) { goto next }
if (%bt10 iswm $strip($1-,buc)) { goto next }
else { halt }
:next
var %i $time $nick $1-
write -a $qt($+($mircdirlogs\Trigger\,$date(dd.mm.yyyy),Trigger.log)) $strip(%i,buc)
window @TriggerBox
echo @TriggerBox %i
}

and i works fine smile

#166043 05/12/06 04:36 PM
Z
Zonk
Zonk
Z
Code:
on *:text:*:#: {
  var %a = 1,%bt = cheater,hdf,whateverhere,ntg,arschloch,hitler,sack,heil,nazi,huso
  while ($gettok(%bt,%a,44)) {
    if ($(*,$v1,*) iswm $strip($1)) {
      var %i $time $nick $1-
      write -a $qt($+($mircdirlogs\Trigger\,$date(dd.mm.yyyy),Trigger.log)) $strip(%i,buc)
      if (!$window(@TriggerBox)) { window @TriggerBox }
      echo @TriggerBox %i
    }
    inc %a
  }
}


untested, but a little shorter than yours wink

#166178 07/12/06 12:55 PM
S
S3R0
S3R0
S
Nice Thx

now my code looks like this

Code:
on *:TEXT:*:#:{
  var %a = 1,%bt = ( %tbn1 , %tbn2 , %tbn3 , %tbn4 , %tbn5 , %tbn6 , %tbn7 , %tbn8 , %tbn9 , %tbn10 , %tbn11 , %tbn12 , %tbn13 , %tbn14 , %tbn15 , %tbn16 , %tbn17 , %tbn18 , %tbn19 , %tbn20 , %tbn21 )
  if ( * $+ $v1 $+ *  iswm $strip($1)) {
    var %i $time $nick $1-
    write -a $qt($+($mircdirlogs\Trigger\,$date(dd.mm.yyyy) Trigger.log)) $strip(%i,buc)
    window @TriggerBox
    echo @TriggerBox $strip(%i,buc)
  }
  inc %a
}


Link Copied to Clipboard