mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 51
D
Dingo Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2002
Posts: 51
(first i'd like to say 'wow this window we type the posts into is rediculiously small...')

I've been writting a custom display script for mirc, but i've been asked to alter it to add nick highlights. so far i've only been using mirc's highlight feature but the halt command stops that from working. My scripting abilities are extreamly rusty at the moment.
How can i script a highlight into that? thanks smile if you can help
Code:
 
on ^*:TEXT:*:#: { 
  if ($nick isop $chan) { echo 2 $chan <@ $+ $nick $+ >1 $1- | halt }
  if ($nick isvo $chan) { echo 2 $chan <+ $+ $nick $+ >1 $1- | halt }
  else                  { echo 2 $chan < $+ $nick $+ >1 $1- | halt }
}
 

Joined: Dec 2002
Posts: 51
D
Dingo Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2002
Posts: 51
Quote:
(first i'd like to say 'wow this window we type the posts into is rediculiously small...')


Well I should learn to chek my profile settings b4 i complain about the forum.
The small size of the 'post' window is defined in the display preferences by
'TextArea columns' and 'TextArea rows'

Joined: Dec 2004
Posts: 23
E
Ameglian cow
Offline
Ameglian cow
E
Joined: Dec 2004
Posts: 23
/haltdef maybe?

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Check the -switches for /echo. wink These can apply applicable settings from mIRCs Options dialog.

echo -mbflirt pretty much covers user messages.

The -m switch indicates that the line should be treated as a user message, not an event.
The -bf switches make it apply the beep/flash settings in the window it is echoing to.
The -l switch makes it apply the highlight settings to the line that's displayed.
The -iN switch indents the wrapped line by N characters.
The -r switch applies the strip settings in the messages dialog.
The -t switch prefixes the line with a timestamp if global time stamping is on or timestamping is on for that window.

The -c switch uses the specified color name from the colors dialog.
(-c quit --- is color 2 by default IIRC)

Code:
on ^*:TEXT:*:#:{
  echo -mbflirtc quit # $+(<,$remove($nick(#,$nick).pnick,$nick),$nick,>1) $1-
  haltdef
}



$+(<,$left($remove($nick(#,$nick).pnick,$nick),1),$nick,>1)

- $+(string,string,string) is like "string $+ string $+ string"

- $nick(#,$nick).pnick = @nick, +nick, etc - but nick may be opped, hopped and voiced (and more) at the same time (e.g. @+nick)

- $remove($nick(#,$nick).pnick,$nick) == @+
- $left($remove($nick(#,$nick).pnick,$nick),1) = @ (in the example)

$+(<,$left($remove($nick(#,$nick).pnick,$nick),1),$nick,>1) = <@nick>1 or <+nick>1 etc

Last edited by Iori; 18/12/04 08:16 AM.
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi Iori,

we meet again smile

You forgot to put the $left in your code between the code tags, even though you explained it thorougly. Now it's basically removing nick and appending it again, without effect.

Of course, if this person is anything of a scripter, he could replace it himself, but if not...

Greets


Gone.
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Woah yeah, Thanks for pointing that out, again smile

I'm sure Dingo can manage adding the $left( ,1) into the line. smile


Link Copied to Clipboard