mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 13
S
Skrubz Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jun 2004
Posts: 13
OK People...I have one more request for help and I promise you will not hear from me again!! *choke*

Would someone be kind enough to write an addon script line that will send a message into the channel...from me...whenever the word 'help' is typed!?!...(I am on UnderNet)

Thanx


Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You could just read this and it basically gives you everything you need and an example to boot...
/help on text

But, here:
Code:
on *:text:*help*:#: {
  msg $chan Someone typed help.
}


Note that you can remove one or both *'s around "help" if you don't want to respond when help is anywhere in the line. If you only want to respond when help is written by itself, remove both *'s. If you want to only respond if it's the first thing on the line, just remove the last *. Leave both if you want to respond no matter where it is written in a line of text.


Invision Support
#Invision on irc.irchighway.net
Joined: Jul 2007
Posts: 32
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Jul 2007
Posts: 32
Or...

Code:
;If the word [b]help[/b] is anywhere is in the sentence say "Someone Typed Help"

on *:text:*help*:#: msg # Someone Typed help

;If something like blahblah[b]help[/b] was typed it would say "Someone Typed Help"

on *:text:*help:#: msg # Someone Typed Help

;If something like [b]help[/b]blahblah was typed it would say "Someone Typed Help"

on *:text:help*:#: msg # Someone typed help

;If the word [b]help[/b] is typed on its own it would say "Someone Typed Help"

on *:text:help:#: msg # Someone typed help


So like Riamus said, the "*" symble will acts like the word "anything" e.g *help* = if someone typed "anything"help"anything" it will pick out the word help and send the message.

Hope I explained it well :S, if not look at /help on text and maybe Khaled can explain it better wink

-Shadow

Joined: Jun 2004
Posts: 13
S
Skrubz Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jun 2004
Posts: 13
I did check out the mIRC help files and had a problem finding anything...but in the future I will do what u suggest...now that I know what to look for.

I really appreciate your assistance!

Thanx

Joined: Jun 2004
Posts: 13
S
Skrubz Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jun 2004
Posts: 13
You have also been very helpfull...thanx smile

Joined: Feb 2008
Posts: 7
M
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Feb 2008
Posts: 7
What if you wanted an ON TEXT script that responded to a list of keywords ??

Could someone tell me how I go about creating a variable and using $istok if that's the right way to go about it ..

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
/help $istok
Originally Posted By: Help File

$istok(text,token,C)


Note that you should consider reading the entire "page" that opens when using that /help command as it's all related and the other things on that page will help you understand this.

Code:
if ($istok(this is a list of words separated by chr32,%somevar,32)) { do this }



%somevar is what you're looking for. You can also use a var for the first part (the list of words). And you can use something other than $chr(32) [space] for separating the words ... just change the 32 at the end to the correct $chr() for the separating character.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2008
Posts: 7
M
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Feb 2008
Posts: 7
Yeah thanks for that but I was already using $istok and something similar however the On TEXT didn't activate if any of the keywords were present in part of a string of text typed by the individual but only if they typed the single keyword.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You will have to loop through all words in the sentence.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard