mIRC Home    About    Download    Register    News    Help

Topic Options
#141223 - 06/02/06 10:24 PM Nick Completer
NeoNY Offline
Pikka bird

Registered: 09/01/06
Posts: 19
Hello..
I'm having Problem with my Nick Completer, when i type "aw" its says nick from my channel "<NeoNY> [ PrincesOfDarkness ] [ ] if i type some world and if the word match its just say the user name... but i want this nick Compeleter to work with out , so Please help me fix this problem thank you...
for EX: there is 2 user on a Channel
1. NewNY
2. Guest1
when i will type gue[color:red], msg-here
its will say full name <Guest1> msg-here
Please help me with it... thank you all.
P,S - sorry for my bad english


Code:
 on *:INPUT:#: {
  if ($regex($1,^[^/]+.*,$)) {
    if ($fline(#,$+(*,$left($1,-1),*),1,1)) {
    /say 13,19,111,1[ 9,1 $line(#,$v1,1)11,1 ]9,113,1  13,19,111,1[ 9,1 $2- 11,1 ]9,113,1 | halt } 
    if (/* !iswm $1) { /say 13,19,111,1[ 9,1 $+($chr(3),9,$1-) 11,1 ]9,113,1 | halt } 
  }
}  

Top
#141224 - 07/02/06 09:59 AM Re: Nick Completer
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
Code:
on *:INPUT:#: {
  if ($regex($1,^[^/]+.*,$)) {
  if ((!$istok(/ $readini($mircini, text, commandchar), $left($1, 1), 32)) &amp;&amp; (!$ctrlenter) &amp;&amp; (!$inpaste)) {
    if ($fline(#,$+(*,$1,*),1,1)) {
      say 13,19,111,1[ 9,1 $line(#,$v1,1) 11,1 ]9,113,1  13,19,111,1[ 9,1 $2- 11,1 ]9,113,1
    else {
      say 13,19,111,1[ 9,1 $+($chr(3),9,$1) 11,1 ]9,113,1  13,19,111,1[ 9,1 $2- 11,1 ]9,113,1
    } 
    haltdef
  }
}


See if that is what you want.

Top
#141225 - 07/02/06 11:54 PM Re: Nick Completer
NeoNY Offline
Pikka bird

Registered: 09/01/06
Posts: 19
hm.... no its doesn't work.... i mean there is a few user on the Channel and BOT
BOT name : AOL
User Name: Hero
User name: evilboy
User Name : BeYoNd_dA_cAlL_oF_dUtY

if any letters match from the current list of name, let say "al" its will say <BeYoNd_dA_cAlL_oF_dUtY>, i don't want its to say the name with out the , so Please help me get it ~ thank you Guys ~ thanks once again ~ smile

Top
#141226 - 08/02/06 12:39 AM Re: Nick Completer
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
Im amazzed it worked at all. By mistake I left an old line of code frown

however...

Quote:
i don't want its to say the name with out the ,


you did not say that, you said the oppersite. have alook below.

Quote:
but i want this nick Compeleter to work with out ,



Anyway try this....

Code:
on *:INPUT:#: {
  if ((!$istok(/ $readini($mircini, text, commandchar), $left($1, 1), 32)) &amp;&amp; (!$ctrlenter) &amp;&amp; (!$inpaste) &amp;&amp; ($1 != ,) &amp;&amp; ($right($1,1) == ,)) {
    if ($fline(#,$+(*,$left($1,-1),*),1,1)) {
      say 13,19,111,1[ 9,1 $line(#,$v1,1) 11,1 ]9,113,1  13,19,111,1[ 9,1 $2- 11,1 ]9,113,1
    else {
      say 13,19,111,1[ 9,1 $+($chr(3),9,$1) 11,1 ]9,113,1  13,19,111,1[ 9,1 $2- 11,1 ]9,113,1
    } 
    haltdef
  }
}

Top
#141227 - 08/02/06 02:31 AM Re: Nick Completer
NeoNY Offline
Pikka bird

Registered: 09/01/06
Posts: 19
Thank you very much.... that work perfect.. smile
one more thing how can i add this

Code:
  on *:INPUT:*: if (/* !iswm $1) { /say 

i want this code to include with the code ? is the possible ? Please...
thank you DaveC

Top
#141228 - 08/02/06 02:36 AM Re: Nick Completer
MikeChat Offline
Hoopy frood

Registered: 12/12/02
Posts: 1245
Loc: California, doooood
I believe you are wanting this
if ((!$istok(/ $readini($mircini, text, commandchar), $left($1, 1), 32))
which is i the code

Top
#141229 - 08/02/06 02:52 AM Re: Nick Completer
NeoNY Offline
Pikka bird

Registered: 09/01/06
Posts: 19
that doesn't work, saying

* /if: invalid format (line 3, script.ini)

Top
#141230 - 08/02/06 03:07 AM Re: Nick Completer
MikeChat Offline
Hoopy frood

Registered: 12/12/02
Posts: 1245
Loc: California, doooood
Quote:
Thank you very much.... that work perfect.. smile
one more thing how can i add this

Code:
  on *:INPUT:*: if (/* !iswm $1) { /say 

i want this code to include with the code ? is the possible ? Please...
thank you DaveC

add it where, that string checks for the first character being a /
what I was saying was the first part of Dave's code does that and checks for a custom command character.

Maybe I misunderstand What you want to "add", and Where

Top
#141231 - 08/02/06 03:49 AM Re: Nick Completer
NeoNY Offline
Pikka bird

Registered: 09/01/06
Posts: 19
sorry for not being clear.... i want to add this
Code:
 on *:INPUT:*: if (/* !iswm $1) { /say 13,19,111,1[ 9,1 $+($chr(3),9,$1) 11,1 ]9,113,1   


with this code here
Code:
 on *:INPUT:#: {  
if ((!$istok(/ $readini($mircini, text, commandchar), $left($1, 1), 32)) &amp;&amp; (!$ctrlenter) &amp;&amp; (!$inpaste) &amp;&amp; ($1 != ,) &amp;&amp; ($right($1,1) == ,)) {    
if ($fline(#,$+(*,$left($1,-1),*),1,1)) {      
say 13,19,111,1[ 9,1 $line(#,$v1,1) 11,1 ]9,113,1  13,19,111,1[ 9,1 $2- 11,1 ]9,113,1   
 else {     
 say 13,19,111,1[ 9,1 $+($chr(3),9,$1) 11,1 ]9,113,1  13,19,111,1[ 9,1 $2- 11,1 ]9,113,1    
}     
haltdef  
}
}  


both work fine, but the prob is when i type any User nick from Channel list from the flowing user list, the TEXT repeat 2 times, one with the <nick> and msgg and 2nd one comes with the half of the nick and msg for EX: User: Guest1
User: NeoNY
NeoNY: <Guest1> Hello
NeoNY: Gue, Hello
Please smile
thank you ~

Top
#141232 - 08/02/06 03:51 AM Re: Nick Completer
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
Quote:
Code:
  on *:INPUT:*: if (/* !iswm $1) { /say 


As Mike has correctly said. The above code IS NOT NEEDED.

Try a command like //echo - wow the time is $time
You well find it well work with the code i previously posted.

Top
#141233 - 08/02/06 05:21 AM Re: Nick Completer
NeoNY Offline
Pikka bird

Registered: 09/01/06
Posts: 19
sorry forgot to say it.. I wanted the text to be color... frown sorry
confused


Edited by NeoNY (08/02/06 05:22 AM)

Top
#141234 - 08/02/06 09:47 AM Re: Nick Completer
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
well color it then

$2- is the text simply get before it and go ctrl-c then the color code, then a space then $+

Top
#141235 - 08/02/06 01:45 PM Re: Nick Completer
NeoNY Offline
Pikka bird

Registered: 09/01/06
Posts: 19
sorry... is this where u want pe to put it ?

Code:
  on *:INPUT:#: {  
  if ((!$istok(/ $readini($mircini, text, commandchar), $left($1, 1), 32)) &amp;&amp; (!$ctrlenter) &amp;&amp; (!$inpaste) &amp;&amp; ($1 != ,) &amp;&amp; ($right($1,1) == ,)) {    
    if ($fline(#,$+(*,$left($1,-1),*),1,1)) {      
      say  [color:red]  4 $2- $+ [/color] 13,19,111,1[ 9,1 $line(#,$v1,1) 11,1 ]9,113,1  13,19,111,1[ 9,1 $2 11,1 ]9,113,1 
      else {      
        say 13,19,111,1[ 9,1 $+($chr(3),9,$1) 11,1 ]9,113,1  13,19,111,1[ 9,1 $2- +$ $2 +$ 11,1 ]9,113,1  
      }     
      haltdef  
    }
  }
} 


sorry for being annoying frown i'm not so good at it frown, edit the for me and put it please....
Again, my apologies and thank you


Edited by NeoNY (08/02/06 01:48 PM)

Top
#141236 - 08/02/06 11:49 PM Re: Nick Completer
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
i can not color something for you with out knowing what you want colored. you aslo used +$ when i said $+

The whole line has colors in it already so i dont know what you wanted.

Top
#141237 - 09/02/06 07:49 AM Re: Nick Completer
NeoNY Offline
Pikka bird

Registered: 09/01/06
Posts: 19
i mean like...
For Ex: User: Guest1
User: NeoNY
let say we r the 2 person on the channel and i msged to Guest
<NeoNY> Gue, Hello --> Guest Helloo
this part with color work fine..
but i want my normal text to be colored as like
<NeoNY> Hello --> Hello
i want it to be color to... right now its a normal text color, how can i color it from my code? you don't have to color it.. but code it for me...please, i will color it my self, its will be a great help, and Thank you....

Top