mIRC Home    About    Download    Register    News    Help

Print Thread
#243800 28/12/13 05:54 PM
Joined: Dec 2013
Posts: 2
A
Aleya Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
A
Joined: Dec 2013
Posts: 2
Hi everyone.
I have this script in my client and I have one little problem any scripter will know as it's about basic mIRC script
Code:
on *:JOIN:#italymafia: { beep 1 }
on *:TEXT:*help*:#italymafia: { msg $chan You need help? What's the problem? }
on *:TEXT:*banned*:#italymafia: { msg $chan You got banned? Appeal a ban at 3http://forum.sa-mp.im/viewforum.php?f=19 and be patient! }
on *:TEXT:*unban*:#italymafia: { msg $chan You want to be unbanned? Appeal a ban at 3http://forum.sa-mp.im/viewforum.php?f=19 and be patient! }
on *:TEXT:*admin*:#italymafia: { msg $chan What do you need admins for? }
on *:TEXT:*Aleya*:#italymafia: { msg $chan sup }
on *:TEXT:*question*:#italymafia: { msg $chan You have a question? Go ahead and ask it. }
on *:TEXT:*appeal*:#italymafia: { msg $chan Having trouble appealing? Read this guide and follow the steps: http://forum.sa-mp.im/viewtopic.php?f=12&t=27617 }
on *:TEXT:*hello*:#italymafia: { msg $chan Hi $nick }
on *:TEXT:*anyone*:#italymafia: { msg $chan yes }


Whenever someone says for example: "helper bla bla" the message appears because helper contains "help" word in it. I don't want it to be like that.
I want the message to appear only when someone says "help" as a word.

If you got what I mean, please help! :p

Joined: Dec 2013
Posts: 5
Z
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
Z
Joined: Dec 2013
Posts: 5
on *:TEXT:help:#italymafia: { msg $chan You need help? What's the problem? }

use that:
if you use on *:TEXT:help: it just answer "help" word

if you type on *:TEXT:*help: it will answer which sentence end of "help"
like that:
<user> hi. i need help
<you> You need help? what's the problem?


if you type on *:TEXT:help*: it will answer which sentence begining of "help"
like that:
<user> help me please
<you> You need help? what's the problem?

if you use on *:TEXT:*help* it replies all of "help" words


zaza #243804 28/12/13 08:01 PM
Joined: Dec 2013
Posts: 2
A
Aleya Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
A
Joined: Dec 2013
Posts: 2
Yes I understand that.
But as I use *help*, whenever it detects term "help" it answers.
For example even when someone says "helper" it answers with that.

Joined: Dec 2013
Posts: 5
Z
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
Z
Joined: Dec 2013
Posts: 5
use it
on *:TEXT:help:#: $regex^help$

Joined: Dec 2013
Posts: 10
T
Pikka bird
Offline
Pikka bird
T
Joined: Dec 2013
Posts: 10
This should work for you:

Code:
on *:TEXT:*help*:#: { if ($regex($1-,/\bhelp\b/)) .msg $chan You need help? What's the problem? }


or even shorter:

Code:
on $*:TEXT:/\bhelp\b/iS:#: { .msg $chan You need help? What's the problem? }


Should work on:
help
help me
please help
I need help.

But not on:
You helped me out. Thanks!

Last edited by TestCoder; 29/12/13 08:32 PM.

Link Copied to Clipboard