mIRC Home    About    Download    Register    News    Help

Print Thread
W
wobY
wobY
W
So I'm making a giveaway bot and I implemented the sub luck option. But now I don't know how could the bot write the users name in the text file X times.

Would this work?
Code:
timer %subluck 1 write Giveaway.txt $nick

B
Blas
Blas
B
I'm not completely clear of what you are asking, but you shouldn't use a timer IMO. There is no reason to tell mIRC to wait to keep using the WRITE function. A WHILE loop would work better.

Code:
ON $*:TEXT:/^!subluck\s\d+/iS:#: {
  subluck $2
}

alias subluck {
  VAR %x = $1
  VAR %y = 1
  WHILE (%x >= %y) {
    WRITE Giveaway.txt $nick
    INC %y
  }
}


The above should give you a basic idea of how to implement it. In the above example, if a user types "!subluck 5" then it will write their name to Giveaway.txt five times.

W
wobY
wobY
W
tnx laugh


Link Copied to Clipboard