Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;/* Edit Below to change the theme */
- alias theme return 6
- alias settings {
- if ($1 == 1) return $theme 12 $+ $+ $3 6 is mixing up 12 $4 $+ 7 type !order to enter Before entering the lotto type !addid <id> $iif($5,The lotto will end in $5 minutes.)
- elseif ($1 == 2) return $theme 12 $+ $+ $2 $+ ,6 there is no lotto is running in $3 at the moment 7 start one by typing !give
- elseif ($1 == 3) return $theme 12 $+ $+ $2 $+ ,6 you cannot enter your own lotto. 7 That would be 4 cheating ;).
- elseif ($1 == 4) return $theme 12 $+ $+ $2 $+ , 6 you are already in the lotto at postion 7 $3 $+ .
- elseif ($1 == 5) return $theme 12 $+ $+ $2 $+ , 6 you are now waiting in line to be served with the number 7 $3 $+ .
- elseif ($1 == 6) return $theme 12 $+ $+ $2 $+ , 6 You are not lotto starter or there is no 7 lotto to draw at this moment.
- elseif ($1 == 7) return $themeb 6 $+ Picking a nick name out at random...
- elseif ($1 == 8) return $theme 6 $+ Well done to $3 who got served the quickest, $4 in $2 $+ ! 12You Have Been Credited 1 credit Type !store to see what you can buy
- elseif ($1 == 9) return $theme 6 $+ A lotto has already been started. Please end that one before starting a new one.
- elseif ($1 == 10) return $theme 6 $+ $2 Im sorry Guys 7 The shop has now been 4 Closed
- elseif ($1 == 11) return $theme 6 $+ You do not have the 4correct permissions 12 to do this.
- elseif ($1 == 12) return $theme 6 $+ There is not 4 enough people 12 in the lotto to draw .
- }
- ;/* Edit above to change messages etc. Look at the example text to see what corisponds to what */
- on *:TEXT:*:#:{
- if ($($+(%,bot,$chan),2) == 0) { halt }
- if ($1 == !mix) {
- if ($($+(%,lot,$chan),2) == 0) { halt }
- if (!$readini(lottos.ini,n,$chan,prize)) {
- if ($regex($($+($,$0),2),/\(([0-9]+?)\)/)) {
- var %prize $($+($,2- $+ $calc($0 - 1)),2)
- msg $chan $settings(1,$chan,$nick,$($+($,$calc($0 - 1)),2),$regml(1))
- .timerLottoEnd. $+ $chan 1 $calc($regml(1) * 60) lottoEnd $chan
- }
- else msg $chan $settings(1,$chan,$nick,$2-)
- writeini -n lottos.ini $chan prize $iif(%prize,$v1,$2-)
- writeini -n lottos.ini $chan user $nick
- }
- else msg $chan $settings(9)
- }
- elseif ($1 == !close) {
- if ($($+(%,lot,$chan),2) == 0) { halt }
- if ($nick($chan,$nick,&~)) {
- if ($readini(lottos.ini,n,$chan,prize)) {
- .timerLottoEnd. $+ $chan off
- remini lottos.ini $chan
- write -c lotto $+ $chan $+ .txt
- msg $chan $settings(10,$chan,$nick)
- }
- else msg $chan $settings(2)
- }
- else msg $chan $settings(11)
- }
- elseif ($1 == !order) {
- if ($($+(%,lot,$chan),2) == 0) { halt }
- if ($readini(lottos.ini,n,$chan,prize)) {
- if ($readini(lottos.ini,$chan,user) != $nick) {
- if (!$read($+(lotto,$chan,.txt),s,$nick)) {
- write $+(lotto,$chan,.txt) $nick 1
- msg $chan $settings(5,$nick,$lines($+(lotto,$chan,.txt)))
- }
- else msg $chan $settings(4,$nick,$readn)
- }
- else msg $chan $settings(3,$nick)
- }
- else msg $chan $settings(2,$nick,$chan)
- }
- elseif ($1 == !serve) {
- if ($($+(%,lot,$chan),2) == 0) { halt }
- if ($readini(lottos.ini,n,$chan,prize)) && (($readini(lottos.ini,$chan,user) == $nick) || $nick($chan,$nick,&~)) {
- lottoEnd $chan
- }
- else msg $chan $settings(6,$nick,$chan)
- }
- if ($1 == !lot) {
- if ($regex($nick($chan,$nick).pnick,/(!|@|&|~)/)) {
- if ($2 == on) {
- set $+(%,lot,$chan) 1
- msg # Lotto script has been enabled.
- }
- if ($2 == off) {
- set $+(%,lot,$chan) 0
- msg # Lotto script has been disabled.
- }
- }
- else msg # Sorry $nick $+ , but you cannot use this command.
- }
- }
- alias lottoend {
- if ($lines($+(lotto,$1,.txt)) >= 3) {
- var %txt $+(lotto,$1,.txt)
- var %rand $read(%txt,$r(1,$lines(%txt)))
- msg $1 $settings(7)
- msg $1 $settings(8,$1,$gettok(%rand,1,32),$readini(lottos.ini,n,$chan,prize))
- msg $1 $theme $+ %rand $+ 's ID is: $read(ids.txt, sn, %rand)
- remini lottos.ini $1
- write -c %txt
- }
- else msg $1 $settings(12,$1)
- }
Add Comment
Please, Sign In to add comment