输入中的抽奖价格变化

时间:2014-06-22 22:14:24

标签: irc mirc twitch

我的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)

但它不会工作&gt; 有任何想法

0 个答案:

没有答案