Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 15th, 2012  |  syntax: mIRC  |  size: 3.30 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ;/* Edit Below to change the theme */
  2. alias theme return 3
  3. alias settings {
  4.   if ($1 == 1) return $theme $+  $+ $3 has just started a lotto for6 $4 $+ . 3 $iif($5,The lotto will end in $5 minutes.)
  5.   elseif ($1 == 2) return $theme $+  $+ $2 $+ , no lotto is running in $3 at the moment.
  6.   elseif ($1 == 3) return $theme $+  $+ $2 $+ , you cannot enter your own lotto's. That would be cheating ;).
  7.   elseif ($1 == 4) return $theme $+  $+ $2 $+ , you are already in the lotto at postion $3 $+ .
  8.   elseif ($1 == 5) return $theme $+  $+ $2 $+ , you are now in the lotto for $4 at position $3 $+ 
  9.   elseif ($1 == 6) return $theme $+  $+ $2 $+ , You are not lotto starter or there is no lotto to draw at this moment.
  10.   elseif ($1 == 7) return $theme $+ Picking a nick name out at random...
  11.   elseif ($1 == 8) return $theme $+ Well done to $3 who won a $4 in $2 $+ !
  12.   elseif ($1 == 9) return $theme $+ A lotto has already been started. Please end that one before starting a new one.
  13.   elseif ($1 == 10) return $theme $+ $3 you have canceled the current lotto in progress.
  14.   elseif ($1 == 11) return $theme $+ You do not have the correct permissions to do this.
  15.   elseif ($1 == 12) return $theme $+ There is not enough people in the lotto to start.
  16. }
  17. ;/* Edit above to change messages etc. Look at the example text to see what corisponds to what */
  18. on *:TEXT:*:#:{
  19.   if ($1 == !lottostart) {
  20.     if (!$readini(lottos.ini,n,$chan,prize)) {
  21.  
  22.       if ($regex($($+($,$0),2),/\(([0-9]+?)\)/)) {
  23.         var %prize $($+($,2- $+ $calc($0 - 1)),2)
  24.         msg $chan $settings(1,$chan,$nick,$($+($,$calc($0 - 1)),2),$regml(1))
  25.         .timerLottoEnd. $+ $chan 1 $calc($regml(1) * 60) lottoEnd $chan
  26.       }
  27.       else msg $chan $settings(1,$chan,$nick,$2-)
  28.       writeini -n lottos.ini $chan prize $iif(%prize,$v1,$2-)
  29.       writeini -n lottos.ini $chan user $nick
  30.     }
  31.     else msg $chan $settings(9)
  32.   }
  33.   elseif ($1 == !clotto) {
  34.     if ($nick($chan,$nick,&~)) {
  35.       if ($readini(lottos.ini,n,$chan,prize)) {
  36.         .timerLottoEnd. $+ $chan off
  37.         remini lottos.ini $chan
  38.         write -c lotto $+ $chan $+ .txt
  39.         msg $chan $settings(10,$chan,$nick)
  40.       }
  41.       else msg $chan $settings(2)
  42.     }
  43.     else msg $chan $settings(11)
  44.   }
  45.   elseif ($1 == !lotto) {
  46.     if ($readini(lottos.ini,n,$chan,prize)) {
  47.       if ($readini(lottos.ini,$chan,user) != $nick) {
  48.         if (!$read($+(lotto,$chan,.txt),s,$nick)) {
  49.           write $+(lotto,$chan,.txt) $nick 1
  50.           msg $chan $settings(5,$nick,$lines($+(lotto,$chan,.txt)),$readini(lottos.ini,n,$chan,prize))
  51.         }
  52.         else msg $chan $settings(4,$nick,$readn)
  53.       }
  54.       else msg $chan $settings(3,$nick)
  55.     }
  56.     else msg $chan $settings(2,$nick,$chan)
  57.   }
  58.   elseif ($1 == !draw) {
  59.     if ($readini(lottos.ini,n,$chan,prize)) && (($readini(lottos.ini,$chan,user) == $nick) || $nick($chan,$nick,&~)) {
  60.       lottoEnd $chan
  61.     }
  62.     else msg $chan $settings(6,$nick,$chan)
  63.   }
  64. }
  65. alias lottoend {
  66.   if ($lines($+(lotto,$1,.txt)) >= 3) {
  67.     var %txt $+(lotto,$1,.txt)
  68.     var %rand $read(%txt,$r(1,$lines(%txt)))
  69.     msg $1 $settings(7)
  70.     .timer 1 3 msg $1 $settings(8,$1,$gettok(%rand,1,32),$readini(lottos.ini,n,$chan,prize))
  71.     remini lottos.ini $1
  72.     write -c %txt
  73.   }
  74.   else msg $1 $settings(12,$1)
  75. }