Guest User

Untitled

a guest
Jul 23rd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 7.01 KB | None | 0 0
  1. alias resultpollcode {
  2.   msg #tenetri {{<<< Results: Check the stream! >>>}}
  3.   unset %voteoptions | unset %nforoptions | unset %votenicks | unset %pollison | unset %pollchannel | unset %poll.q
  4.   unset %option1 | unset %option2 | unset %option3 | unset %option4 | unset %option5 | unset %option6 | unset %option7 | unset %option8 | unset %option9 | unset %option10
  5.   unset %option1votes | unset %option2votes | unset %option3votes | unset %option4votes | unset %option5votes | unset %option6votes | unset %option7votes | unset %option8votes | unset %option9votes | unset %option10votes
  6.   remove pollq.txt
  7.   remove option1.txt | remove option3.txt | remove option2.txt | remove option4.txt | remove option5.txt | remove option6.txt | remove option7.txt | remove option8.txt | remove option9.txt | remove option10.txt
  8.   remove option1votes.txt | remove option2votes.txt | remove option3votes.txt | remove option4votes.txt | remove option5votes.txt | remove option6votes.txt | remove option7votes.txt | remove option8votes.txt | remove option9votes.txt | remove option10votes.txt
  9. }
  10.  
  11. on *:text:*:#:{
  12.   if ($1 == !poll) {
  13.     if ($nick isop $chan || $nick == 47y_bot || $nick == 47y_mc) {
  14.       if (%pollison == 1) { notice $nick poll is already on }
  15.       elseif (!$2) { .notice $nick enter something to vote for }
  16.       else {
  17.         set -e %pollison 1
  18.         set -e %pollchannel #
  19.         set %poll.q $2-
  20.         write pollq.txt $2-
  21.         msg # {{<<< Vote for: $2- >>>}}
  22.       }
  23.     }
  24.   }
  25.   elseif ($1 == !pollstop) {
  26.     if ($nick == 47y_bot || $nick isop $chan || $nick == 47y_mc) {
  27.       /resultpollcode
  28.     }
  29.   }
  30.   elseif ($1 == !pollhalt && %pollison && $nick isop #) {
  31.     msg # >>poll halted<<
  32.     .timerpoll off
  33.     unset %voteoptions | unset %nforoptions | unset %votenicks | unset %pollison | unset %pollchannel | unset %poll.q | remove pollq.txt
  34.     /rewrite
  35.   }
  36.   elseif ($1 == !vote) {
  37.     if (# != #tenetri) { .notice $nick sorry theres already a poll in #tenetri }
  38.     elseif ($address($nick,2) isin %votenicks) { .notice $nick you cant vote more than once! }
  39.     elseif (!$2) { msg $chan Usage: !vote <what to vote for> }
  40.     elseif ($address($nick,2) !isin %votenicks) && (%pollison == 1) {
  41.       set -e %votenicks $addtok(%votenicks,$address($nick,2),44)
  42.       if (%option1 != $2- && %option2 != $2- && %option3 != $2- && %option4 != $2- && %option5 != $2- && %option6 != $2- && %option7 != $2- && %option8 != $2- && %option9 != $2- && %option10 != $2-) {
  43.         if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 != $null && %option6 != $null && %option7 != $null && %option8 != $null && %option9 != $null && %option10 != $null) {
  44.           msg $chan $nick $+ , your vote has not been cast because you must chose one of the available options.  Please Re-vote.
  45.         }
  46.         if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 != $null && %option6 != $null && %option7 != $null && %option8 != $null && %option9 != $null && %option10 == $null) {
  47.          
  48.           set %option10 $2-    
  49.                
  50.           write option10.txt $2-
  51.          
  52.           goto increase
  53.         }
  54.         if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 != $null && %option6 != $null && %option7 != $null && %option8 != $null && %option9 == $null) {
  55.  
  56.           set %option9 $2-
  57.  
  58.           write option9.txt $2-
  59.  
  60.           goto increase
  61.         }
  62.         if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 != $null && %option6 != $null && %option7 != $null && %option8 == $null) {
  63.  
  64.           set %option8 $2-
  65.  
  66.           write option8.txt $2-
  67.  
  68.           goto increase
  69.         }
  70.         if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 != $null && %option6 != $null && %option7 == $null) {
  71.  
  72.           set %option7 $2-
  73.  
  74.           write option7.txt $2-
  75.  
  76.           goto increase
  77.         }
  78.         if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 != $null && %option6 == $null) {
  79.  
  80.           set %option6 $2-
  81.  
  82.           write option6.txt $2-
  83.  
  84.           goto increase
  85.         }
  86.         if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 == $null) {
  87.  
  88.           set %option5 $2-
  89.  
  90.           write option5.txt $2-
  91.  
  92.           goto increase
  93.         }
  94.         if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 == $null) {
  95.  
  96.           set %option4 $2-
  97.  
  98.           write option4.txt $2-
  99.  
  100.           goto increase
  101.         }
  102.         if (%option1 != $null && %option2 != $null && %option3 == $null) {
  103.  
  104.           set %option3 $2-
  105.  
  106.           write option3.txt $2-
  107.  
  108.           goto increase
  109.         }
  110.         if (%option1 != $null && %option2 == $null) {
  111.  
  112.           set %option2 $2-
  113.  
  114.           write option2.txt $2-
  115.  
  116.           goto increase
  117.         }
  118.         if (%option1 == $null) {
  119.  
  120.           set %option1 $2-
  121.  
  122.           write option1.txt $2-
  123.  
  124.           goto increase
  125.         }
  126.       }
  127.       if (%option1 == $2- || %option2 == $2- || %option3 == $2- || %option4 == $2- || %option5 == $2- || %option6 == $2- || %option7 == $2- || %option8 == $2- || %option9 == $2- || %option10 == $2-) {
  128.         :increase      
  129.         if (%option1 == $2-) {
  130.           inc %option1votes
  131.           remove option1votes.txt
  132.           /timer 1 2 /write option1votes.txt %option1votes
  133.         }
  134.         if (%option2 == $2-) {
  135.           inc %option2votes
  136.           remove option2votes.txt
  137.           /timer 1 2 /write option2votes.txt %option2votes
  138.         }
  139.         if (%option3 == $2-) {
  140.           inc %option3votes
  141.           remove option3votes.txt
  142.           /timer 1 2 /write option3votes.txt %option3votes
  143.         }
  144.         if (%option4 == $2-) {
  145.           inc %option4votes
  146.           remove option4votes.txt
  147.           /timer 1 2 /write option4votes.txt %option4votes
  148.         }
  149.         if (%option5 == $2-) {
  150.           inc %option5votes
  151.           remove option5votes.txt
  152.           /timer 1 2 /write option5votes.txt %option5votes
  153.         }
  154.         if (%option6 == $2-) {
  155.           inc %option6votes
  156.           remove option6votes.txt
  157.           /timer 1 2 /write option6votes.txt %option6votes
  158.         }
  159.         if (%option7 == $2-) {
  160.           inc %option7votes
  161.           remove option7votes.txt
  162.           /timer 1 2 /write option7votes.txt %option7votes
  163.         }
  164.         if (%option8 == $2-) {
  165.           inc %option8votes
  166.           remove option8votes.txt
  167.           /timer 1 2 /write option8votes.txt %option8votes
  168.         }
  169.         if (%option9 == $2-) {
  170.           inc %option9votes
  171.           remove option9votes.txt
  172.           /timer 1 2 /write option9votes.txt %option9votes
  173.         }
  174.         if (%option10 == $2-) {
  175.           inc %option10votes
  176.           remove option10votes.txt
  177.           /timer 1 2 /write option10votes.txt %option10votes
  178.         }
  179.       }
  180.     }
  181.   }
  182. }
Add Comment
Please, Sign In to add comment