mIRC Home    About    Download    Register    News    Help

Print Thread
#235034 20/11/11 06:42 PM
C
Chinshy
Chinshy
C
wanna ask that to make when i call any nickname on the chat

it appears between () and the nick be with color yellow

ty

#235052 21/11/11 07:14 AM
Joined: Aug 2006
Posts: 182
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 182
Meh, see below. blush

Last edited by Thrull; 21/11/11 11:30 AM.
#235054 21/11/11 09:38 AM
Joined: Jul 2006
Posts: 4,020
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
Code:
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
Wims #235058 21/11/11 04:04 PM
C
Chinshy
Chinshy
C
im so thankful for you smile

Wims #235059 21/11/11 04:07 PM
C
Chinshy
Chinshy
C
sry another thing what if i wanna write with a font red and still have the same thing for highlight yellow nicknames between ()

#235064 21/11/11 05:06 PM
Joined: Jul 2006
Posts: 4,020
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
Code:
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
#235078 21/11/11 10:52 PM
C
Chinshy
Chinshy
C
thanks again smile

#235079 21/11/11 11:20 PM
C
Chinshy
Chinshy
C
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

#235080 21/11/11 11:39 PM
Joined: Jul 2006
Posts: 4,020
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
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:
Code:
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
Wims #235111 23/11/11 07:19 PM
F
Firstmate
Firstmate
F
You can also modify Wims' script to account for things like bot commands, like so:

Code:
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
  }
}

#235118 23/11/11 11:12 PM
C
Chinshy
Chinshy
C
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

#235130 24/11/11 09:29 AM
Joined: Jul 2006
Posts: 4,020
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
Right, use this:
Code:
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
#235132 24/11/11 10:31 AM
C
Chinshy
Chinshy
C
okay seems this one is working .. thanks

#235452 19/12/11 01:41 PM
A
arc123
arc123
A
i got some issue on it it doesnt work on pnplus

it give me nothing blank sentence

#235462 19/12/11 11:39 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
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.


Link Copied to Clipboard