|
Joined: Dec 2003
Posts: 199
Vogon poet
|
OP
Vogon poet
Joined: Dec 2003
Posts: 199 |
on *:INPUT:*:{ if ($active == $chan) && ($1 ison $chan) { set %nicklen $len($1) | set %color $+ $rand(2,15) $+ ,01 | msg $chan %color $remove($nick($chan,$1).pnick,$1) $+ $left($1,1) $+ 15,01 $+ $replace($right($1,$calc(%nicklen - 1)),$right($1,1),%color $+ $right($1,1)) $+ 00,01: $2- | unset %color | halt } if ($left($1,1) == /) { return | halt } if ($left($1,1) != /) { .echo $chan $time( $+ %timestamp $+ ) %color.left $+ 10,1 $+ $remove($nick($chan,$me).pnick,$me)) $+ 0,1 $+ $me $+ %color.right 00,01 $+ $1- | .msg $active $1- | halt } } Ignore the if ($left($1,1) == / or != / part. I'm talking about the nick colorer. It works for almost every nick except for Jellodude and Hobo. I don't know why... Here's what I get (You'll have to paste it on mIRC to see) <Mew-scripting> 12,01 @J15,0112,01ellodud12,01e00,01: o_o <Mew-scripting> 3,01 @J15,013,01ellodud3,01e00,01: o_o <Mew-scripting> 10,01 @J15,0110,01ellodud10,01e00,01: o_o <Mew-scripting> 4,01 %+M15,01ew-scriptin4,01g00,01: =\ <Mew-scripting> 7,01 @+f15,01t[away7,01]00,01: :| ~Mew (Kriminal)
Want to Link Servers? PM Me - EliteIRC.dyndns.org -
|
|
|
|
Joined: Dec 2003
Posts: 199
Vogon poet
|
OP
Vogon poet
Joined: Dec 2003
Posts: 199 |
Alright, I know why. Because Jellodude has two "e" 's in his name. As well as hobo, having 2 o's in his name. Anyone know how to get around this?
Want to Link Servers? PM Me - EliteIRC.dyndns.org -
|
|
|
|
Joined: Aug 2003
Posts: 18
Pikka bird
|
Pikka bird
Joined: Aug 2003
Posts: 18 |
Very ugly. First of all, it helps if you stick to one command per line:
on *:INPUT:*:{
if ($active == $chan) && ($1 ison $chan) {
set %nicklen $len($1)
set %color $+ $rand(2,15) $+ ,01
msg $chan %color $remove($nick($chan,$1).pnick,$1) $+ $left($1,1) $+ 15,01 $+ $replace($right($1,$calc(%nicklen - 1)),$right($1,1),%color $+ $right($1,1)) $+ 00,01: $2-
unset %color
halt
}
if ($left($1,1) == /) {
return
halt
}
if ($left($1,1) != /) {
.echo $chan $time( $+ %timestamp $+ ) %color.left $+ 10,1 $+ $remove($nick($chan,$me).pnick,$me)) $+ 0,1 $+ $me $+ %color.right 00,01 $+ $1-
.msg $active $1-
halt
}
}
Eh, this sub can be removed: if ($left($1,1) != /) { Sheesh. I think you meant $timestamp, instead of %timestamp. And finally, on *:INPUT:*:{A space should be inserted between : and {. This is most likely your error, as I find things don't work when I don't use that space.
on *:INPUT:*: {
if ($active == $chan) && ($1 ison $chan) {
set %nicklen $len($1)
set %color $+ $rand(2,15) $+ ,01
msg $chan %color $remove($nick($chan,$1).pnick,$1) $+ $left($1,1) $+ 15,01 $+ $replace($right($1,$calc(%nicklen - 1)),$right($1,1),%color $+ $right($1,1)) $+ 00,01: $2-
unset %color
halt
}
if ($left($1,1) != /) {
.echo $chan $time( $+ $timestamp $+ ) %color.left $+ 10,1 $+ $remove($nick($chan,$me).pnick,$me)) $+ 0,1 $+ $me $+ %color.right 00,01 $+ $1-
.msg $active $1-
halt
}
}
Still kinda ugly. Enjoy.
|
|
|
|
Joined: Aug 2003
Posts: 18
Pikka bird
|
Pikka bird
Joined: Aug 2003
Posts: 18 |
Ohhh. That's what you meant. Well I'm through shifting through scripts today. Try to keep it more simple than you have been.
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
If $1 = Online, $left($1,1) would be O, $mid($1,2,-1) would be nlin and $right($1,1) would be e.
|
|
|
|
Joined: Dec 2003
Posts: 199
Vogon poet
|
OP
Vogon poet
Joined: Dec 2003
Posts: 199 |
z0r, Your mothers ugly. =/ FOr one, damn noob, %timestamp is intended to be %timestamp. KTHX And to Online, Thanks The code is fixed. All I needed was to replace my part that got the ob out of Hobo with The $mid part you put. Thanks a bunch.
Want to Link Servers? PM Me - EliteIRC.dyndns.org -
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
While zor wasnt elegant in his dilivery he did have a point about placing the code out nicely one line a command, I saw your post before any replies were issued, and just passed it over aas it was all clustered together, when its like that it takes 50% or more of the time just to decypher what its doing before you can locate the problem, when spaced out it reads faster and cleaner and erros are more notcable.
He was right about the == \, but the timestamp one was a guess as you may/are using your own, and he was wrong about the { i never have a problem puttting it next to the :
PS : why have you been staring at his mom?
|
|
|
|
Joined: Dec 2003
Posts: 199
Vogon poet
|
OP
Vogon poet
Joined: Dec 2003
Posts: 199 |
I haven't. She was looking at me. ;/
Want to Link Servers? PM Me - EliteIRC.dyndns.org -
|
|
|
|
|