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

	<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-03-03T02:53:41-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-03-03T02:53:41-04:00</updated>

		<published>2011-03-03T02:53:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96281#p96281</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96281#p96281"/>
		<title type="html"><![CDATA[One game at a time; disabling text triggers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96281#p96281"><![CDATA[
Put the<div class="codebox"><p>Code: </p><pre><code>setudef int game</code></pre></div>line in just one of the files at the top, then in the 'uno' game (defined as 1st game):<div class="codebox"><p>Code: </p><pre><code>proc UnoStart {nick uhost hand chan txt} {# will block the start of the game cos another game is already runningif {![channel get $chan game]} return# no game is started so we start this onechannel set $chan game 1[...]</code></pre></div>as for stop:<div class="codebox"><p>Code: </p><pre><code>proc UnoStop {nick uhost hand chan txt} {# will block the stop of the game cos this game isn't the one that's currently runningif {[channel get $chan game] != 1} return# will stop the game and allow any (including this one) game to be startedchannel set $chan game 0[...]</code></pre></div>At 'trivia' game (defined as 2nd game):<div class="codebox"><p>Code: </p><pre><code>proc TriviaStart {nick uhost hand chan txt} {# will block the start of the game cos another game is already runningif {![channel get $chan game]} return# no game is started so we start this onechannel set $chan game 2[...]</code></pre></div>as for stop:<div class="codebox"><p>Code: </p><pre><code>proc TriviaStop {nick uhost hand chan txt} {# will block the stop of the game cos this game isn't the one that's currently runningif {[channel get $chan game] != 2} return# will stop the game and allow any (including this one) game to be startedchannel set $chan game 0[...]</code></pre></div>Hope it makes more sense now. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Mar 03, 2011 2:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MMushroom]]></name></author>
		<updated>2011-03-02T19:11:37-04:00</updated>

		<published>2011-03-02T19:11:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96276#p96276</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96276#p96276"/>
		<title type="html"><![CDATA[One game at a time; disabling text triggers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96276#p96276"><![CDATA[
Hey caesar, thanks for your quick reply. <br>If I understood it right I have to write "setudef int game" somewhere in the script too? Now, I've tried this with around 3 different trivias, Marky's color uno and Crack the code script, before I gave up. Nothing worked for me and I don't know what I was doing wrong. I searched for the start and stop processes and inserted the code there, but when I started my bot the scripts suddenly stopped working and did not want to start even. Basically they weren't responding to !trivia nor !uno nor !ctc nor any start command. <br><br>I'll copy-paste the part of Marky's color uno script code and please correct me what I am doing wrong. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>(notice: the start proc is after the stop so I've put setudef here)<br><br><div class="codebox"><p>Code: </p><pre><code>## stop a game#setudef int gameproc UnoStop {nick uhost hand chan txt} { global UnoOn UnoPaused UnPlayedRounds UnoStartTimer UnoSkipTimer UnoCycleTimer UnoLastWinner UnoWinsInARow  if {(![uno_ischan $chan])||($UnoOn == 0)} {return}# if the 'trivia' game is the current game running we stop it and allow other games to be started  if {[channel get $UnoChan game] == 1} {  channel set $UnoChan game 0  } catch {killutimer $UnoStartTimer} catch {killtimer $UnoSkipTimer} catch {killutimer $UnoCycleTimer} # remove player dcc list uno_removedccplayers set UnoOn 0 set UnoPaused 0 set UnPlayedRounds 0 set UnoLastWinner "" set UnoWinsInARow 0 UnoUnbindCmds UnoReset unochanmsg "stopped by $nick" return}</code></pre></div>And the start proc:<div class="codebox"><p>Code: </p><pre><code>## first entry#proc UnoInit {nick uhost hand chan txt} { global UnoOn if {(![uno_ischan $chan])||($UnoOn &gt; 0)} {return}# will block the start of the game  if {[channel get $UnoChan game] != 1} return # since no game is active, we let them start this game  if {![channel get $UnoChan game]} {  channel set $UnoChan game 1  } #unochanmsg "$nick\!$uhost" set UnoOn 1 UnoBindCmds UnoNext return}</code></pre></div><br>Desperate call for help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11579">MMushroom</a> — Wed Mar 02, 2011 7:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-03-01T03:12:43-04:00</updated>

		<published>2011-03-01T03:12:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96260#p96260</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96260#p96260"/>
		<title type="html"><![CDATA[One game at a time; disabling text triggers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96260#p96260"><![CDATA[
With a simple 'setudef int game' and define 0 = no game is active, 1 = trivia, 2 = hangman and 3 = uno (or whatever order you wish) you can achieve this goal.<br><br>Get the active running game (if any) with '[channel get #channel game]' you get an integer number representing the current running game (if any).<br><br>Then in trivia for instance, at the '!start' proc add a line like:<div class="codebox"><p>Code: </p><pre><code># will block the start of the gameif {[channel get $chan game] != 1} return# since no game is active, we let them start this gameif {![channel get $chan game]} {channel set $chan game 1}</code></pre></div>and at the '!stop' proc:<div class="codebox"><p>Code: </p><pre><code># if the 'trivia' game is the current game running we stop it and allow other games to be startedif {[channel get $chan game] == 1} {channel set $chan game 0}</code></pre></div>And similar lines added to other games, the only difference is the number defining the game. Be sure to replace '$chan' with the actual variable representing the channel and drop a message if you get stuck or you don't understand anything from what I wrote above. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Mar 01, 2011 3:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MMushroom]]></name></author>
		<updated>2011-02-28T16:52:26-04:00</updated>

		<published>2011-02-28T16:52:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96254#p96254</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96254#p96254"/>
		<title type="html"><![CDATA[One game at a time; disabling text triggers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96254#p96254"><![CDATA[
Hello, <br><br>Sometime ago I had great success running different irc games like Trivia and Uno so I've decided to make it full time uptime by setting up an eggdrop with such scripts. <br>Since our channel is public, lately we had a couple of trolls coming and ruining our fun by triggering multiple games at once - when we played trivia they triggered uno or hangman, etc. <br>It got me so frustrated that I had to revert back to mIrc scripts and only enable single game at a time. <br><br>My request is if it's possible to make a script that would disable triggering the other games while a certain one is played. <br><br>I was thinking about something like this:<br>When bot says the words " Starting the trivia...." it would set a counter. Then when another trigger is typed (!uno) it would do nothing, because a counter is set. Then when bot finishes a game by saying " Stopping the trivia..." the counter is set to 0 and other triggers to start the games can be used again.<br>Is that possible? <br><br>My TCL and MSL scripting knowledge is pretty much null and I failed miserably when I tried to make this script for mIrc at least. <br>Thank you for all your help in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11579">MMushroom</a> — Mon Feb 28, 2011 4:52 pm</p><hr />
]]></content>
	</entry>
	</feed>
