mIRC Home    About    Download    Register    News    Help

Print Thread
infect script error,please help! #119803 10/05/05 04:26 AM
Joined: Dec 2004
Posts: 80
C
CyborAccess Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
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


practice makes perfect... smile
Re: infect script error,please help! #119804 10/05/05 04:48 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
$chan

&

$2 $+ 's

&

lamescriptness <grin>

Re: infect script error,please help! #119805 10/05/05 11:36 PM
Joined: Dec 2004
Posts: 80
C
CyborAccess Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
i dont need ur suggestion :P
thanks anyway...


practice makes perfect... smile
Re: infect script error,please help! #119806 11/05/05 03:42 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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)

Last edited by DaveC; 11/05/05 03:58 AM.
Re: infect script error,please help! #119807 11/05/05 08:27 PM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
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...

Re: infect script error,please help! #119808 11/05/05 08:40 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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


Invision Support
#Invision on irc.irchighway.net
Re: infect script error,please help! #119809 11/05/05 09:43 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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.

Re: infect script error,please help! #119810 11/05/05 10:39 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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.


Gone.
Re: infect script error,please help! #119811 12/05/05 05:34 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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!

Re: infect script error,please help! #119812 12/05/05 11:08 AM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
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