Top

!poll / !vote script


mIRC Code
+ 0 likes
Please Register to submit score.
Average Score  6.0
Scores Submitted  1
Date Added  Oct 08, 2007
Last Updated  Oct 12, 2007
Tags  poll  vote 
  Bookmark and Share

Introduction

This is a poll script where you can set a poll as anything and vote for anything. To use just put in the remotes section (Alt+R) of your bot.

To activate a poll use:
!poll Does frish rox?
To vote use:
!vote <something here>
so you could use:
!Vote yes
!Vote no (but ya wont wanna for this question :P)
!Vote pie tastes good
or whatever you want to vote for.

The poll lasts 45 seconds and shows the top answers at the end, enjoy :)

Updates:
*Ops can now stop the poll using !pollhalt

note: There can only be 1 poll at a time and only in one channel

Grab the Code

Comments

  (16)  RSS
koutrelakosn
Comments: 8
 
mIRC Snippet:  !poll / !vote script
Posted on Oct 10, 2007 10:18 pm
How do u end the poll i ended but i cant start a new one y is that and how i start new one.
FRISH
Comments: 63
 
mIRC Snippet:  !poll / !vote script
Posted on Oct 11, 2007 11:07 am
if ya stop the poll then ya must type:
Code:
//unset %voteoptions | unset %nforoptions | unset %votenicks | unset %pollison | unset %pollchannel

then it will work again ;)
koutrelakosn
Comments: 8
 
mIRC Snippet:  !poll / !vote script
Posted on Oct 11, 2007 7:12 pm
ok afte the poll is o what i type and can u just edit ur script so u just gotta type !endpoll or in mirc type /newpoll or something plz
FRISH
Comments: 63
 
mIRC Snippet:  !poll / !vote script
Posted on Oct 12, 2007 8:30 am
Ok just updated the code for ya ;)
usage: !pollhalt (must be op)
Tippy
Comments: 28
 
mIRC Snippet:  !poll / !vote script
Posted on Oct 14, 2007 9:16 am
Frish...you should probley make it a dailog. Other wise good job
FRISH
Comments: 63
 
mIRC Snippet:  !poll / !vote script
Posted on Oct 14, 2007 4:10 pm
ty, and why make it a dialog? Theres no need is there? =/
RoTeX
Comments: 2
 
mIRC Snippet:  !poll / !vote script
Posted on Jul 1, 2008 1:52 pm
* Invalid format: $addtok (line 5, poll.mrc)
var %pollresults $addtok(%pollresults,11[ 12 $+ $gettok(%voteoptions,%toknum,9) $+ : $gettok(%nforoptions,%toknum,44) 11],0)

Why?
vaseline28
Comments: 154
 
mIRC Snippet:  !poll / !vote script
Posted on Jul 1, 2008 2:15 pm
$addtok has a format of:
$addtok(TextToAddTo,TextBeingAdded,Position,AsciiChar)
In the script above, it looks like there is only:
$addtok(TextToAddTo,TextBeingAdded,Position)
try:
Quote:
$addtok(%pollresults,[ $+ $gettok(%voteoptions,%toknum,9) $+ $gettok(%nforoptions,%toknum,44) ],0,32)
Eugenio
Comments: 1,112
 
mIRC Snippet:  !poll / !vote script
Posted on Jul 1, 2008 2:58 pm
erm atm this script FAILZ one sec and I will post what I get.

{{<<< No such nick/channel
-
{{<<< No such nick/channel
-
{{<<< No such nick/channel
-
{{<<< No such nick/channel
-
{{<<< No such nick/channel
-
RESULTPOLLCODE Unknown command

erm and what is the point in /pollcode or w/e it is ?!?
FRISHY
Comments: 6
 
mIRC Snippet:  !poll / !vote script
Posted on Jul 1, 2008 3:50 pm
my old email doesnt work so made a new account since forgot password lol and i dont go on mirc anymore.

Quote:

$addtok has a format of:
$addtok(TextToAddTo,TextBeingAdded,Position,AsciiChar)
In the script above, it looks like there is only:
$addtok(TextToAddTo,TextBeingAdded,Position)
try:
Quote:
$addtok(%pollresults,[ $+ $gettok(%voteoptions,%toknum,9) $+ $gettok(%nforoptions,%toknum,44) ],0,32)


from what i remember (may be wrong) the last parameter is optional so if you leave the last one out then there is a null being added between each token so combines the strings.

Anyway the script was fine when i used to use it and im sure it didnt have any errors.

eugenio did u type !poll when u had the script yourself, if so then thats ur problem this script is used for a bot but can easily be changed to on input.

Quote:

RESULTPOLLCODE Unknown command

erm and what is the point in /pollcode or w/e it is ?!?


/resultpollcode is a subroutine because im lazy and no point since i quit mirc ;p i can only assube that its an alias to neaten the coding, to save code repetition (possibly coz mine used to have an on input too)
Eugenio
Comments: 1,112
 
mIRC Snippet:  !poll / !vote script
Posted on Jul 1, 2008 4:02 pm
ffs I might be n00b but im not THAT n00b, bloody hell YES I tested seperatly not me typng !poll -.-'
and just what is the point in /resultpollcode..........it doesnt do anything cept gimme that msg in my status window which I showed ^^^^^^
FRISHY
Comments: 6
 
mIRC Snippet:  !poll / !vote script
Posted on Jul 1, 2008 4:57 pm
on *:text:*:#:{
if ($1 == !poll) {
...
set -e %pollchannel #
...
}

alias resultpollcode {
...
msg %pollchannel 12{{<<< Results: %pollresults 12>>>}}
...

so by seeing this it msgs the channel the result. since its not working for you i would probably say you are talking to a bot using this script not in a channel. if you did this in a channel and not chat then im sorry but i cant help since its been like a year since i quit.
Eugenio
Comments: 1,112
 
mIRC Snippet:  !poll / !vote script
Posted on Jul 1, 2008 5:39 pm
erm well I understand the code jaysus....what im saying is that the bloody alias dont work for me.........gtf back on mIRC and test -.-'
FRISHY
Comments: 6
 
mIRC Snippet:  !poll / !vote script
Posted on Jul 1, 2008 5:53 pm
rofl. im gonna presume ur joking.

i only came back today just to look how thing changed, im not gonna reinstall mirc and spend my time on finding out why ur script doesnt work.

if you have other scripts in your remotes that possibly could affect it, but seriously i cannot help any further, my mirc scripting days are well over.

you have 3 options
#1 try putting the code in a blank remotes section to see if it works then
#2 adjust the code to see if you can fix it for your mirc
#3 give up on the snippet

Another possibility is that they updated mirc in which my script no longer works. IDK why that would happen if it did (probably not, who knows) but this is the only help i can give ;p, i mean the code is too complex for me to be revising over (and im lazy ;p)
Eugenio
Comments: 1,112
 
mIRC Snippet:  !poll / !vote script
Posted on Jul 2, 2008 12:02 am
ROFL
RoTeX
Comments: 2
 
mIRC Snippet:  !poll / !vote script
Posted on Jul 5, 2008 6:33 pm
How do i remake it so it post the top 3 answers and not only the top voted?

Please Register or Login to start posting comments.
Bottom