Yes, however, you cannot check if you are op in an on join event because you're never op when you join a channel, the technical correct way to do this is to set a variable to 1 when you join, and then use an on op event, checking if you are the one getting the op and then you check if the variable is set (unset that variable whenever you get opped anyway). From that point, start the timer:

$+(.timerlottery.,#) 0 300 lottery $safe(#)

Then, make the alias lottery:

Code:
alias lottery {
 var %winner $nick($1,$r(1,$nick($1,0)))
 var %point $gettok(5,10,20,30,40,50,60,70,80,150,$r(1,10),44)
 var %inisection $+($1,.,%winner)
 writeini -n Points.ini %inisection Points $calc($readini(Points.ini,%inisection,Points) + %point)
 msg $1 %winner wins %point points!
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel