 Copyright 2001, Daltech Software
-> http://server45.hypermart.net/dal-s/
-> Thank you for downloading from Dalnet Software!
---------
Please don't steel any of our scripts - otherwise, we will have to
shut down the mIRC Version of our website and ruin the entertainment
and privaledges from anyone using these scripts.

It is ok to change and/or reproduce this file, but please give the
Daltech website some credit.
- Thanks.
Dustin_Cox@hotmail.com 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
menu channel {
  -
  Vote
  .Start vote:/vote
  .Send results to channel:/result
}
alias vote {
  /set %kerdes $?="Please Specify The Question:"
  /set %chan $?="Please Specify Channel To Run Vote On:"
  /set %vote on
  /set %igen 0
  /set %nem 0
  /msg %chan Let's vote! The question is: 
  /msg %chan 4 %kerdes
  /msg %chan Answer with !yes or !no
  /msg %chan You have 2 minutes to place your answer!
  /timer1 1 60 /msg %chan You have one minute to vote! The question is:4 %kerdes
  /timer2 1 90 /msg %chan There's only a half minute to vote. The question is:4 %kerdes
  /timer3 1 120 /msg %chan ------ 4STOP 1------
  /timer4 1 120 /set %vote off
  /timer6 1 120 /rlevel 5
}  
alias result {
  /msg %chan There were %igen that said yes, and %nem that said no.
  /msg %chan The answer is: $calc(%igen * 100 / (%igen + %nem)) $+ /PERCENT YES, and $calc(%nem * 100 / (%igen + %nem)) $+ /PERCENT NO. 
}
on +1:text:!yes:%chan:{
  if (%vote == off) halt
  else { /set %igen %igen + 1 
    /notice $nick Your answer is accepted! (yes) There are %igen yes answers...
    /guser 5 $nick 2
  }

on +1:text:!no:%chan:{
  if (%vote == off) halt
  else { /set %nem %nem + 1 
    /notice $nick Your answer is accepted! (no) There are %nem no answers...
    /guser 5 $nick 2
  }