mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
hi,i have problems with a script:

on 1:text:*!infect $nick:#:{
describe $chan has infected $nick computer
}

ok,originally i wanted it like....example:
let's just say the bot's name is INFECTION
and when u type !infect mairco(or someone's name)
,the script appers as
NFECTION has infected mairco computer
.BUT the real problem was "$nick" dont work in the
"on 1:text:*!infect $nick " part,
so can anyone explain me how it works please!


practice makes perfect... smile
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
On *:Text:!infect *:#: {
  describe $chan has infected $2 $+ 's computer.
}


Last edited by SladeKraven; 19/02/05 05:10 AM.
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
on 1:text:!infect*:#:{
tokinize 32 $mid($1-,8) $nick
describe $chan has infected $1 $+ 's computer
}

!infectBob
INFECTION has infected Bob's computer
!infect Bob
INFECTION has infected Bob's computer
!infect
INFECTION has infected DaveC's computer

Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
SO THE * MEAN'S $NICK IN THAT ON TEXT PART....
BUT WHAT DOES $2 $+ MEAN?


practice makes perfect... smile
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
No..

$nick is the person typing !infect.
$2 is the unlucky person being infected.

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
tokenize 32 $mid($1-,8) $nick smile

Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
what about $+?
what does $+ mean?


practice makes perfect... smile
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
$+ combines strings together (I think that's the term)

//echo -a Hello how are you, CyborAccess $+ !

Echoes: Hello how are you, CyborAccess!

//echo -a This $+ Combines $+ Your $+ String.

Echoes: ThisCombinesYourString.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
no * means what ever they type after "!infect " or in my example "!infect"
$1 is the first word they type !infect
$2 is the 2nd word (the nick they mention)

In my example im removing the word "!infected" and adding the person who said the text at the end.
so me saying
!infect bob becomes bob DaveC $1=bob $2 = DaveC, you note my example i use $1 as i removed the first word, SladeKarven uses $2, as he correctly knew $2 was the name
!infect becomes DaveC $1 = DaveC

I only added the $nick so the user who forgets to name someone gets the message at himself and everyone else laughs at them.

[edit]
Fricken 3 replies in the time it took me to type this.
LOL

Last edited by DaveC; 19/02/05 05:45 AM.
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
$+ concatenates strings together. smile


New username: hixxy

Link Copied to Clipboard