mIRC Home    About    Download    Register    News    Help

Print Thread
#235034 20/11/11 06:42 PM
Joined: Sep 2011
Posts: 37
C
Chinshy Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
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
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
Meh, see below. blush

Last edited by Thrull; 21/11/11 11:30 AM.

Yar
Joined: Jul 2006
Posts: 4,180
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,180
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
Joined: Sep 2011
Posts: 37
C
Chinshy Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Sep 2011
Posts: 37
im so thankful for you smile

Wims #235059 21/11/11 04:07 PM
Joined: Sep 2011
Posts: 37
C
Chinshy Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
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
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,180
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
Joined: Sep 2011
Posts: 37
C
Chinshy Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Sep 2011
Posts: 37
thanks again smile

Joined: Sep 2011
Posts: 37
C
Chinshy Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
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
W
Hoopy frood
Offline
Hoopy frood
W
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:
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
Joined: Nov 2008
Posts: 22
F
Ameglian cow
Offline
Ameglian cow
F
Joined: Nov 2008
Posts: 22
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
  }
}

Joined: Sep 2011
Posts: 37
C
Chinshy Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
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
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,180
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
Joined: Sep 2011
Posts: 37
C
Chinshy Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Sep 2011
Posts: 37
okay seems this one is working .. thanks

Joined: Nov 2011
Posts: 30
A
Ameglian cow
Offline
Ameglian cow
A
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
Offline
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

Link Copied to Clipboard