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

	<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>2006-09-11T19:07:22-04:00</updated>

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

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-09-11T19:07:22-04:00</updated>

		<published>2006-09-11T19:07:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66263#p66263</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66263#p66263"/>
		<title type="html"><![CDATA[Tournament help please??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66263#p66263"><![CDATA[
When you learn how to indent your code, I'll think about actually reading it to help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Mon Sep 11, 2006 7:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[monie089]]></name></author>
		<updated>2006-09-10T14:50:37-04:00</updated>

		<published>2006-09-10T14:50:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66241#p66241</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66241#p66241"/>
		<title type="html"><![CDATA[Tournament help please??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66241#p66241"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>##########Binds #########bind pub - @Tournament Tourneycmd ;#donebind pub - @Tversion Tourneyversion ;#donebind pub - @tinfo Tourneyinfo ;#donebind pub - @join Tourneyjoin  bind pub n @tupdate Tourney_writeCFG ;#donebind pub - @find find:nick ;#donebind pub - @add pub:add ;#donebind pub n|o @start Tourneyinitbind pub n|o @end Tourneyendbind pub - @request Tourneyrequestbind pub - @terror Tourneyerrorbind pub n @noticeon Tourneynoticeon ;#donebind pub n @noticeoff Tourneynoticeoff ;#donebind pub n @topicon Tourneytopiconbind pub n @topicoff Tourneytopicoffbind msg - won Tourneywonbind msg - tie Tourneytiebind msg - lose Tourneylose##Unbinding commands##proc Tourneyunbindcmd {} {catch {unbind pub - @join Tourneyjoin}catch {unbind pub - win Tourneywon}catch {unbind pub - tie Tourneytie}catch {unbind pub - lose Tourneylose}}##The Tournament Menu###proc Tourneycmd {nick uhost hand chan text} {global Tourneychan cmd1 cmd2 cmd3 cmd4 cmd5 cmd6 cmd7 cmd8 cmd10 cmd11 cmd12 cmd13puthelp "NOTICE $nick :$cmd1"puthelp "NOTICE $nick :$cmd2"puthelp "NOTICE $nick :$cmd3"puthelp "NOTICE $nick :$cmd4"puthelp "NOTICE $nick :$cmd5"puthelp "NOTICE $nick :$cmd6"if {[isop $nick $Tourneychan]} {puthelp "NOTICE $nick :$cmd7"}if {[isop $nick $Tourneychan]} {puthelp "NOTICE $nick :$cmd8"}puthelp "NOTICE $nick :$cmd10"puthelp "NOTICE $nick :$cmd11"puthelp "NOTICE $nick :$cmd12"puthelp "NOTICE $nick :$cmd13"return}##The Joining Info##bind join - "% *" join:fooproc join:foo {nick uhost hand chan} {global Tourneynotice Tourneychan Tourneybot Tourneyonset _msg ""if {$Tourneynotice == 1} {putquick "NOTICE $nick :Welcome to $chan im $Tourneybot Tournament status is currently:"if {$Tourneyon == 1} { putquick "NOTICE $nick :\002On\002"} else { putquick "NOTICE $nick :\002Off\002" }}if {$Tourneynotice == 0} {return}}##Adding the Settings to the config##proc Tourney_writeCFG {nick uhost hand chan text} {global Tourneychan Tourneycmdchar Tourneybot Tourneyfile Tourneyversion gamefile TourneyCFGfileset f [open $TourneyCFGfile w]puts $f "#The MLB Tournament Config file"puts $f "Tournament Channel=$Tourneychan"puts $f "Tournament Char=$Tourneycmdchar"puts $f "Tournament Bot name=$Tourneybot"puts $f "Game File dir=$gamefile"puts $f "Tourney File dir=$Tourneyfile"puts $f "Tourney Version=$Tourneyversion"close $fputquick "PRIVMSG $Tourneychan :\002Notice:\002 The Tournament Script is currently updating please wait until its done"puthelp "PRIVMSG $Tourneychan :Done updating."return}##Showing the Tournament Version##proc Tourneyversion {nick uhost hand chan text} {global Tourneybot Tourneychan Tourneyversion Townerputhelp "NOTICE $nick :$Tourneybot current Tournament version is $Tourneyversion for $Tourneychan by $Towner"}######Default Settings######set Tourneynotice 0set Tourneytopic 0set Tourneyon 0set TourneyIDX ""set Towner "Monie"set Trounduser ""set Tourneychan "#NintendoXG"set Tourneybot "MLB"set Tourneycmdchar "@"set gamefile "wifi/game.txt"set Tourneyfile "wifi/tourney.txt"set Tourneyversion "0.1.2"set TourneyCFGfile "wifi/TourneyCGF.cgf"set cmd1 "\002Tournament commands for #NintendoXG are\002"set cmd2 "\0031@Tournament - Lets you see these Tourney options"set cmd3 "\0031@tinfo - Lets you see the current tournament status\0031"set cmd4 "\0031@find &amp;&amp; @add -Lets you either find a nicks code or add your code to the tourey system\0031"set cmd5 "\0031@request -You can send an Tournament request ,Then you can see that either an op will make it or the bot\0031"set cmd6 "\0031@terror - You may send Problems that your having with the tournament by typing that or msg monie straight up\0031"set cmd7 "\002Notice:\002 Ops have the following commands,also regular users cant see this"set cmd8 "\0031@start -Ops can start the Tournament for any game\0031 \0031@end -Ops can end any tounament thats currently happening,but if its Monie the bot will not let you\0031"set cmd10 "\0031To tell when you have won or lost or have a tie please type\0031"set cmd11 "\0031/msg MLB won - Lets MLB know that you won\0031"set cmd12 "\0031/msg MLB lose - Lets MLB know that you lose\0031"set cmd13 "\0031/msg MLB tie -Lets MLB know that you had a tie\0031"set Unplayedrounds 0#####Global variables########set Tourneymode 0set Tourneyplayers 0set Tourneyplayers 0set Tourneystarttime [unixtime]set Tourneyon 0set Tourneystart 25set Tourneycycletimer 25set Tourneycycletime 30set Tourneystopafter 5set Tourneymax 4set Tourneymode 0###Scores and Adsset Tourneywon "Nobody 0"set Tourneyad 0##File Checking##if {![file exist $Tourneyfile]} {catch {close [open $Tourneyfile w]}}if {![file exists $gamefile]} {   catch {close [open $gamefile w]}}if {![file exist $TourneyCFGfile]} {catch {close [open $TourneyCFGfile w]}}##Friendcodes section###proc pub:add {nick uhost hand chan arg} {   foreach {game code} [split $arg] {break}  if {![string length $game] || ![string length $code]} {      putserv "PRIVMSG $nick :Usage: @add &lt;game&gt; &lt;code&gt;"; return   } set list [split [read [set fd [open $::gamefile r]]] \n]; close $fd  if {![llength [lindex $list end]]} {      set list [lreplace $list end end]   }   lappend list [list [md5 [string tolower $nick]] $game $code]   puts -nonewline [set fd [open $::gamefile w]] [join $list \n]; close $fd   putserv "NOTICE $nick :Code added"}proc find:nick {nick uhost hand chan arg} {   set name [lindex [split $arg] 0]   if {![string length $name]} {      putserv "NOTICE $nick :Usage: @find &lt;nick&gt;"; return   }   set list [split [read [set fd [open $::gamefile r]]] \n]; close $fd  if {![llength [set matches [lsearch -all -inline -glob $list [md5 [string tolower $name]]*]]]} {      putserv "NOTICE $nick :Name not found."; return   }  foreach match $matches {     foreach {x game code} $match {}      putserv "NOTICE $nick :$name's code for $game is $code."   }  }##Enabling and Disabling##proc Tourneynoticeon {nick uhost hand chan text} {global Tourneychan Tourneynotice Tourneybotif {$Tourneynotice == 1} {puthelp "PRIVMSG $Tourneychan :\002Notice:\002 Tournament Notice is already enabled"}if {$Tourneynotice == 0} { set Tourneynotice 1puthelp "PRIVMSG $Tourneychan :\002Notice:\002 Tournament Notice is Now enabled"}}proc Tourneynoticeoff {nick uhost hand chan text} {global Tourneychan Tourneynotice Tourneybotif {$Tourneynotice == 0} {puthelp "PRIVMSG $Tourneychan :\002Notice:\002 Tournament Notice is already disabled"}if {$Tourneynotice == 1} {set Tourneynotice 0 puthelp "PRIVMSG $Tourneychan :\002Notice:\002 Tournament Notice is now disabled"}}##The Matching and Challenge part###proc Tourneyinit {nick uhost hand chan text} {global Tourneychan Tourneybot Trounduser Tourneyonif {($Tourneyon &gt; 0)} {return}set game [lindex $text 0]putquick "PRIVMSG $Tourneychan :\00304\[\002$nick\!$uhost\00304\]\00304"putquick "PRIVMSG $Tourneychan :Tournament for $game started"set Tourneyon 1TourneyunbindcmdTourneypickreturn}#Initializing the new game :)#proc Tourneypick {nick uhost hand chan text} {global Tourneychan Tourneyon Trounduser Tourneyversion Towner Tourneystartputquick "PRIVMSG $Tourneychan :\00304$Tourneyversion by \002$Towner"putquick "PRIVMSG $Tourneychan :Type @Join to Join the current Tournament - You have $Tourneystart seconds to join"set Tourneystarttimer [utimer $Tourneystart Tourneybegin]return}##Starting the Tournament##proc Tourneybegin {nick uhost hand chan text} {global Tourneychan Trounduser Towner Tourneystart Tourneyon Tourneyplayersglobal Tourneystarttimer Tourneycycle game Tourneycycle Unplayedroundsif {$Tourneyon == 0} {return}if {[llength $Trounduser] == 4]} {putquick "PRIVMSG $Tourneychan :Tournament for $game is Now full"putquick "PRIVMSG $Tourneychan :Welcome we have $Tourneyplayers for $game Tournament Names are:$Trounduser"return}Tourneycyclereturn}proc Tourneycycle {nick uhost hand chan text} {global Tourneychan Trounduser Towner Tourneystart Tourneyonglobal Tourneystarttimer Tourneycycle game Tourneycycle Unplayedroundsglobal Tourneymax Tourneymodeif {$Tourneyon == 0} {return}set Tourneymode 4set AdTime [expr $Tourneycycletime /2] set TourneyAdTimer [utimer $AdTime TourneyScoreAdvertise] set Tourneycycletimer [utimer $Tourneycycletime UnoNext] return } proc Tourneyjoin {nick uhost hand chan text} { global Tourneychan Tourneymode game Trounduser Tourneymax Tourneyplayers TourneyIDX if {($chan != $Tourneychan) ||($Tourneymode &lt; 1)||($Tourneymode &gt; 2)} {return} if {[llength $Trounduser] == $Tourneymax} { putquick "NOTICE $nick :We currently have $Tourneymax users please try again when the tourney is over" return } set pcount 0while {[lindex $Trounduser $pcount] !=""} {if {[lindex $Trounduser $pcount] == $nick} {return}incr pcount}incr Tourneyplayerslappend Trounduser $nicklappend TourneyIDX $nickputquick "PRIVMSG $Tourneychan :\00304[$nick]\00304 Joins Tournament:$game"puthelp "NOTICE $nick :You may now leave a rating for your oppenets to see how skilled they are and if they have cheated or not,Just type @rate &lt;nick&gt; or @view rate &lt;nick&gt;"}</code></pre></div>I need some help for the @join part and after 30 seconds make it randomly mix the names and out put like <br>monie vs bob or something please help ??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8036">monie089</a> — Sun Sep 10, 2006 2:50 pm</p><hr />
]]></content>
	</entry>
	</feed>
