mIRC Home    About    Download    Register    News    Help

Print Thread
#34214 05/07/03 08:02 AM
Joined: Jul 2003
Posts: 8
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Jul 2003
Posts: 8
Hello!
I'm a n00b at this scripting stuff but I one a few things already, I was just woundering where the hell is the text identifier for the text someone just typed in (not me, but someone else)?

(btw, I'm not talking about the "on TEXT" event neither.....)

Thankew


ph34r our b34v3rs
#34215 05/07/03 08:09 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Remote identifiers.
$0 : Returns the number of space-delimited tokens in the $1- line
$1 : Returns the first word in a line
$2 : Rertuns the second
$3 : Third word
$1- : Returns the whole line
$2- : Returns the whole line after the second word.
/help $1-

#34216 05/07/03 08:25 AM
Joined: Jul 2003
Posts: 8
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Jul 2003
Posts: 8
heh, I knew you were gonna say that. crazy

What I meant was, let's say I got an "on *:TEXT:hello*" in my remote scripts, mkay? Now when that event triggers I want to be able to take the text of the guy who typed, kinda like $nick....comprende?

Thanks again!


ph34r our b34v3rs
#34217 05/07/03 08:30 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
The only thing I can think of is;
Code:
on *:TEXT:hello*:#: { echo -a $nick said: $1- | halt }

confused
Edited as code stretched the page..

Last edited by SladeKraven; 05/07/03 08:33 AM.
#34218 05/07/03 08:31 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
sladecraven beat me to it grin

Last edited by pheonix; 05/07/03 08:32 AM.

new username: tidy_trax
#34219 05/07/03 08:35 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Pheonix dude you kind of spelt my nick wrong again. mad
Edited: Made a word italic to stress a point. grin

Last edited by SladeKraven; 05/07/03 08:37 AM.
#34220 05/07/03 08:35 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
i edited fast smile


new username: tidy_trax
#34221 05/07/03 08:43 AM
Joined: Jul 2003
Posts: 8
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Jul 2003
Posts: 8
Bummer, so there's no way to grab that text eh? That sux. crazy

Anyways, just curious, what does the "halt" do at the end of the coding?... I checked the helpfile but I still don't get it... o_O


ph34r our b34v3rs
#34222 05/07/03 08:45 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on *:TEXT:*:#:{
//echo -a $nick said: $1-
}
but sladecraven already said it :tongue:
edit: got it right this time cool

Last edited by pheonix; 05/07/03 08:46 AM.

new username: tidy_trax
#34223 05/07/03 08:47 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
The /halt command halts a script and stops any further processing.
/help /halt

#34224 05/07/03 08:49 AM
Joined: Jul 2003
Posts: 8
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Jul 2003
Posts: 8
yeh yeh yeh :tongue:

Well I meant so that I can put it in a variable or something to work on it (change it or take a part of it) to form my automatic reply... there must be a way since I see some bots do it often... confused


ph34r our b34v3rs
#34225 05/07/03 08:50 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on *:TEXT:*:#:{
.set %text $1-
}


new username: tidy_trax
#34226 05/07/03 08:52 AM
Joined: Jul 2003
Posts: 8
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Jul 2003
Posts: 8
not my text!!! the other dude's text into a variable!!!!! shocked


ph34r our b34v3rs
#34227 05/07/03 08:54 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
that is his text :\


new username: tidy_trax
#34228 05/07/03 08:55 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
We just told you how to get the text.
Code:
on *:TEXT:*:#: {
.raw privmsg $me $nick said: $1- in $chr(3) $+ 12 $+ $chan $+ . 
}

That gets the text from a channel you're in. Private messages yourself what someone has said. For example.
(09:52) <Synthet|c> SladeKraven said: Hello in #Infinite-Darkness.

#34229 05/07/03 08:57 AM
Joined: Jul 2003
Posts: 8
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Jul 2003
Posts: 8
oh........ uh....... I knew dat! crazy

Ok good, thanks a bunch. wink


ph34r our b34v3rs
#34230 05/07/03 08:58 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
np smile
note: if you wanted your text in a variable you use:
on *:INPUT:#:{
.set %text $1-
}


new username: tidy_trax
#34231 05/07/03 08:59 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Your text would be:
Code:
on *:INPUT:#: {
  set %msg $1-
}


The users text would be:
Code:
on *:TEXT:*:#: {
 set %msg $1-
}


/help on TEXT
/help on INPUT


Link Copied to Clipboard