mIRC Homepage

irc infection joke script error

Posted By: CyborAccess

irc infection joke script error - 19/02/05 05:02 AM

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!
Posted By: SladeKraven

Re: irc infection joke script error - 19/02/05 05:09 AM

Code:
On *:Text:!infect *:#: {
  describe $chan has infected $2 $+ 's computer.
}

Posted By: DaveC

Re: irc infection joke script error - 19/02/05 05:14 AM

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
Posted By: CyborAccess

Re: irc infection joke script error - 19/02/05 05:15 AM

SO THE * MEAN'S $NICK IN THAT ON TEXT PART....
BUT WHAT DOES $2 $+ MEAN?
Posted By: SladeKraven

Re: irc infection joke script error - 19/02/05 05:16 AM

No..

$nick is the person typing !infect.
$2 is the unlucky person being infected.
Posted By: SladeKraven

Re: irc infection joke script error - 19/02/05 05:18 AM

tokenize 32 $mid($1-,8) $nick smile
Posted By: CyborAccess

Re: irc infection joke script error - 19/02/05 05:21 AM

what about $+?
what does $+ mean?
Posted By: SladeKraven

Re: irc infection joke script error - 19/02/05 05:26 AM

$+ 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.
Posted By: DaveC

Re: irc infection joke script error - 19/02/05 05:27 AM

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
Posted By: tidy_trax

Re: irc infection joke script error - 19/02/05 11:19 AM

$+ concatenates strings together. smile
© 2019 mIRC Discussion Forums