mIRC Home    About    Download    Register    News    Help

Print Thread
#101495 25/10/04 02:51 AM
Joined: Sep 2004
Posts: 85
G
Babel fish
OP Offline
Babel fish
G
Joined: Sep 2004
Posts: 85
this is what i got:

on ^*:text:xdcc send #*:?: {
/msg $nick You must use /ctcp $me $1- to download from this bot.
}

as you can tell, its for xdcc and what i want is if someone messages my bot with xdcc send, they do it in the format of xdcc send #2 and it reply's You must use /ctcp <botnick> xdcc send #2 to download from this bot. what i want is to make it so directly after the # MUST be a number for the bot to reply with the message, so it reply's if someone msg's it with xdcc send #2, but not xdcc send #onsgonfhij(any random letters/numbers).

#101496 25/10/04 03:17 AM
Joined: Mar 2004
Posts: 457
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Mar 2004
Posts: 457
read this

You won't get any help for that here, u should know that by now.

#101497 25/10/04 07:21 PM
Joined: Sep 2004
Posts: 85
G
Babel fish
OP Offline
Babel fish
G
Joined: Sep 2004
Posts: 85
ok....but at least anwser this for me, can token's be used in "if" statements? as in if token ___ isnum, else halt if so, how?

#101498 26/10/04 03:25 AM
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
if ($tokenize($1-,#) isin Blah) { do this }

#101499 26/10/04 11:34 AM
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
Code:
If ($N isnum) { command }
Else { halt }

N = Token Number.
I do not believe $Tokenize is an identifier. However, /tokenize is a command.


- Relinsquish
#101500 26/10/04 07:42 PM
Joined: Sep 2004
Posts: 85
G
Babel fish
OP Offline
Babel fish
G
Joined: Sep 2004
Posts: 85
and how do i get a token number?, kinda new to the token stuff

#101501 26/10/04 10:38 PM
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
The token number is basically the "Nth" word in a sentence seperated by spaces. For example: I have a dog named Bingo. $4 would equal to "dog". $1- would be the whole sentence. $2-4 would be "have a dog". Get the idea?


- Relinsquish
#101502 26/10/04 11:00 PM
Joined: Sep 2004
Posts: 85
G
Babel fish
OP Offline
Babel fish
G
Joined: Sep 2004
Posts: 85
yeah, i get that part of it, but is there any way i can get the Nth letter in a sentence, lets say "123456" can i do an "if" statement that will say(as an example) if (the3rdletter) == 3 | echo -a True | else echo -a The third letter is not 3.

#101503 27/10/04 02:04 AM
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
Code:
If ($Mid($N,3,1) == 3) { echo -a True }
Else { echo -a The third letter is not 3. }

Basically what $Mid does is it locates the letter number in the specific word and returns is. The 3 inside the $Mid means "third letter", 1 means "return 1 letter to the right of that position".


- Relinsquish
#101504 27/10/04 10:41 AM
Joined: Sep 2004
Posts: 85
G
Babel fish
OP Offline
Babel fish
G
Joined: Sep 2004
Posts: 85
ok, cool, thx


Link Copied to Clipboard