|
Joined: Dec 2005
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Dec 2005
Posts: 54 |
on 1:TEXT:*hi, how are you doing*:#coast:/msg =Cow 1 | /msg =Cow 2 | /msg =Cow 3 | /msg =Cow 4
----
This gets triggerd when someone says 'hi, how are you doing' in channel #coast. Then reply to the nick 'Cow', in the already existing DCC window.
What can I change, so that if I don't have a DCC going with that nick it will not try to send something to the nick.
Thanx!
|
|
|
|
Joined: Mar 2003
Posts: 612
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
on 1:TEXT:*hi, how are you doing*:#coast:{
if $chat($nick,1) {
/msg =Cow 1 | /msg =Cow 2 | /msg =Cow 3 | /msg =Cow 4
}
} btk
billythekid
|
|
|
|
Joined: Aug 2005
Posts: 525
Fjord artisan
|
Fjord artisan
Joined: Aug 2005
Posts: 525 |
... if $chat($nick) { msg $nick asdf } ...
/help $chat
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
not $chat($nick) but $chat(COW)...
on 1:TEXT:*hi, how are you doing*:#coast:{ if ($chat(COW)) { msg =Cow 1 | msg =Cow 2 | msg =Cow 3 | msg =Cow 4 } }
|
|
|
|
Joined: Aug 2005
Posts: 525
Fjord artisan
|
Fjord artisan
Joined: Aug 2005
Posts: 525 |
I just assumed he would substitute his own nicks since those seemed like "fake" ones so to speak.
|
|
|
|
Joined: Dec 2005
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Dec 2005
Posts: 54 |
Thanx for ALL the help, its gr8ly appreciated!
Another thing: I want that string to trigger when a spesific nick (Merdock) says my nick.
How would I be able to do that? Maybe like this?
on 1:TEXT:Merdock:*$me*:#coast: etc... (I'm not sure if the mask (regards to $me - spaces, or no spaces?) is done correctly, and positioning of Merdock.)
Thanx again!
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
on *:text:* $+ $me $+ *:#coast: {
if ($nick == Merdock) {
do whatever you want here
}
}
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Dec 2005
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Dec 2005
Posts: 54 |
Is this correct then: on *:text:* $+ $me $+ *:#coast: {
if ($nick == Merdock)
if ($chat(Merdock)) {
msg =Merdock 1 | msg =Merdock 2 | msg =Merdock 3 | msg =Merdock 4 }
}
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Close.
on *:text:* $+ $me $+ *:#coast: {
if ($nick == Merdock) {
if ($chat(Merdock)) {
msg =Merdock 1 | msg =Merdock 2 | msg =Merdock 3 | msg =Merdock 4 }
}
}
I'm curious, though... are you really meaning to check if a person types in a channel, then if they do, you're going to automatically type something in a chat window to them? That seems strange to me.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Feb 2006
Posts: 546
Fjord artisan
|
Fjord artisan
Joined: Feb 2006
Posts: 546 |
don't forget $() in the matchtext:
on *:text:$($+(*,$me,*)):#coast:{
if you want $me evaluated
"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Heh. I so rarely use identifiers there that I forget if it needs evaluated or not.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Dec 2005
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Dec 2005
Posts: 54 |
Am I correct in saying, after all is said and done, this is the final code. on *:text:$($+(*,$me,*)):#coast:{
if ($nick == Merdock) {
if ($chat(Merdock)) {
msg =Merdock 1 | msg =Merdock 2 | msg =Merdock 3 | msg =Merdock 4 }
}
} It's part of a game I'm working on Riamus2 - still learning to code as I go along. Many thanx for the help!
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Invision Support #Invision on irc.irchighway.net
|
|
|
|
|