mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
can sum1 help me make a sript which can detect a word or phrase then after detecting that wor/phrase it will do sumthing like " msg in a channel, a notice to a channel or an action"...

or an slap replier...

like when someone slaps you an action or a msg to the channell..

Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
The code for such a thing would be:

On *:Text:*[color:red]word/phrase
*:#Channel:{
commands go here
}
[/color]

Whereby, commands go here can be any number of things, for example:

notice $nick [color:red]your message [/color] - To notice the person who said the 'phrase/word'.

msg $nick [color:red]your message [/color] - To private message the person who said the 'phrase/word'.

msg $chan [color:red]your message [/color] - To notice the channel the person who said the 'phrase/word'.

Note that the *'s in the On Text, are called "wildcards" and have the following response:

phrase/word* - Checks if phrase/word is at the start of the sentence.

*phrase/word - Checks if phrase/word is at the end of the sentence.

*phrase/word* - Checks if phrase/word is anywhere in the sentence.

Eamonn.

-----

Edit; since you modified your posting, to reply to an action you simply change the code to:


On *:Action:*[color:red]word/phrase
*:#Channel:{
commands go here
}
[/color]

to perform an action from a remote, you do.

/describe $chan [color:red]your message [/color] - to send a message to a channel.


/describe $nick [color:red]your message [/color] - to send a message the user in a private message.

Note, that in these events, $nick refers to the nickname who triggered the event, $chan refers to the channel that it was triggered in.

You can also change #channel to just # to trigger in all channels, or change #channel to ? which will only trigger in private messages, or * to trigger anywhere.

Eamonn.

Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
sorry dont know scripting... can u show me the actual code for that....
im making a slap detection script...its like when someone slaps me il send a msg/action to the chanell where a was slaped....

Joined: Mar 2004
Posts: 130
T
Vogon poet
Offline
Vogon poet
T
Joined: Mar 2004
Posts: 130
ALT+R the code below goes into remote
Code:
 
On *:TEXT:test:#:/describe # slaps $nick around a bit with a large trout
On @*:NOTICE:*:#:/kick # $nick Kicks $nick around a bit with a large trout
 

the on text code will triggering when somone types the word (test)
you can use wildcard test* this match evertink begins with test testdrive
or *test* to match everthink 1sttestdrive etc.....

the on notice code will match everting and kick the person thet send a notice to channel when your are oped

if somone slap you like this:

tsoglanos29 slaps Htech around a bit with a large trout


this would be the code you need
Code:
  
On *:Action:*:#:if ($1 == slaps) && ($2 == $me) { describe # slaps $nick around a bit with a large trout | ignore -cu30 $nick  }




Last edited by tsoglanos; 25/07/04 08:43 PM.
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
thnkz guy... il just combine your codes... i think i can manage now.. eheh... thankz


Link Copied to Clipboard