mIRC Home    About    Download    Register    News    Help

Print Thread
#123133 20/06/05 03:46 PM
Joined: Jun 2005
Posts: 18
s1cK Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Jun 2005
Posts: 18
i want some script who can count all kicks
i coded something but ...
its stil funny
btw im just newbie in scripting so dont laugh smile
Code:
 on 1:kick:*: {
  if ( $chan == #wirus ) {
    if ( % $+ $chan $+ _ $+ $nick = $null ) { 
      set % $+ $chan $+ _ $+ $nick 1 
      //write -l kick.txt $chan $nick % $+ $chan $+ _ $+ $nick 1
    }
    else { inc % $+ $chan $+ _ $+ $nick 
      //write -l kick.txt $chan $nick % $+ $chan $+ _ $+ $nick
    }
  }
}

half of this work and the othed half doesnt
what i wanted is that from var % $+ $chan $+ _ $+ $nick take nick number and place in that kick.txt file
bud it doesnt work
it puts whole var in txt file
some thing like this
Code:
#wirus s1cK %#wirus_s1cK

an i wanted to look like this
Code:
[#wirus]
s1cK = 1

plz help


just the only iMage
#123134 20/06/05 05:34 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
You can do it like this

Code:
 on *:kick:#wirus: { 

  var %kicks = $calc( $readini(kick.ini, $chan, $nick) + 1)

  writeini kick.ini $chan $nick %kicks

  msg $chan $nick $+ : You have kicked %kicks time(s)

} 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#123135 20/06/05 08:33 PM
Joined: Jun 2005
Posts: 18
s1cK Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Jun 2005
Posts: 18
tnx smile
realy helpful


just the only iMage
#123136 20/06/05 09:40 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
not that its important for this anymore but

while
set % $+ $chan $+ _ $+ $nick 1
inc % $+ $chan $+ _ $+ $nick 1
both work

if ( % $+ $chan $+ _ $+ $nick = $null ) {
does not

these well, u surround the variable name with $( ,2) which means evaluate twice one to make the name up, once to get that value of it.
if ( $( % $+ $chan $+ _ $+ $nick ,2) = $null ) {
or written like this...
if ( $( $+(%,$chan,_,$nick) ,2) = $null ) {

#123137 20/06/05 09:48 PM
Joined: Jun 2005
Posts: 18
s1cK Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Jun 2005
Posts: 18
hehe
like i said on start of this topic
im just a newbie in scripting and im stil learning smile
tnx


just the only iMage

Link Copied to Clipboard