Deprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/vonderlippe.dk/public_html/includes/bbcodes/url_bbcode_include.php on line 21
Dette er et simpelt afstemnings script, som du kan bruge på din channel hvis du vil lave en afstemning for dine idlere/venner.
Du smider bare scriptet ind i din Scripts-editor/remote, og så skriver du !votehelp, også kommer de muligheder frem som du kan bruge. (kan bruges af alle på channelen, så der kommer lige en update, når jeg har fundet ud af det så det kun er OPs som kan lave afstemningerne)
PS. husk at rette #clan-brb.dk til dit channel navn.
Kodeon *:text:!voteon*:#clan-brb.dk: {
if (%vote) { kte_echo -a there is already a vote in progress! | return }
if (!$server) { kte_echo -a not connected! | return }
if ($active == Status Window) { kte_echo -a not in status window! | return }
set %votechan #
set %vote $mid($1-,9,$len($1-) - 9)
if (!%vote) { halt }
else {
set %yes 0
set %no 0
set %dunno 0
set %voteby $nick
msg %votechan ----------------------------
msg %votechan 8,4Q: $+ %vote $+
msg %votechan Time to VOTE!
msg %votechan (vote with !yes and !no and !dunno)
msg %votechan ----------------------------
set %voting til
}
}
on *:text:!voteoff:#: {
if ($nick != %voteby) { msg %votechan You don't have a permission to stop this vote. It could be done by 8,1 %voteby only! | return }
msg %votechan ----------------------------
msg %votechan Vote is OVER!
msg %votechan 8,4Q: $+ %vote $+
msg %votechan Results: YES-> %yes ( $+ $calc(%yes / $calc(%yes + %no + %dunno) * 100) $+ % $+ ) .. NO-> %no ( $+ $calc(%no / $calc(%yes + %no + %dunno) * 100) $+ % $+ ) .. DUNNO-> %dunno ( $+ $calc(%dunno / $calc(%yes + %no + %dunno) * 100) $+ % $+ )
msg %votechan Voters: $iif(%voters,%voters,N/A)
if (!%no && !%yes && !%dunno) { msg %votechan 8,1FINAL RESULT: no one voted... }
elseif (%no < %dunno && %yes < %dunno) { msg %votechan 8,1FINAL RESULT: DunNO! }
elseif (%no == %yes) { msg %votechan 8,1FINAL RESULT: Draw! }
elseif (%no > %yes) { msg %votechan 8,1FINAL RESULT: No! }
elseif (%no < %yes) { msg %votechan 8,1FINAL RESULT: Yes! }
msg %votechan ----------------------------
unset %vote* %yes %no %dunno
}
on *:text:!yes:#: {
if (# == %votechan) && (%voting == til) {
if ($nick isin %voters) { return }
set %voters %voters $nick (yes)
/notice $nick Thx for the vote $+ !
inc %yes 1
}
}
on *:text:!no:#: {
if (# == %votechan) && (%voting == til) {
if ($nick isin %voters) { return }
set %voters %voters $nick (no)
/notice $nick Thx for the vote $+ !
inc %no 1
}
}
on *:text:!dunno:#: {
if (# == %votechan) && (%voting == til) {
if ($nick isin %voters) { return }
set %voters %voters $nick (dunno)
/notice $nick Thx for the vote $+ !
inc %dunno 1
}
}
on *:text:!votehelp:#: {
/notice $nick ----------------------------
/notice $nick $+ 2HELP SYSTEM for VoteSYS Script v1.0 by f0xn3t ;) $+
/notice $nick - To start voting use !voteon <Question> trigger
/notice $nick - To stop voting use !voteoff trigger ... NOTE: It could be done only by a user who began voting!
/notice $nick - During voting you can use these triggers to vote: !no (for NO), !yes (for YES), !dunno (if you don't know)
/notice $nick ----------------------------
|