Guest User

Untitled

a guest
May 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. ;/* Edit Below to change the theme */
  2. alias theme return 6
  3. alias settings {
  4. 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.)
  5. 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
  6. elseif ($1 == 3) return $theme 12 $+  $+ $2 $+ ,6 you cannot enter your own lotto. 7 That would be 4 cheating ;).
  7. elseif ($1 == 4) return $theme 12 $+  $+ $2 $+ , 6 you are already in the lotto at postion 7 $3 $+ .
  8. elseif ($1 == 5) return $theme 12 $+  $+ $2 $+ , 6 you are now waiting in line to be served with the number 7  $3 $+ .
  9. elseif ($1 == 6) return $theme 12 $+  $+ $2 $+ , 6 You are not lotto starter or there is no 7 lotto to draw at this moment.
  10. elseif ($1 == 7) return $themeb 6 $+ Picking a nick name out at random...
  11. 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
  12. elseif ($1 == 9) return $theme 6 $+ A lotto has already been started. Please end that one before starting a new one.
  13. elseif ($1 == 10) return $theme 6 $+ $2 Im sorry Guys 7 The shop has now been 4 Closed
  14. elseif ($1 == 11) return $theme 6 $+ You do not have the 4correct permissions 12 to do this.
  15. elseif ($1 == 12) return $theme 6 $+ There is not 4 enough people 12 in the lotto to draw .
  16. }
  17. ;/* Edit above to change messages etc. Look at the example text to see what corisponds to what */
  18. on *:TEXT:*:#:{
  19. if ($($+(%,bot,$chan),2) == 0) { halt }
  20. if ($1 == !mix) {
  21. if ($($+(%,lot,$chan),2) == 0) { halt }
  22. if (!$readini(lottos.ini,n,$chan,prize)) {
  23. if ($regex($($+($,$0),2),/\(([0-9]+?)\)/)) {
  24. var %prize $($+($,2- $+ $calc($0 - 1)),2)
  25. msg $chan $settings(1,$chan,$nick,$($+($,$calc($0 - 1)),2),$regml(1))
  26. .timerLottoEnd. $+ $chan 1 $calc($regml(1) * 60) lottoEnd $chan
  27. }
  28. else msg $chan $settings(1,$chan,$nick,$2-)
  29. writeini -n lottos.ini $chan prize $iif(%prize,$v1,$2-)
  30. writeini -n lottos.ini $chan user $nick
  31. }
  32. else msg $chan $settings(9)
  33. }
  34. elseif ($1 == !close) {
  35. if ($($+(%,lot,$chan),2) == 0) { halt }
  36. if ($nick($chan,$nick,&~)) {
  37. if ($readini(lottos.ini,n,$chan,prize)) {
  38. .timerLottoEnd. $+ $chan off
  39. remini lottos.ini $chan
  40. write -c lotto $+ $chan $+ .txt
  41. msg $chan $settings(10,$chan,$nick)
  42. }
  43. else msg $chan $settings(2)
  44. }
  45. else msg $chan $settings(11)
  46. }
  47. elseif ($1 == !order) {
  48. if ($($+(%,lot,$chan),2) == 0) { halt }
  49. if ($readini(lottos.ini,n,$chan,prize)) {
  50. if ($readini(lottos.ini,$chan,user) != $nick) {
  51. if (!$read($+(lotto,$chan,.txt),s,$nick)) {
  52. write $+(lotto,$chan,.txt) $nick 1
  53. msg $chan $settings(5,$nick,$lines($+(lotto,$chan,.txt)))
  54. }
  55. else msg $chan $settings(4,$nick,$readn)
  56. }
  57. else msg $chan $settings(3,$nick)
  58. }
  59. else msg $chan $settings(2,$nick,$chan)
  60. }
  61. elseif ($1 == !serve) {
  62. if ($($+(%,lot,$chan),2) == 0) { halt }
  63. if ($readini(lottos.ini,n,$chan,prize)) && (($readini(lottos.ini,$chan,user) == $nick) || $nick($chan,$nick,&~)) {
  64. lottoEnd $chan
  65. }
  66. else msg $chan $settings(6,$nick,$chan)
  67. }
  68. if ($1 == !lot) {
  69. if ($regex($nick($chan,$nick).pnick,/(!|@|&|~)/)) {
  70. if ($2 == on) {
  71. set $+(%,lot,$chan) 1
  72. msg # Lotto script has been enabled.
  73. }
  74. if ($2 == off) {
  75. set $+(%,lot,$chan) 0
  76. msg # Lotto script has been disabled.
  77. }
  78. }
  79. else msg # Sorry $nick $+ , but you cannot use this command.
  80. }
  81. }
  82. alias lottoend {
  83. if ($lines($+(lotto,$1,.txt)) >= 3) {
  84. var %txt $+(lotto,$1,.txt)
  85. var %rand $read(%txt,$r(1,$lines(%txt)))
  86. msg $1 $settings(7)
  87. msg $1 $settings(8,$1,$gettok(%rand,1,32),$readini(lottos.ini,n,$chan,prize))
  88. msg $1 $theme $+ %rand $+ 's ID is: $read(ids.txt, sn, %rand)
  89. remini lottos.ini $1
  90. write -c %txt
  91. }
  92. else msg $1 $settings(12,$1)
  93. }
Add Comment
Please, Sign In to add comment