mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 7
L
luvbug Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2002
Posts: 7
I have a script which echos text from announcement 'bots'. I'd like to color specific words in the text before it is output to whatever channel I assign it. Here is a bit of my script.

on *:text:*:*:{
if ($nick == %echonick) /scid 2 { /msg %Echo-output $$1- }
if ( Playstation isin $$1- ) /scid 2 { /msg %special2 $$1- }
}

If %echonick says something like "I bought a playstation today", I'd like the output to be displayed as "I bought a playstation today"

%Echo-output is the Channel - %special2 is a person.

I'm positive I'm missing something obvious here, but I can't figure it out. Any help would be greatly appreciated.

Thanks in advance,
luvbug

Joined: Dec 2002
Posts: 212
V
Fjord artisan
Offline
Fjord artisan
V
Joined: Dec 2002
Posts: 212
$replace($1-,playstation,$+(ctrl+K4,Playstation)) ?
you may do this with $replacese or $reptok aswell


And all I need now is intellectual intercourse, a soul to dig the hole much deeper
Joined: Dec 2002
Posts: 7
L
luvbug Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2002
Posts: 7
Hi, thanks for taking the time to help me out. This didnt produce the results I need, but it's highly possibly I didn't implement it correctly, so correct me if I'm wrong.

on *:text:*:*:{
$replace($1-,Section,$+(4,Section))
if ($nick == %mimicnick) /scid 2 { /msg %Mimicoutput $1- }
}

luvbug

Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
Code:
on *:text:*:*:{
  if ($nick == %mimicnick) { scid 2 { msg %Mimicoutput $replace($1-,Section,$+ (4,Section,)) } }
}

Joined: Dec 2002
Posts: 7
L
luvbug Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2002
Posts: 7
That didn't quite work either, but thanks to you I've figured it out! Here's the final script:
on *:text:*:*:{
if ($nick == %mimicnick) /scid 2 { /msg %Mimicoutput $replace($1-,Section:,12Section:)
}

Thank you very much for helping me out on this,
luvbug


Link Copied to Clipboard