Advertisement
intersys

Untitled

Apr 3rd, 2018
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 3.54 KB | None | 0 0
  1. alias StartVote {
  2.   if ($4) && (%Gather.VoteMap !== ON) && (%Gather.Status == OFF) {
  3.     Set %Gather.VoteMap ON
  4.     Set %Gather.Votes 0
  5.     Set %Gather.Maps $3-
  6.     unset %Gather.Vote-Address
  7.     Set %Gather.VoteBy $2
  8.     var %x = 1
  9.     while ($gettok($3-,%x,32)) { .writeini -n Votes.ini $gettok($3-,%x,32) Votes 0 | inc %x }
  10.     if ($readini(Access.ini,$1,Votes)) { .writeini -n Access.ini $1 Votes $calc($readini(Access.ini,$1,Votes) +1) }
  11.     elseif (!$readini(Access.ini,$1,Votes)) { .writeini -n Access.ini $1 Votes 1 }
  12.     mode %Gather.Channel +m-N
  13.     .timer 1 1 notice %Gather.Channel $stl(Votemap has been started by $+ %Gather.Color2 $2)
  14.     .timer 1 1 msg %Gather.Channel $stl(Maps are: $+ %Gather.Color2 $3- %Gather.Color3 $+ %Gather.ColorChr $+ %Gather.Color1 Vote time: $+ %Gather.Color2 $iif(%Gather.Votetime,%Gather.Votetime,60) %Gather.Color1 $+ Seconds.)
  15.     .timer 1 2 msg %Gather.Channel $stl(Commands: $cmd(Vote) < $+ %Gather.Color2 $+ Map $+ %Gather.Color1 $+ > $cmd(Votemap) $cmd(Votes) $cmd(Timeleft))
  16.     .timerENDVOTE 1 $iif(%Gather.Votetime,%Gather.Votetime,60) EndVote
  17.     .timer 1 11 mode %Gather.Channel -m+N
  18.   }
  19. }
  20. alias EndVote { if (%Gather.Votemap == ON) {
  21.     if (%Gather.Votes > 0) {
  22.       .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  23.       while ($ini(Votes.ini,%x)) { echo @Bot $ini(Votes.ini,%x) $calc($readini(Votes.ini,$ini(Votes.ini,%x),Votes) +0) | inc %x }
  24.       filter -cwwteu 2 32 @Bot @Bot | set -u10 %Gather.Flood ON | var %MAP = $gettok($line(@Bot,1),1,32)
  25.       msg %Gather.Channel $stl(The Map $+ %Gather.Color2 %MAP %Gather.Color1 $+ won with $+ %Gather.Color2 $gettok($line(@Bot,1),2,32) $+ %Gather.Color1 $+ / $+ %Gather.Color2 $+  $+ %Gather.Votes %Gather.Color1 $+ Votes) | Set %Gather.Votemap OFF | unset %Gather.Vote-Address | unset %Gather.Votes | unset %Gather.VoteBy | unset %Gather.Maps | .timer 1 1 .remove Votes.ini
  26.     }
  27.     else { msg %Gather.Channel $stl(No votes $+ %Gather.Color2 0 $+ %Gather.Color1 $+ / $+ %Gather.Color2 $+  $+ 0 %Gather.Color1 $+ Votes) | Set %Gather.Votemap OFF | unset %Gather.Vote-Address | unset %Gather.Votes | unset %Gather.VoteBy | unset %Gather.Maps | .timer 1 1 .remove Votes.ini }
  28.   }
  29. }
  30. alias StopVote { if (%Gather.Votemap == ON) { msg %Gather.Channel $stl(Votemap was stopped by $+ %Gather.Color2 $iif($1,$1,No such user.)) | Set %Gather.Votemap OFF | .timerENDVOTE OFF | unset %Gather.Vote-Address | unset %Gather.Votes | unset %Gather.VoteBy | unset %Gather.Maps | .remove Votes.ini } }
  31. alias Votes { msg %Gather.Channel $stl(%Gather.Color2 $+  $+ %Gather.Votes %Gather.Color1 $+ Votes so far.) }
  32. alias VoteMap {
  33.   if (%Gather.VoteMap == ON) { msg %Gather.Channel $stl(Votemap is $+ %Gather.Color2 ON $+ %Gather.Color3 %Gather.ColorChr %Gather.Color1 $+ By: $+ %Gather.Color2 %Gather.VoteBy %Gather.Color3 $+ %Gather.ColorChr %Gather.Color1 $+ Maps: $+ %Gather.Color2 %Gather.Maps) }
  34.   else { msg %Gather.Channel $stl(Votemap is $+ %Gather.Color2 OFF.) }
  35. }
  36. alias AddVoter {
  37.   if (!$Istok(%Gather.Vote-Address,$1,32)) && ($istok(%Gather.Maps,$2,32)) {
  38.     Set %Gather.Vote-Address $addtok(%Gather.Vote-Address,$1,32)
  39.     inc %Gather.Votes | .writeini -n Votes.ini $2 Votes $calc($readini(Votes.ini,$2,Votes) +1)
  40.     if (!%Gather.Flood) { Set -u2 %Gather.Flood ON | notice $3 $stl($3 Thanx for your vote.) }
  41.   }
  42. }
  43.  
  44. ;;on text;;;
  45. if ($1 == %Gather.Sign $+ Vote) && ($2) {
  46.   if (%Gather.Votemap !== on) && (!%Gather.Flood) { Set -u5 %Gather.Flood ON | VoteMap }
  47.   elseif (%Gather.Votemap == on) && (!$istok(%Gather.Vote-Address,$address,32)) && ($istok(%Gather.Maps,$2,32)) { AddVoter $address $2 $nick }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement