mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
hi,i know matchtext scripts but i want to make a script that have a matchtext "-program" and a text appears atfer u say -program and after a period of time (EXAMPLE: 10 second), a another text will appear!
i've been woundering how to script it,but sometimes scripting is just too confusing,so can anyone please teach me how to make a script like this? please help!!!!!!

thatyou!


practice makes perfect... smile
Joined: Feb 2005
Posts: 194
A
Vogon poet
Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
Is this what you meant? I have no idea what "matchtext" is. This will trigger only if you say "-program":
Code:
on *:INPUT:#: { 
  if ($1 == -program) {
    echo -a BLAH
    .timer 1 10 echo -a BLAH
    halt
  }
}
This will trigger when someone else says "-program":
Code:
on *:TEXT:-program:#: { 
  echo -a BLAH
  .timer 1 10 echo -a BLAH
}


"God sometimes puts us in the dark for us to see the light"
Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
no i mean like when i say -program,a text appears and then 10 second later another text that is part of the sciprt appears


practice makes perfect... smile
Joined: Feb 2005
Posts: 194
A
Vogon poet
Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
that's what the INPUT one does.


"God sometimes puts us in the dark for us to see the light"
Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
ok thanks


practice makes perfect... smile
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I think you want to show one line of your script or some other text file, one new line every 10 seconds?
Code:
on *:TEXT:-program:#: { 
if (%linenumber == $null) { set %linenumber 1 }
 set %programchannel $chan
if ($group(#programgroup).status  != on) { .enable #programgroup }
playprogram
}

#programgroup off
alias playprogram {
msg %programchannel $read[color:red](program.txt[/color],%linenumber)
inc %linenumber
advanceline
}

alias advanceline {
if (%linenumber > $lines([color:red]program.txt[/color]) { unset %linenumber | unset %programchannel | .disable #programgroup | halt }
.timerprogram 1 10 playprogram
}

#programgroup end


Note: Replace the file name (shown in red) with the actual file name.

I have not tested this but I think it will work for what I think you wanted.

Last edited by MikeChat; 07/05/05 05:15 AM.
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
on *:TEXT:-program:#: {
echo -a BLAH
.timer 1 10 echo -a BLAH
}
on *:TEXT:-program:#: { echo -a $1 }

the red text in that event is the "matchtext" and is also in the identifier $1


Link Copied to Clipboard