|
Joined: Jul 2003
Posts: 8
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
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
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
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-
|
|
|
|
Joined: Jul 2003
Posts: 8
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Jul 2003
Posts: 8 |
heh, I knew you were gonna say that. 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
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
The only thing I can think of is;
on *:TEXT:hello*:#: { echo -a $nick said: $1- | halt }
Edited as code stretched the page..
Last edited by SladeKraven; 05/07/03 08:33 AM.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
sladecraven beat me to it
Last edited by pheonix; 05/07/03 08:32 AM.
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Pheonix dude you kind of spelt my nick wrong again. Edited: Made a word italic to stress a point.
Last edited by SladeKraven; 05/07/03 08:37 AM.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
i edited fast
new username: tidy_trax
|
|
|
|
Joined: Jul 2003
Posts: 8
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Jul 2003
Posts: 8 |
Bummer, so there's no way to grab that text eh? That sux. 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
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
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
Last edited by pheonix; 05/07/03 08:46 AM.
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
The /halt command halts a script and stops any further processing. /help /halt
|
|
|
|
Joined: Jul 2003
Posts: 8
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
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...
ph34r our b34v3rs
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
on *:TEXT:*:#:{ .set %text $1- }
new username: tidy_trax
|
|
|
|
Joined: Jul 2003
Posts: 8
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Jul 2003
Posts: 8 |
not my text!!! the other dude's text into a variable!!!!!
ph34r our b34v3rs
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
We just told you how to get the text.
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.
|
|
|
|
Joined: Jul 2003
Posts: 8
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Jul 2003
Posts: 8 |
oh........ uh....... I knew dat! Ok good, thanks a bunch.
ph34r our b34v3rs
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
np note: if you wanted your text in a variable you use: on *:INPUT:#:{ .set %text $1- }
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Your text would be:
on *:INPUT:#: {
set %msg $1-
}
The users text would be:
on *:TEXT:*:#: {
set %msg $1-
}
/help on TEXT /help on INPUT
|
|
|
|
|