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

	<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>2024-08-27T05:54:42-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Bewedesign]]></name></author>
		<updated>2024-08-27T05:54:42-04:00</updated>

		<published>2024-08-27T05:54:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112998#p112998</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112998#p112998"/>
		<title type="html"><![CDATA[Re: How do I make the x data variable into the y data variable?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112998#p112998"><![CDATA[
Please try error:<div class="codebox"><p>Code: </p><pre><code>set UnoChan "#Bewedesign"set UnoRobot "UNOer"set UnoPlayer "Concelta"set Unomaxsearch "1"set UnoVersion "0.98.9 Pro"set UnoCards "/home/Bewe/eggdrop/UnoCards.txt"set UnoLogo "\002\0033U\00312N\00313O\00308!\002\003"bind pubm - "*stopped by*" startUnoproc startUno {nick uhost hand chan txt} { global UnoChan UnoRobot if {[lsearch -exact $UnoChan [string tolower $chan]]} {  if {[string match -nocase "*$UnoRobot*" "$nick"]} {   utimer 15 [list putserv "PRIVMSG $UnoChan :!uno"]  } }}bind pubm - "*to join uno*" joinUnoproc joinUno {nick uhost hand chan txt} { global UnoChan UnoRobot if {[lsearch -exact $UnoChan [string tolower $chan]]} {  if {[string match -nocase "*$UnoRobot*" "$nick"]} {   utimer 15 [list putserv "PRIVMSG $UnoChan :jo"]  } }}bind pubm - "*$UnoPlayer plays*top card is*" pubfirstUnoproc pubfirstUno {nick uhost hand chan txt} { global UnoPlayer UnoRobot UnoCards UnoChan if {[lsearch -exact $UnoChan [string tolower $chan]]} {  if {[string match -nocase "*$UnoRobot*" "$nick"]} {   set txt [string tolower [lrange $txt 0 end]]   set card [lindex $txt 7]   set numb [lindex $txt 8]   utimer 20 [list findCard $card $numb]  } }}bind pubm - "*plays*to $UnoPlayer*" pubPlaysproc pubPlays {nick uhost hand chan txt} { global UnoPlayer UnoRobot UnoCards UnoChan if {[lsearch -exact $UnoChan [string tolower $chan]]} {  if {[string match -nocase "*$UnoRobot*" "$nick"]} {   set txt [string tolower [lrange $txt 0 end]]   set card [lindex $txt 2]   set numb [lindex $txt 3]   utimer 20 [list findCard $card $numb]  } }}bind pubm - "*passes to $UnoPlayer*" pubPassesproc pubPasses {nick uhost hand chan txt} { global UnoPlayer UnoRobot UnoCards UnoChan if {[lsearch -exact $UnoChan [string tolower $chan]]} {  if {[string match -nocase "*$UnoRobot*" "$nick"]} {   utimer 5 [list bind pubm - "*Card in play*" pubinPlay]   utimer 10 [list putserv "PRIVMSG $UnoChan :cd"]  } }}bind pubm - "*plays*and skips*to $UnoPlayer*" pubskipsproc pubskips {nick uhost hand chan txt} { global UnoPlayer UnoRobot UnoCards UnoChan  if {[lsearch -exact $UnoChan [string tolower $chan]]} {  if {[string match -nocase "*$UnoRobot*" "$nick"]} {   set txt [string tolower [lrange $txt 0 3]]   set card [lindex $txt 2]   set numb [lindex $txt 3]   utimer 20 [list findCard $card $numb]  } }}bind pubm - "*Card in play*" pubinPlayproc pubinPlay {nick uhost hand chan txt} { global UnoPlayer UnoRobot UnoCards UnoChan if {[lsearch -exact $UnoChan [string tolower $chan]]} {  if {[string match -nocase "*$UnoRobot*" "$nick"]} {   set txt [string tolower [lrange $txt 0 end]]   set card [lindex $txt 4]   if {[string match "" [lindex $txt 5]]} {    set numb ""   } else {    set numb [lindex $txt 5]   }   utimer 20 [list findCard $card $numb]   utimer 25 [list unbind pubm - "*Card in play*" pubinPlay]  } }}bind pubm - "*was the current player*continuing with $UnoPlayer*" pubContinuingproc pubContinuing {nick uhost hand chan txt} { global UnoPlayer UnoRobot UnoCards UnoChan if {[lsearch -exact $UnoChan [string tolower $chan]]} {  if {[string match -nocase "*$UnoRobot*" "$nick"]} {   utimer 10 [list putserv "PRIVMSG $UnoChan :cd"]  } }}bind pubm - "*plays*choose a color $UnoPlayer*" pubChoosecolorbind pubm - "*plays*draws*and is skipped... Choose a color $UnoPlayer*" pubChoosecolorproc pubChoosecolor {nick uhost hand chan txt} { global UnoPlayer UnoRobot UnoCards UnoChan Unomaxsearch if {[lsearch -exact $UnoChan [string tolower $chan]]} {  if {[string match -nocase "*$UnoRobot*" "$nick"]} {   set r "red"   set g "green"   set b "blue"   set y "yellow"   set count "0"   set rfile [open "$UnoCards" "r"]   while {![eof $rfile]} {    gets $rfile line    if {[string match "*[string map {\x20 *} $r]*" $line]} { utimer 5 [list putserv "PRIVMSG $UnoChan :co r"]     incr count if {$count == $Unomaxsearch} { break }    } elseif {[string match "*[string map {\x20 *} $g]*" $line]} { utimer 5 [list putserv "PRIVMSG $UnoChan :co g"]     incr count if {$count == $Unomaxsearch} { break }    } elseif {[string match "*[string map {\x20 *} $b]*" $line]} { utimer 5 [list putserv "PRIVMSG $UnoChan :co b"]     incr count if {$count == $Unomaxsearch} { break }    } elseif {[string match "*[string map {\x20 *} $y]*" $line]} { utimer 5 [list putserv "PRIVMSG $UnoChan :co y"]     incr count if {$count == $Unomaxsearch} { break }    }   }   close $rfile   if {$count == 0} {    return 0   }   if {$count != 0} {    return 1   }  } }}bind pubm - "*chose*play continues with $UnoPlayer*" pubChoseplayproc pubChoseplay {nick uhost hand chan txt} { global UnoPlayer UnoRobot UnoCards UnoChan if {[lsearch -exact $UnoChan [string tolower $chan]]} {  if {[string match -nocase "*$UnoRobot*" "$nick"]} {   set txt [string tolower [lrange $txt 0 end]]   set card [lindex $txt 2]   set numb ""   utimer 20 [list findCard $card $numb]  } }}bind pubm - "*plays*and chooses*Current player $UnoPlayer*" pubchoosesproc pubchooses {nick uhost hand chan txt} { global UnoPlayer UnoRobot UnoCards UnoChan if {[lsearch -exact $UnoChan [string tolower $chan]]} {  if {[string match -nocase "*$UnoRobot*" "$nick"]} {   set txt [string tolower [lrange $txt 0 end]]   set card [lindex $txt 6]   set numb ""   utimer 20 [list findCard $card $numb]  } }}bind pubm - "*Card Totals*" pubCardtotalsproc pubCardtotals {nick uhost hand chan txt} { global UnoLogo UnoRobot UnoChan UnoCards if {[lsearch -exact $UnoChan [string tolower $chan]]} {  if {[string match -nocase "*$UnoRobot*" "$nick"]} {   set wfile [open $UnoCards "w"]   puts $wfile ""   close $wfile   rehash   killTimers   putlog "\[$UnoLogo\] Killing all timer..."  } }} proc findCard {card numb} { global UnoChan UnoCards Unomaxsearch set count "0" set rfile [open "$UnoCards" "r"] while {![eof $rfile]} {  gets $rfile line  if {[string match "*[string map {\x20 *} $card]*" $line]} {   switch -exact -- $line {    "red 0" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r0"] incr count     if {$count == $Unomaxsearch} { break }}"red 1" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r1"] incr count     if {$count == $Unomaxsearch} { break }}"red 2" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r2"] incr count     if {$count == $Unomaxsearch} { break }}"red 3" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r3"] incr count     if {$count == $Unomaxsearch} { break }}"red 4" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r4"] incr count     if {$count == $Unomaxsearch} { break }}"red 5" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r5"] incr count     if {$count == $Unomaxsearch} { break }}"red 6" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r6"] incr count     if {$count == $Unomaxsearch} { break }}"red 7" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r7"] incr count     if {$count == $Unomaxsearch} { break }}"red 8" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r8"] incr count     if {$count == $Unomaxsearch} { break }}"red 9" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r9"] incr count     if {$count == $Unomaxsearch} { break }}"red skip" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl rs"] incr count     if {$count == $Unomaxsearch} { break }}"red reverse" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl rr"] incr count     if {$count == $Unomaxsearch} { break }}"red draw two" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl rdt"] incr count     if {$count == $Unomaxsearch} { break }}"green 0" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g0"] incr count     if {$count == $Unomaxsearch} { break }}"green 1" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g1"] incr count     if {$count == $Unomaxsearch} { break }}"green 2" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g2"] incr count     if {$count == $Unomaxsearch} { break }}"green 3" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g3"] incr count     if {$count == $Unomaxsearch} { break }}"green 4" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g4"] incr count     if {$count == $Unomaxsearch} { break }}"green 5" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g5"] incr count     if {$count == $Unomaxsearch} { break }}"green 6" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g6"] incr count     if {$count == $Unomaxsearch} { break }}"green 7" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g7"] incr count     if {$count == $Unomaxsearch} { break }}"green 8" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g8"] incr count     if {$count == $Unomaxsearch} { break }}"green 9" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g9"] incr count     if {$count == $Unomaxsearch} { break }}"green skip" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl gs"] incr count     if {$count == $Unomaxsearch} { break }}"green reverse" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl gr"] incr count     if {$count == $Unomaxsearch} { break }}"green draw two" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl gdt"] incr count     if {$count == $Unomaxsearch} { break }}"blue 0" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b0"] incr count     if {$count == $Unomaxsearch} { break }}"blue 1" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b1"] incr count     if {$count == $Unomaxsearch} { break }}"blue 2" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b2"] incr count     if {$count == $Unomaxsearch} { break }}"blue 3" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b3"] incr count     if {$count == $Unomaxsearch} { break }}"blue 4" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b4"] incr count     if {$count == $Unomaxsearch} { break }}"blue 5" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b5"] incr count     if {$count == $Unomaxsearch} { break }}"blue 6" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b6"] incr count     if {$count == $Unomaxsearch} { break }}"blue 7" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b7"] incr count     if {$count == $Unomaxsearch} { break }}"blue 8" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b8"] incr count     if {$count == $Unomaxsearch} { break }}"blue 9" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b9"] incr count     if {$count == $Unomaxsearch} { break }}"blue skip" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl bs"] incr count     if {$count == $Unomaxsearch} { break }}"blue reverse" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl br"] incr count     if {$count == $Unomaxsearch} { break }}"blue draw two" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl bdt"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 0" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y0"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 1" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y1"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 2" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y2"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 3" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y3"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 4" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y4"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 5" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y5"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 6" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y6"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 7" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y7"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 8" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y8"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 9" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y9"] incr count     if {$count == $Unomaxsearch} { break }}"yellow skip" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl ys"] incr count     if {$count == $Unomaxsearch} { break }}"yellow reverse" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl yr"] incr count     if {$count == $Unomaxsearch} { break }}"yellow draw two" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl ydt"] incr count     if {$count == $Unomaxsearch} { break }}   }  } } close $rfile if {$count == 0} {  utimer 5 [list findNumb $numb]  return 0 } if {$count != 0} {  return 1 }}proc findNumb {numb} { global UnoChan UnoCards Unomaxsearch set count "0" set rfile [open "$UnoCards" "r"] while {![eof $rfile]} {  gets $rfile line  if {[string match "*[string map {\x20 *} $numb]*" $line]} {   switch -exact -- $line {    "red 0" {     utimer 5 [list putserv "PRIVMSG $UnoChan :pl r0"]     incr count     if {$count == $Unomaxsearch} { break }    }    "red 1" {     utimer 5 [list putserv "PRIVMSG $UnoChan :pl r1"]     incr count     if {$count == $Unomaxsearch} { break }    }"red 2" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r2"] incr count     if {$count == $Unomaxsearch} { break }}"red 3" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r3"] incr count     if {$count == $Unomaxsearch} { break }}"red 4" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r4"] incr count     if {$count == $Unomaxsearch} { break }}"red 5" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r5"] incr count     if {$count == $Unomaxsearch} { break }}"red 6" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r6"] incr count     if {$count == $Unomaxsearch} { break }}"red 7" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r7"] incr count     if {$count == $Unomaxsearch} { break }}"red 8" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r8"] incr count     if {$count == $Unomaxsearch} { break }}"red 9" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r9"] incr count     if {$count == $Unomaxsearch} { break }}"red skip" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl rs"] incr count     if {$count == $Unomaxsearch} { break }}"red reverse" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl rr"] incr count     if {$count == $Unomaxsearch} { break }}"red draw two" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl rdt"] incr count     if {$count == $Unomaxsearch} { break }}"green 0" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g0"] incr count     if {$count == $Unomaxsearch} { break }}"green 1" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g1"] incr count     if {$count == $Unomaxsearch} { break }}"green 2" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g2"] incr count     if {$count == $Unomaxsearch} { break }}"green 3" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g3"] incr count     if {$count == $Unomaxsearch} { break }}"green 4" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g4"] incr count     if {$count == $Unomaxsearch} { break }}"green 5" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g5"] incr count     if {$count == $Unomaxsearch} { break }}"green 6" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g6"] incr count     if {$count == $Unomaxsearch} { break }}"green 7" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g7"] incr count     if {$count == $Unomaxsearch} { break }}"green 8" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g8"] incr count     if {$count == $Unomaxsearch} { break }}"green 9" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g9"] incr count     if {$count == $Unomaxsearch} { break }}"green skip" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl gs"] incr count     if {$count == $Unomaxsearch} { break }}"green reverse" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl gr"] incr count     if {$count == $Unomaxsearch} { break }}"green draw two" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl gdt"] incr count     if {$count == $Unomaxsearch} { break }}"blue 0" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b0"] incr count     if {$count == $Unomaxsearch} { break }}"blue 1" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b1"] incr count     if {$count == $Unomaxsearch} { break }}"blue 2" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b2"] incr count     if {$count == $Unomaxsearch} { break }}"blue 3" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b3"] incr count     if {$count == $Unomaxsearch} { break }}"blue 4" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b4"] incr count     if {$count == $Unomaxsearch} { break }}"blue 5" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b5"] incr count     if {$count == $Unomaxsearch} { break }}"blue 6" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b6"] incr count     if {$count == $Unomaxsearch} { break }}"blue 7" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b7"] incr count     if {$count == $Unomaxsearch} { break }}"blue 8" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b8"] incr count     if {$count == $Unomaxsearch} { break }}"blue 9" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b9"] incr count     if {$count == $Unomaxsearch} { break }}"blue skip" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl bs"] incr count     if {$count == $Unomaxsearch} { break }}"blue reverse" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl br"] incr count     if {$count == $Unomaxsearch} { break }}"blue draw two" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl bdt"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 0" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y0"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 1" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y1"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 2" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y2"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 3" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y3"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 4" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y4"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 5" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y5"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 6" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y6"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 7" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y7"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 8" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y8"] incr count     if {$count == $Unomaxsearch} { break }}"yellow 9" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y9"] incr count     if {$count == $Unomaxsearch} { break }}"yellow skip" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl ys"] incr count     if {$count == $Unomaxsearch} { break }}"yellow reverse" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl yr"] incr count     if {$count == $Unomaxsearch} { break }    }    "yellow draw two" {     utimer 5 [list putserv "PRIVMSG $UnoChan :pl ydt"]     incr count     if {$count == $Unomaxsearch} { break }}   }  } } close $rfile if {$count == 0} {  utimer 5 [list findWdf]  return 0 } if {$count != 0} {  return 1 }}proc findWdf {} { global UnoChan UnoCards Unomaxsearch set count "0" set wdf "wild draw four" set rfile [open "$UnoCards" "r"] while {![eof $rfile]} {  gets $rfile line  if {[string match -nocase "*[string map {\x20 *} $wdf]*" $line]} {   utimer 5 [list putserv "PRIVMSG $UnoChan :pl wdf"]   incr count   if {$count == $Unomaxsearch} { break }  } } close $rfile if {$count == 0} {  utimer 5 [list findWild]  return 0 } if {$count != 0} {  return 1 }}proc findWild {} { global UnoChan UnoCards Unomaxsearch set count "0" set w "wild" set rfile [open "$UnoCards" "r"] while {![eof $rfile]} {  gets $rfile line  if {[string match -nocase "*[string map {\x20 *} $w]*" $line]} {   utimer 5 [list putserv "PRIVMSG $UnoChan :pl w"]   incr count   if {$count == $Unomaxsearch} { break }  } } close $rfile if {$count == 0} {  utimer 5 [list putserv "PRIVMSG $UnoChan :dr"]  return 0 } if {$count != 0} {  return 1 }}bind notc - "*playable card*" notcPlayableproc notcPlayable {nick uhost hand txt dest} { global UnoRobot UnoChan if {[string match -nocase "*$UnoRobot*" "$nick"]} {  utimer 10 [list putserv "PRIVMSG $UnoChan :cd"] }}bind notc - "Draw *" notcDrawproc notcDraw {nick uhost hand txt dest} { global UnoRobot UnoChan if {[string match -nocase "*$UnoRobot*" "$nick"]} {  set txt [string tolower [lrange $txt 0 end]]  set line [lrange $txt 1 end]  utimer 20 [list findSwitch $line] }}bind notc - "*or play another" notcdraworPlayproc notcdraworPlay {nick uhost hand txt dest} { global UnoRobot UnoChan if {[string match -nocase "*$UnoRobot*" "$nick"]} {  utimer 10 [list putserv "PRIVMSG $UnoChan :pa"] }}bind notc - "*play a card or pass*" notcPlayorpassproc notcPlayorpass {nick uhost hand txt dest} { global UnoRobot UnoChan if {[string match -nocase "*$UnoRobot*" "$nick"]} {  utimer 10 [list putserv "PRIVMSG $UnoChan :pa"] }}bind notc - "*was the current player, continuing with $UnoPlayer*" notcContinuingproc notcContinuing {nick uhost hand txt dest} { global UnoPlayer UnoRobot UnoChan if {[string match -nocase "*$UnoRobot*" "$nick"]} {  utimer 10 [list putserv "PRIVMSG $UnoChan :cd"] }}bind notc - "*draw a card before you can pass, $UnoPlayer*" notcDrawacardproc notcDrawacard {nick uhost hand txt dest} { global UnoPlayer UnoRobot UnoChan if {[string match -nocase "*$UnoRobot*" "$nick"]} {  utimer 10 [list putserv "PRIVMSG $UnoChan :dr"] }}bind notc - "*have a valid color card in-hand, $UnoPlayer*" notcValidcolorproc notcValidcolor {nick uhost hand txt dest} { global UnoPlayer UnoRobot UnoChan if {[string match -nocase "*$UnoRobot*" "$nick"]} {  utimer 10 [list putserv "PRIVMSG $UnoChan :cd"] }}proc findSwitch {line} { global UnoChan Unomaxsearch set count "0" switch -exact -- $line {  "red 0" {   utimer 5 [list putserv "PRIVMSG $UnoChan :pl r0"]   incr count   if {$count == $Unomaxsearch} { return 0 }  }  "red 1" {   utimer 5 [list putserv "PRIVMSG $UnoChan :pl r1"]   incr count   if {$count == $Unomaxsearch} { return 0 }  }"red 2" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r2"] incr count     if {$count == $Unomaxsearch} { return 0 }}"red 3" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r3"] incr count     if {$count == $Unomaxsearch} { return 0 }}"red 4" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r4"] incr count     if {$count == $Unomaxsearch} { return 0 }}"red 5" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r5"] incr count     if {$count == $Unomaxsearch} { return 0 }}"red 6" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r6"] incr count     if {$count == $Unomaxsearch} { return 0 }}"red 7" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r7"] incr count     if {$count == $Unomaxsearch} { return 0 }}"red 8" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r8"] incr count     if {$count == $Unomaxsearch} { return 0 }}"red 9" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl r9"] incr count     if {$count == $Unomaxsearch} { return 0 }}"red skip" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl rs"] incr count     if {$count == $Unomaxsearch} { return 0 }}"red reverse" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl rr"] incr count     if {$count == $Unomaxsearch} { return 0 }}"red draw two" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl rdt"] incr count     if {$count == $Unomaxsearch} { return 0 }}"green 0" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g0"] incr count     if {$count == $Unomaxsearch} { return 0 }}"green 1" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g1"] incr count     if {$count == $Unomaxsearch} { return 0 }}"green 2" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g2"] incr count     if {$count == $Unomaxsearch} { return 0 }}"green 3" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g3"] incr count     if {$count == $Unomaxsearch} { return 0 }}"green 4" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g4"] incr count     if {$count == $Unomaxsearch} { return 0 }}"green 5" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g5"] incr count     if {$count == $Unomaxsearch} { return 0 }}"green 6" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g6"] set count [expr $count+1]}"green 7" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g7"] incr count     if {$count == $Unomaxsearch} { return 0 }}"green 8" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g8"] incr count     if {$count == $Unomaxsearch} { return 0 }}"green 9" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl g9"] incr count     if {$count == $Unomaxsearch} { return 0 }}"green skip" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl gs"] incr count     if {$count == $Unomaxsearch} { return 0 }}"green reverse" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl gr"] incr count     if {$count == $Unomaxsearch} { return 0 }}"green draw two" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl gdt"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue 0" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b0"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue 1" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b1"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue 2" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b2"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue 3" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b3"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue 4" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b4"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue 5" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b5"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue 6" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b6"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue 7" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b7"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue 8" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b8"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue 9" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl b9"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue skip" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl bs"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue reverse" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl br"] incr count     if {$count == $Unomaxsearch} { return 0 }}"blue draw two" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl bdt"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow 0" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y0"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow 1" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y1"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow 2" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y2"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow 3" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y3"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow 4" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y4"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow 5" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y5"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow 6" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y6"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow 7" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y7"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow 8" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y8"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow 9" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl y9"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow skip" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl ys"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow reverse" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl yr"] incr count     if {$count == $Unomaxsearch} { return 0 }}"yellow draw two" { utimer 5 [list putserv "PRIVMSG $UnoChan :pl ydt"] incr count     if {$count == $Unomaxsearch} { return 0 }  }  "wild" {   utimer 5 [list putserv "PRIVMSG $UnoChan :pl w"]   incr count   if {$count == $Unomaxsearch} { return 0 }  }   "wild draw four" {   utimer 5 [list putserv "PRIVMSG $UnoChan :pl wdf"]   incr count   if {$count == $Unomaxsearch} { return 0 }  } }}  bind notc - * notcUnoproc notcUno {nick uhost hand txt dest} { global UnoLogo UnoRobot UnoCards if {[string match -nocase "*$UnoRobot*" "$nick"]} {  set txt [string tolower [lrange $txt 0 end]]  set cardlist [regexp -all -inline {(?:red|green|blue|yellow) (?:\d|draw two|reverse|skip)|wild draw four|wild} $txt]  set d "draw"  set warn1 "*you don't have that card*"  set warn2 "*you have a valid color card in-hand*"  set warn3 "*Oops! Not a valid card*"  set warn4 "*You must draw a card before you can pass*"  set warn5 "*You've already drawn a card*"  set warn6 "*you have a playable card in your hand already*"  if {[string match -nocase "*$warn1*" [lrange $txt 0 4]] || [string match -nocase "*$warn2*" [lrange $txt 0 6]] || [string match -nocase "*$warn3*" [lrange $txt 0 4]] || [string match -nocase "*$warn4*" [lrange $txt 0 8]] || [string match -nocase "*$warn5*" [lrange $txt 0 4]] || [string match -nocase "*$warn6*" [lrange $txt 0 8]]} {   putlog "\[$UnoLogo\] Warning..."   return 0  } elseif {[string match -nocase "*$d*" [lindex $txt 0]]} {   set txt [string tolower [lrange $txt 1 end]]   set afile [open $UnoCards "a"]   puts $afile "$txt"   close $afile   return 0  } else {   set txt $cardlist   set txt1 [lindex $txt 0]   set txt2 [lindex $txt 1]   set txt3 [lindex $txt 2]   set txt4 [lindex $txt 3]   set txt5 [lindex $txt 4]   set txt6 [lindex $txt 5]   set txt7 [lindex $txt 6]   set txt8 [lindex $txt 7]   set txt9 [lindex $txt 8]   set txt10 [lindex $txt 9]   set txt11 [lindex $txt 10]   set txt12 [lindex $txt 11]   set txt13 [lindex $txt 12]   set txt14 [lindex $txt 13]   set wfile [open $UnoCards "w"]   puts $wfile "$txt1"   puts $wfile "$txt2"   puts $wfile "$txt3"   puts $wfile "$txt4"   puts $wfile "$txt5"   puts $wfile "$txt6"   puts $wfile "$txt7"   puts $wfile "$txt8"   puts $wfile "$txt9"   puts $wfile "$txt10"   puts $wfile "$txt11"   puts $wfile "$txt12"   puts $wfile "$txt13"   puts $wfile "$txt14"   close $wfile  } }}proc killTimers {} { global UnoChan foreach j [utimers] {  if {[string match *putserv* [lindex $j 1]]} {   killutimer [lindex $j 2]  }  if {[string match *findCard* [lindex $j 1]]} {   killutimer [lindex $j 2]  }  if {[string match *findNumb* [lindex $j 1]]} {   killutimer [lindex $j 2]  }  if {[string match *findwdf* [lindex $j 1]]} {   killutimer [lindex $j 2]  }  if {[string match *findw* [lindex $j 1]]} {   killutimer [lindex $j 2]  }  if {[string match *findSwitch* [lindex $j 1]]} {   killutimer [lindex $j 2]  } } return 0}catch {unbind raw - PRIVMSG *raw:irc:msg}catch {unbind raw - PRIVMSG *raw:PRIVMSG}bind raw - PRIVMSG striprivmsgproc striprivmsg {f k a} {  set a [string map [list \017 ""] [stripcodes abcgru $a]]  *raw:irc:msg $f $k $a  *raw:PRIVMSG $f $k $a}catch {unbind raw - NOTICE *raw:irc:msg}catch {unbind raw - NOTICE *raw:NOTICE}bind raw - NOTICE striprivmsgproc striprivmsg {f k a} {  set a [string map [list \017 ""] [stripcodes abcgru $a]]  *raw:irc:msg $f $k $a  *raw:NOTICE $f $k $a}putlog "Loaded Play Color Uno $UnoVersion Copyright (C) 2004-2024"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13152">Bewedesign</a> — Tue Aug 27, 2024 5:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Bewedesign]]></name></author>
		<updated>2024-03-04T05:10:07-04:00</updated>

		<published>2024-03-04T05:10:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112604#p112604</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112604#p112604"/>
		<title type="html"><![CDATA[Re: How do I make the x data variable into the y data variable?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112604#p112604"><![CDATA[
Dasbrain, you are absolutely right... Thank you..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13152">Bewedesign</a> — Mon Mar 04, 2024 5:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DasBrain]]></name></author>
		<updated>2024-03-04T04:16:15-04:00</updated>

		<published>2024-03-04T04:16:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112603#p112603</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112603#p112603"/>
		<title type="html"><![CDATA[Re: How do I make the x data variable into the y data variable?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112603#p112603"><![CDATA[
It seems like you want to write an UNO bot - that plays UNO as a player.<br><br>So, I added the colored reverse.<br>This should extract the information into a Tcl list:<div class="codebox"><p>Code: </p><pre><code>set cardstr {blue 3 wild wild draw four green draw two yellow 6 red 0 wild}set cardlist [regexp -all -inline {(?:blue|green|yellow|red) (?:\d|draw two|reverse)|wild draw four|wild} $cardstr]</code></pre></div>This would yield a list with the 7 cards in $cardlist.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12909">DasBrain</a> — Mon Mar 04, 2024 4:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2024-03-04T02:53:38-04:00</updated>

		<published>2024-03-04T02:53:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112600#p112600</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112600#p112600"/>
		<title type="html"><![CDATA[Re: How do I make the x data variable into the y data variable?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112600#p112600"><![CDATA[
I don't understand how you want to split the notice.<br>Can you be more explicit or use real example?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Mar 04, 2024 2:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Bewedesign]]></name></author>
		<updated>2024-03-04T00:28:18-04:00</updated>

		<published>2024-03-04T00:28:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112598#p112598</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112598#p112598"/>
		<title type="html"><![CDATA[How do I make the x data variable into the y data variable?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112598#p112598"><![CDATA[
How do I make the x data variable into the y data variable, like the following example:<br><br>from notices: blue 3 wild wild draw four green draw two yellow 6 red 0 wild<br><br>to txt file:<br>blue 3<br>wild<br>wild draw four<br>green draw two<br>yellow 6<br>redo 0<br>wild<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13152">Bewedesign</a> — Mon Mar 04, 2024 12:28 am</p><hr />
]]></content>
	</entry>
	</feed>
