mIRC Homepage
Posted By: CyborAccess infect script error,please help! - 10/05/05 04:26 AM
hi i wanted to make a infect-script but there some error in the script,can anyone please correct it?
herw's my script:

Code:
 on *:TEXT:!infect *:#:{
  describe #chan is breacking the security of $+
  describe #chan has infected $+ $2 's computer
  /notice #chan 4[WARNING]: $+ $2's computer is infected 
} 


i still dont see the error,anyone know what error this script has?? please help :P
Posted By: DaveC Re: infect script error,please help! - 10/05/05 04:48 AM
$chan

&

$2 $+ 's

&

lamescriptness <grin>
Posted By: CyborAccess Re: infect script error,please help! - 10/05/05 11:36 PM
i dont need ur suggestion :P
thanks anyway...
Posted By: DaveC Re: infect script error,please help! - 11/05/05 03:42 AM
Well u need someones becuase you dont seem to know what your doing. Why ask here if you didnt want suggestions.

Lets check out what i suggested.

first $chan & $2 $+ 's

Code:
on *:TEXT:!infect *:#:{
  describe [color:blue]$chan[/color] is breacking the security of [color:blue]$2 $+ 's [/color] computer
  describe [color:blue]$chan[/color] has infected [color:blue]$2 $+ 's[/color] computer
  notice [color:blue]$chan[/color] 4[WARNING]: [color:blue]$2 $+ 's[/color] computer is infected 
}


Now to remove some lameness as well

Code:
on *:TEXT:!infect *:#:{
  if ((!$($+(%,infected.infector.,$nick),2)) &amp;&amp; (!$($+(%,infected.infectie.,$2),2))) {
    if $nick($chan,$2) {
      describe $chan scanning $2 for infection.
      if ($($+(%,infected.gag.,$2),2)) {
         .timer 1 $rand(2,4) describe $chan infected $2 on $asctime($gettok($v1,1,32),dddd dd/mmm/yyyy @ h:nn:sstt) infection was caused by $gettok($v1,2,32) while on channel $gettok($v1,3,32)
      }
      else {
        set -u15 $+(%,infected.infector.,$nick) $true
        set -u15 $+(%,infected.infectie.,$2) $true
        .timer 1 $rand(2,4) describe $chan begins the infection process on poor $2
        .timer 1 $rand(5,7) describe [color:blue]$chan[/color] is breaking the security of [color:blue]$2 $+ 's [/color] computer
        .timer 1 $rand(8,9) describe [color:blue]$chan[/color] has infected [color:blue]$2 $+ 's[/color] computer
        .timer 1 10 notice [color:blue]$chan[/color] 4[WARNING]: [color:blue]$2 $+ 's[/color] computer is infected.
        set $+(%,infected.gag.,$2) $ctime $nick $chan
      }
    }
  }
}


[edit]
* code is untested (basicly becuase i think its still pretty lame, but at least it looks mildly amusing now)
Posted By: Kelder Re: infect script error,please help! - 11/05/05 08:27 PM
Just to make sure: $2's does work, $+ is not needed for the $n identifiers, just like $mircdirversion.txt and some other $*dir identifiers.

That doesn't mean I find it the best way of coding tho...
Posted By: Riamus2 Re: infect script error,please help! - 11/05/05 08:40 PM
I personally use $+ for any of that just because it makes it much easier to read and find problems. $mircdirversion.txt is much more difficult to read than $mircdir $+ version.txt. The second way makes it much easier to determine where the filename starts without really looking too hard. That's just me, though. laugh
Posted By: DaveC Re: infect script error,please help! - 11/05/05 09:43 PM
Hmmm your right! I learnt something today! Thanks.

PS: I think mircs a little evil how some identifiers can and some cant, almost like there isnt one central clearing house for whats what.
Posted By: FiberOPtics Re: infect script error,please help! - 11/05/05 10:39 PM
This is in the help file btw, in the aliases section.

Quote:
/laugh /me laughs at $1's joke

Anything appended to a $ parameter is appended to the final parameter. So if in the above example we type /laugh mimi the final command would be /me laughs at mimi's joke.
Posted By: DaveC Re: infect script error,please help! - 12/05/05 05:34 AM
And of course we know thats not the truth even if you just take that as meaning the $n values, and not things like $me

//tokenize 32 Man Woman Dog | echo $2.version.II Is here!
Woman.version.II Is here!

but

//tokenize 32 Man Woman Dog | echo $2.version.2 Is here!
Woman Is here!

What happende to my .version.2 Damn im stuck with this original model!
Posted By: Kelder Re: infect script error,please help! - 12/05/05 11:08 AM
You're right, only the text after the last number in the appended text is shown
//tokenize 32 a b c d | echo -a >> $2uuzz2rrrrr3tttt5y
displays just
>> by

$mircdir doesn't have that number problem...

Seems like we have a candidate for the bug report forum.

Or for the feature suggestion forum: throw those appendable identifiers out smile
© mIRC Discussion Forums