mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2016
Posts: 50
T
TUSK3N Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Mar 2016
Posts: 50
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.

Joined: Nov 2016
Posts: 7
R
Red Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
R
Joined: Nov 2016
Posts: 7
Try this:

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


Or

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


Warning: I did not test this.

Last edited by Red; 10/11/16 11:58 PM.
Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
Test every line of text using the case sensitive version of $findtok.

Code:
on *:TEXT:*:#:{ if ($findtokcs($1-,LUL,1,32)) msg $chan LUL }

Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
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
}

Last edited by FroggieDaFrog; 11/11/16 03:47 AM.

I am SReject
My Stuff

Link Copied to Clipboard