mIRC Homepage
Posted By: TUSK3N Specific on text, Case sensitive - 10/11/16 11:07 AM
on *:TEXT:*LUL*:#:{
msg $chan LUL
}

So this is a very simple script that triggers when someone says LUL in a channel but I want it to be case sensitive so it only triggers when someone says LUL and not lul or LuL only LUL.

And also I would like it to trigger when someone says just LUL and not hiLULhi I know I can change the * LUL * but then it needs to be in the middle of a sentence.

So I want it to trigger when someone says
LUL this is a random text
,
hello this is a random text LUL
,
Wow LUL wow
.
And this is not when its supposed to trigger
This is a random textLUL
,
LULRandom Text
,ยจ
wowLULwow

I hope you get my confusing explanation.
Posted By: Red Re: Specific on text, Case sensitive - 10/11/16 11:56 PM
Try this:

Code:
on *:,TEXTLUL*:#:msg # LUL


Or

Code:
on *:TEXT:LUL*:#:msg # LUL


Warning: I did not test this.
Posted By: ruprecht Re: Specific on text, Case sensitive - 11/11/16 01:34 AM
Test every line of text using the case sensitive version of $findtok.

Code:
on *:TEXT:*:#:{ if ($findtokcs($1-,LUL,1,32)) msg $chan LUL }
Posted By: FroggieDaFrog Re: Specific on text, Case sensitive - 11/11/16 03:45 AM
Using regex, its fairly simple:
Code:
;; "on $" indicates the match text is a regex pattern
;;     (^| ) = start or space
;;     ( |$) = space or end
on $*:TEXT:/(^| )LUL( |$)/:#:{
  msg # LUL
}
© mIRC Discussion Forums