irc - Raffle price change on input -
irc - Raffle price change on input -
my code mirc;
on *:text:!raffle *:#:{ var %hash $+(raffle.,#) if ($nick isop #) && $2 == on && !$hget(%hash) { hmake %hash msg # raffle open. utilize !raffle , amount of time come in join. remember, 1 entry = 3 puropoints! } elseif $2 isnum && $2 > 0 && $hget(%hash) { var %topic $+(#,.,$nick), %point $readini(points.ini,%topic,points) var %ra $calc( $2 * 3 - 0) if %point >= %ra { var %p $calc( %point - %ra ) writeini points.ini %topic points %p var %i $hget(%hash,0).item, %t $calc(%i + $2) while %i < %t { inc %i | hadd %hash %i $nick } msg # $nick $+ , bought $2 ticket, have %p points } else { msg # $nick sorry, don't have plenty puropoints } } elseif ($nick isop #) && $2 == winner && $hget(%hash) { var %i $rand(1,$hget(%hash,0).data) msg # winner $hget(%hash,%i).data $+ . } elseif ($nick isop #) && $2 == on && $hget(%hash) { var %i $rand(1,$hget(%hash,0).data) hfree %hash } } how create when !raffle on (number) set in moderator. number cost ticket shall cost. @ moment ticket costs 3. thought like;
var %ra $calc( $2 * $3 - 0) but won't work> ideas please
based on commentes next should suite well.
change:
var %ra $calc( $2 * 3 - 0) to:
var %ra = $calc($2 * %priceperticket) and write @ mirc command following:
/set %priceperticket 3 this set cost per ticket 3, , can alter @ will.
irc mirc twitch
Comments
Post a Comment