<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/5603" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2003-09-16T15:21:35-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/5603</id>

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-09-16T15:21:35-04:00</updated>

		<published>2003-09-16T15:21:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=27169#p27169</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=27169#p27169"/>
		<title type="html"><![CDATA[quiz script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=27169#p27169"><![CDATA[
hello i'm coding a sux script for *private* use.<br>This is the code:<blockquote class="uncited"><div>### EQuiz v1.5<br>### Written by Progeny &lt;<a href="mailto:progeny@bitchx.it">progeny@bitchx.it</a>&gt;<br>### irc.azzurra.org - #EggHelp<br><br>package require http<br><br>bind pub o|o !qload quiz:download<br>bind pub o|o !qstart quiz:start<br>bind pub o|o !qstop quiz:stop<br><br>#set rank ""<br>#set qchan ""<br>#set vbind ""<br>#set argomento ""<br>#set domanda ""<br>#set risposta ""<br>#set aiuto ""<br><br>set cask 0<br>set asks 0<br><br>proc quiz:download {nick uhost handle channel text} {<br>http::getfile $text quiz.dat<br>putserv "PRIVMSG $channel :Data file downloaded in ~/quiz.dat ([file size quiz.dat] bytes).<br>}<br><br>proc quiz:start {nick uhost handle channel text} {<br>global asks qchan<br><br>if {[string match "*c*" [getchanmode $channel]]} {<br>putserv "PRIVMSG $channel :Please remove +c from channel's mode. Then restart quiz."<br>return<br>} else {<br>putserv "PRIVMSG $channel :EQuiz is starting.."<br>}<br><br>set fd [open quiz.dat r]<br>set c 0<br>while {[gets $fd buffer] &gt; 0} {<br>incr c<br>}<br>set asks $c<br>putserv "PRIVMSG $channel :Loaded $c asks."<br>quiz:send $channel<br>set $qchan $channel<br>}<br><br>proc quiz:stop {nick uhost handle channel text} {<br>foreach qtimer [utimers] {<br>if {([string match "*quiz:losstime*" $qtimer]) || ([string match "*quiz:sendhelp*" $qtimer]) } { killutimer [lindex $qtimer end] }<br>}<br>putserv "PRIVMSG $channel :EQuiz stopped.."<br>}<br><br>proc quiz:sendhelp {channel} {<br>global aiuto<br>putserv "PRIVMSG $channel :12Aiuto: $aiuto"<br>}<br><br>proc quiz:winner {channel} {<br>global cask asks rank<br>if {$cask == $asks} {<br>putserv "PRIVMSG $channel :12Quiz terminato!"<br>}<br>}<br><br>proc quiz:losstime {channel} {<br>putserv "PRIVMSG $channel :12Tempo scaduto!"<br>quiz:send $channel<br>}<br><br>proc quiz:send {channel} {<br>global cask asks argomento domanda risposta aiuto vbind<br>set fd [open quiz.dat r]<br>set c 0<br>while {[gets $fd buffer] &gt; 0} {<br>if {$c == $cask} {<br>set argomento [lindex [split $buffer "-"] 0]<br>set domanda [lindex [split $buffer "-"] 1]<br>set risposta [string trim [lindex [split $buffer "-"] 2] " "]<br>set aiuto [lindex [split $buffer "-"] 3]<br>set vbind "$channel *$risposta*"<br>bind pubm - "$channel *$risposta*" quiz:msg<br>putserv "PRIVMSG $channel :0,12Argomento: $argomento"<br>putserv "PRIVMSG $channel :12($cask/$asks): $domanda"<br>set tid [utimer 60 "quiz:losstime $channel"]<br>set hid [utimer 30 "quiz:sendhelp $channel"]<br>}<br>incr c<br>}<br>close $fd<br>incr cask<br>}<br><br>proc quiz:highscore:addpoint {nick} {<br>global rank<br><br><br>putserv "PRIVMSG #staff-netparty :Rank appears to be: $rank"<br>putserv "PRIVMSG #staff-netparty :remember, you have to sort the rank!"<br>}<br><br>proc quiz:highscore:print {channel} {<br>global rank<br>putserv "PRIVMSG $channel :..: : HigScores : :.."<br>putserv "PRIVMSG $channel :1)"<br>putserv "PRIVMSG $channel :2)"<br>putserv "PRIVMSG $channel :3)"<br>putserv "PRIVMSG $channel :4)"<br>putserv "PRIVMSG $channel :5)"<br>}<br><br>proc quiz:msg {nick uhost handle channel text} {<br>global vbind<br>unbind pubm - $vbind quiz:msg<br>foreach qtimer [utimers] {<br>if {([string match "*quiz:losstime*" $qtimer]) || ([string match "*quiz:sendhelp*" $qtimer]) } { killutimer [lindex $qtimer end] }<br>}<br>putserv "PRIVMSG $channel :12Risposta esatta! ($nick)"<br>quiz:highscore:addpoint $nick<br>quiz:send $channel<br>}</div></blockquote>I don't know how manage gamer's points. Shall i use a list? or a file? How can I sort the rank? If I'm using a file how can I delete entries?<br>Can somebody help me with a code to add in the script?<br><br>Have a good time.<p>Statistics: Posted by Guest — Tue Sep 16, 2003 3:21 pm</p><hr />
]]></content>
	</entry>
	</feed>
