我的mIRC代码;
on *:text:!raffle *:#:{
var %hash $+(raffle.,#)
if ($nick isop #) && $2 == on && !$hget(%hash) {
hmake %hash
msg # The raffle now is open. Use !raffle and the amount of time you would like to enter to 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 $+ , You bought $2 ticket, you now have %p points
}
else { msg # $nick Sorry, you don't have enough PuroPoints }
}
elseif ($nick isop #) && $2 == winner && $hget(%hash) {
var %i $rand(1,$hget(%hash,0).data)
msg # The winner is $hget(%hash,%i).data $+ .
}
elseif ($nick isop #) && $2 == over && $hget(%hash) {
var %i $rand(1,$hget(%hash,0).data)
hfree %hash
}
}我怎样做才能让版主把抽奖(数字)放进去。号码是票的价格。目前一张票的价格是3.我以为会是这样的;
var %ra $calc( $2 * $3 - 0)但它不会work>任何想法,请
发布于 2014-06-23 14:36:49
根据您的评论,以下应该很好地套用您。
更改:
var %ra $calc( $2 * 3 - 0)至:
var %ra = $calc($2 * %pricePerTicket)并在mIRC命令中编写以下命令:
/set %pricePerTicket 3这将使每张票的价格为3,你可以随意改变它。
https://stackoverflow.com/questions/24356250
复制相似问题