|
Joined: Sep 2011
Posts: 37
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2011
Posts: 37 |
wanna ask that to make when i call any nickname on the chat
it appears between () and the nick be with color yellow
ty
|
|
|
|
Joined: Aug 2006
Posts: 183
Vogon poet
|
Vogon poet
Joined: Aug 2006
Posts: 183 |
Meh, see below.
Last edited by Thrull; 21/11/11 11:30 AM.
Yar
|
|
|
|
Joined: Jul 2006
Posts: 4,180
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,180 |
on *:INPUT:#: {
if (!$istok(/ $readini(mirc.ini,text,commandchar),$left($1,1),32)) && (!$ctrlenter) {
msg $chan $regsubex($1-,/(\S+)/g,$iif(\1 ison $chan,$+($chr(3),08,( $+ \1),$chr(3)),\1))
haltdef
}
}
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Sep 2011
Posts: 37
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2011
Posts: 37 |
im so thankful for you
|
|
|
|
Joined: Sep 2011
Posts: 37
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2011
Posts: 37 |
sry another thing what if i wanna write with a font red and still have the same thing for highlight yellow nicknames between ()
|
|
|
|
Joined: Jul 2006
Posts: 4,180
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,180 |
on *:INPUT:#: {
if (!$istok(/ $readini(mirc.ini,text,commandchar),$left($1,1),32)) && (!$ctrlenter) {
var %hlnick $regsubex($1-,/(\S+)/g,$iif(\1 ison $chan,$+($chr(3),08,( $+ \1),$chr(3)),\1))
msg $chan $+($chr(3),04,%hlnick)
haltdef
}
} The same way we assumed that you were using 8 for yellow, I assume you're using 4 for red.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Sep 2011
Posts: 37
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2011
Posts: 37 |
thanks again
|
|
|
|
Joined: Sep 2011
Posts: 37
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2011
Posts: 37 |
okay i have an issue now
thats the commands start with ! doesnt work
i have to type /say !flags as a exmaple
any idea how it can be fixed
|
|
|
|
Joined: Jul 2006
Posts: 4,180
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,180 |
It is expected, you want to write in red so the 'red color' must be put before the text, here before the '!'. In your case, a bot is probably looking for a '!' as the first character in your first word but can't handle the color. To prevent the color from being added you can use control+enter instead of enter itself, you could also ask the person who is managing the bot to handle colors in general. I spotted a little bug in the code anyway, use this one:
on *:INPUT:#: {
if (!$istok(/ $readini($mircini,text,commandchar),$left($1,1),32)) && (!$ctrlenter) {
msg $chan $+($chr(3),04,$regsubex($1-,/(\S+)/g,$iif(\1 ison $chan,$+($chr(3),08,( $+ \1),$chr(3)),\1)))
haltdef
}
}
Last edited by Wims; 22/11/11 12:30 AM.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Nov 2008
Posts: 22
Ameglian cow
|
Ameglian cow
Joined: Nov 2008
Posts: 22 |
You can also modify Wims' script to account for things like bot commands, like so:
on *:INPUT:#: {
if (!$istok(/ ! $readini($mircini,text,commandchar),$left($1,1),32)) && (!$ctrlenter) {
msg $chan $+($chr(3),04,$regsubex($1-,/(\S+)/g,$iif(\1 ison $chan,$+($chr(3),08,( $+ \1),$chr(3)),\1)))
haltdef
}
}
|
|
|
|
Joined: Sep 2011
Posts: 37
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2011
Posts: 37 |
i think there is something wrong also on Wims addon
only the first part get red but after i call the nick it goes black
|
|
|
|
Joined: Jul 2006
Posts: 4,180
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,180 |
Right, use this: on *:INPUT:#: {
if (!$istok(/ ! $readini($mircini,text,commandchar),$left($1,1),32)) && (!$ctrlenter) {
msg $chan $+($chr(3),04,$regsubex($1-,/(\S+)/g,$iif(\1 ison $chan,$+($chr(3),08,( $+ \1),$chr(3),04),\1)))
haltdef
}
}
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Sep 2011
Posts: 37
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2011
Posts: 37 |
okay seems this one is working .. thanks
|
|
|
|
Joined: Nov 2011
Posts: 30
Ameglian cow
|
Ameglian cow
Joined: Nov 2011
Posts: 30 |
i got some issue on it it doesnt work on pnplus
it give me nothing blank sentence
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
You would have to disable or remove any theming that your current script(s) use or else merge this into what you already have. Themes very often do not simply work together if they weren't designed to do so.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
|