<?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/18571" />

	<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>2011-08-07T18:54:40-04:00</updated>

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

		<entry>
		<author><name><![CDATA[janii]]></name></author>
		<updated>2011-08-04T11:25:26-04:00</updated>

		<published>2011-08-04T11:25:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97322#p97322</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97322#p97322"/>
		<title type="html"><![CDATA[I need help with my personalise tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97322#p97322"><![CDATA[
Thank you very much SpeechLess its working perfectly u people are great help <br>M just SpeechLess like ur account name ur Great i worked on it for almost 3 months and wasnt able to get it workin m nt tht gud at tcls but m tryin:)<br>once again thank you very much....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11746">janii</a> — Thu Aug 04, 2011 11:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2011-08-04T09:00:58-04:00</updated>

		<published>2011-08-04T09:00:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97321#p97321</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97321#p97321"/>
		<title type="html"><![CDATA[I need help with my personalise tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97321#p97321"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>tggamemsg "[tgcolhint] $tghintnum/$tgmaxhintcurrent:[tgcolmisc2] [join $_hint]" </code></pre></div>Change that above, to look like it does below:<br><div class="codebox"><p>Code: </p><pre><code>tggamemsg "[tgcolhint] [expr {$tghintnum + 1}]/[expr {$tgmaxhintcurrent + 1}]:[tgcolmisc2] [join $_hint]" </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Aug 04, 2011 9:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[janii]]></name></author>
		<updated>2011-08-07T18:54:40-04:00</updated>

		<published>2011-08-03T08:31:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97315#p97315</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97315#p97315"/>
		<title type="html"><![CDATA[I need help with my personalise tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97315#p97315"><![CDATA[
Hello i ve changed trivia.tcl by souperman to sum extend but having trouble in the showin manner of hint system like it starts frm 0 and i want it to start from 1/5 .. instead its giving 0/4<br>Thanks in advance<br><br>&lt;Trivia&gt;  General knowledge,  Which is the largest democracy? »» 8474 ««<br>&lt;Trivia&gt;  0/4: *****<br>&lt;Trivia&gt;  1/4: I****<br>&lt;Trivia&gt;  2/4: I***a<br>&lt;Trivia&gt;  3/4: I**ia<br>&lt;Trivia&gt;  4/4: In*ia<br>&lt;Trivia&gt; Am I alone here or what? The correct answer was India. Try and get the next one...<br><br>WANT IT TO BE LIKE THIS<br><br>&lt;Trivia&gt;  General knowledge,  Which is the largest democracy? »» 8474 ««<br>&lt;Trivia&gt;  1/5: *****<br>&lt;Trivia&gt;  2/5: I****<br>&lt;Trivia&gt;  3/5: I***a<br>&lt;Trivia&gt;  4/5: I**ia<br>&lt;Trivia&gt;  5/5: In*ia<br>&lt;Trivia&gt; Am I alone here or what? The correct answer was India. Try and get the next one...<br>Below is the code...<br><br>#shows timed hints.<br>proc tghint {} {<br>global tgmaxhint tghintnum tgcurrentanswer tghinttimer tgchan botnick tgrose1 tgrose2<br>global tgtimehint tghintchar tgquestionnumber tgquestionstotal<br>global tgcurrentquestion tghintcharsused tgnextqtimer tgtimenext tgstreak tgstreakmin<br>global tgnobodygotit tgtrythenextone tgmissed tgmaxmissed tgcmdstart tgshowanswer<br>global tgtimestart tgtimeanswer tgalwaysshowq tgmaxhintcurrent tgtempnohint tgcapshint<br>if {![info exists tghintnum]} { <br>      set tghintnum 0 <br>      regsub -all -- "\[^A-Za-z0-9\]" $tgcurrentanswer "" _hintchars <br>      set tgmaxhintcurrent [expr [strlen $_hintchars]&lt;=$tgmaxhint?[expr [strlen $_hintchars]-1]:$tgmaxhint] <br>      catch {tgunbindhintcmd} <br>      if {$tgmaxhintcurrent&gt;0} { <br>         set tgrebindhinttimer [utimer $tgtempnohint tgbindhintcmd] <br>      }<br>   } else { incr tghintnum }<br>if {$tghintnum &gt;= [expr $tgmaxhintcurrent+1]} {<br>incr tgmissed<br>set _msg ""<br>append _msg "[tgcolmiss][lindex $tgnobodygotit [rand [llength $tgnobodygotit]]]"<br>if {$tgshowanswer==1} {<br>append _msg " 6The correct answer was6 [tgcolmisc2]$tgcurrentanswer[tgcolmiss]."<br>}<br>if {$tgmaxmissed&gt;0&amp;&amp;$tgmissed&gt;=$tgmaxmissed} {<br>append _msg " \0034This was $tgmissed-a Unanswered question! Due to inactivity, the game was stopped automatically. \002To restart the game after screaming $botnick!!!\0034\002"<br>if {$::team(topic_change)} { utimer 20 [putserv "TOPIC $tgchan :$::offmode"] }<br>tgquietstop<br>} else {<br>append _msg " [lindex $tgtrythenextone [rand [llength $tgtrythenextone]]]"<br>}<br>tggamemsg "[tgcolmiss]$_msg"<br>if {$tgstreakmin&gt;0&amp;&amp;[lindex [split $tgstreak ,] 1]&gt;=$tgstreakmin} { tgstreakend }<br>set tgstreak 0<br>catch {unbind pubm -|- "$tgchan *" tgcheckanswer}<br>if {$tgmaxmissed==0||$tgmissed&lt;$tgmaxmissed} {<br>set tgnextqtimer [utimer $tgtimenext tgnextq]<br>}<br>return<br>} elseif {$tghintnum == 0} {<br>set i 0<br>set _hint {}<br>set tghintcharsused {}<br>foreach word [split $tgcurrentanswer] {<br>regsub -all -- "\[A-Za-z0-9\]" $word $tghintchar _current<br>lappend _hint $_current<br>}<br>if {$tgtimeanswer==1} {<br>set tgtimestart [clock clicks -milliseconds]<br>}<br>} elseif {$tghintnum == 1} {<br>set i 0<br>set _hint {}<br>while {$i&lt;[llength [split $tgcurrentanswer]]} {<br>set _word [lindex [split $tgcurrentanswer] $i]<br>set j 0<br>set _newword {}<br>while {$j&lt;[strlen $_word]} {<br>if {$j==0} {<br>append _newword [stridx $_word $j]<br>lappend tghintcharsused $i,$j<br>} else {<br>if {[string is alnum [stridx $_word $j]]} {<br>append _newword "$tghintchar"<br>} else {<br>append _newword [stridx $_word $j]<br>lappend tghintcharsused $i,$j<br>}<br>}<br>incr j<br>}<br>lappend _hint $_newword<br>incr i<br>}<br>} else {<br>set i 0<br>set _hint {}<br>while {$i&lt;[llength [split $tgcurrentanswer]]} {<br>set _word [lindex [split $tgcurrentanswer] $i]<br>set j 0<br>set _newword {}<br>set _selected [rand [strlen $_word]]<br>regsub -all -- "\[^A-Za-z0-9\]" $_word "" _wordalnum<br>if {[strlen $_wordalnum]&gt;=$tghintnum} {<br>while {[lsearch $tghintcharsused $i,$_selected]!=-1||[string is alnum [stridx $_word $_selected]]==0} {<br> set _selected [rand [strlen $_word]]<br>}<br>}<br>lappend tghintcharsused $i,$_selected<br>while {$j&lt;[strlen $_word]} {<br>if {[lsearch $tghintcharsused $i,$j]!=-1||[string is alnum [stridx $_word $j]]==0} {<br>append _newword [stridx $_word $j]<br>} else {<br>if {[string is alnum [stridx $_word $j]]} {<br>append _newword $tghintchar<br>}<br>}<br>incr j<br>}<br>lappend _hint $_newword<br>incr i<br>}<br>}<br>if {$tgcapshint==1} {<br>set _hint [strupr $_hint]<br>}<br>#tggamemsg ""<br>if {$tgalwaysshowq==1||$tghintnum==0} {<br>tggamemsg ""<br>tggamemsg "[tgcolqbody]$::hbonus[tgcolqbody] $tgcurrentquestion 4»» [expr $tgquestionnumber+1] 4««"<br><br>}<br># [expr $tghintnum?"":""]<br>tggamemsg "[tgcolhint] $tghintnum/$tgmaxhintcurrent:[tgcolmisc2] [join $_hint]"<br>set tghinttimer [utimer $tgtimehint tghint]<br>}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11746">janii</a> — Wed Aug 03, 2011 8:31 am</p><hr />
]]></content>
	</entry>
	</feed>
