Poll Script v1

By Elite Charizard on Jul 09, 2006

Everything's pretty straightfoward. Just type !poll for the questions and options etc. And then type !answer (option) for sending in your vote. Typing !answer voted will show you the results. You may only vote once per poll.

CREATE YOUR POLL FIRST! Right click on any channel/status or open the commands menu and hover over 'Poll'. You have the options: Clear Poll, which completely makes the poll blank. Create new poll will make a new poll.

;----------------------------------;
; Poll Script - By Elite Charizard ;
;----------------------------------;
on !*:TEXT:!poll:#:{
  msg $chan Current poll: $readini poll.ini questions question
  msg $chan Options: $readini poll.ini questions options
  msg $chan How to vote: Type !answer option.
}

on !*:TEXT:!answer*:#:{
  if $readini poll.ini voted $address($nick,2) == lol {
    msg $chan Sorry, $nick $+ , but you have aldready voted in this poll.
    msg $chan Votes: A: %OptionA - B: %OptionB - C: %OptionC - D: %optionD
  }
  elseif $2- = A || $2- = B || $2- = C || $2- = D {
    inc %Option $+ $2    
    msg $chan Voted for: $2
    msg $chan Votes: A: %OptionA // B: %OptionB // C: %OptionC // D: %OptionD
    writeini poll.ini voted $address($nick,2) lol
  }
  elseif $2 = votes {
    msg $chan Votes: A: %OptionA // B: %OptionB // C: %OptionC // D: %OptionD
  }
  else {
    msg $chan Invalid Option. Valid Options: A B C and D. Please type !poll for question and options. 
    msg $chan Votes: A: %OptionA // B: %OptionB // C: %OptionC // D: %OptionD

  }
}

menu status,channel,menubar {
  .Poll
  ..Clear:{
    if ($$?!="Are you sure you want to clear this poll? This cannot be undone." == $true) {
      /remini poll.ini voted
      /writeini poll.ini questions question No Question Yet
      /writeini poll.ini questions options No Options
    }
  }
  ..Create New:{
    /remini poll.ini voted   
    /writeini poll.ini questions question $$?="Question:"
    /writeini poll.ini questions options A. $$?="Option A:" - B. $$?="Option B:" - C. $$?="Option C:" - D. $$?="Option D:" 
    /set %OptionA 0
    /set %OptionB 0
    /set %OptionC 0
    /set %OptionD 0
  }
}

Comments

Sign in to comment.
bugboy1028   -  Dec 31, 2009

I meant 10

 Respond  
bugboy1028   -  Dec 31, 2009

this script is good, i will give it 5!

 Respond  
Sephiroth1n6   -  Aug 14, 2007

rxt, you have to have mIRC lol :P just google mIRC,then learn about scripting from the help file and ask ask people in mIRC channels or scripting channels. if you do have mIRC all you do is paste in remotes -.-

 Respond  
Elite Charizard   -  Jul 13, 2006

Ok, fixed. Thanks.

 Respond  
Noutrious   -  Jul 13, 2006

I would suggest using $address($nick,2) in poll.ini,voted cause $nick is pretty easy to vote again, just change the nick.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.