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

	<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>2020-08-26T16:03:09-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-08-26T16:03:09-04:00</updated>

		<published>2020-08-26T16:03:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108930#p108930</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108930#p108930"/>
		<title type="html"><![CDATA[bar script help (again)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108930#p108930"><![CDATA[
Hmm, little problem with the bar script,  if a user changes nick it clears their bar tab, is there a way to associate the variable with the user's hostmask?<br><br>Thanks in advanced  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Wed Aug 26, 2020 4:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-07-29T23:27:33-04:00</updated>

		<published>2020-07-29T23:27:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108822#p108822</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108822#p108822"/>
		<title type="html"><![CDATA[bar script help (again)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108822#p108822"><![CDATA[
Cool, worked a treat CrazyCat  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><br>i was thinking of anothr feature, a tip service, could we work with this perhaps?<br><br><br>!tip $amount <br><br>and this adds to the receipt as a seperate line or array<br><br>but some how make a total amount of both the drinks and the tip<br><br>would this be possibly easy? or quite difficult to do?<br>All help appreciated as always <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=12849">ComputerTech</a> — Wed Jul 29, 2020 11:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-07-28T06:36:16-04:00</updated>

		<published>2020-07-28T06:36:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108796#p108796</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108796#p108796"/>
		<title type="html"><![CDATA[bar script help (again)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108796#p108796"><![CDATA[
Second Choice looks good  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><br>Thanks CrazyCat, i'll go add it right away  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br><br>Cheers  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Tue Jul 28, 2020 6:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-07-28T00:49:12-04:00</updated>

		<published>2020-07-28T00:49:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108795#p108795</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108795#p108795"/>
		<title type="html"><![CDATA[bar script help (again)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108795#p108795"><![CDATA[
Sorry, I didn't read totaly the last putserv which is used to speak to the "victim" and the afforder.<br><br>So, you have 2 choices:<br>- use separate lines to say "enjoy" and to give the total amount of the bill<br>- compare $vict and $nick and then choose an appropriate sentence.<br><br>First way:<div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $chan :: Enjoy your $key $vict, it's a gift from $nick"putserv "PRIVMSG $chan: $nick, your Total Bill Amount is \$$::beer::bills($nick)"</code></pre></div>Second way:<div class="codebox"><p>Code: </p><pre><code>if {$vict eq $nick} {   putserv "PRIVMSG $chan :Enjoy your $key $nick, Your Total Bill Amount Is \$$::beer::bills($nick)"} else {   putserv "PRIVMSG $chan :Enjoy your $key $vict, the Total Bill Amount for $nick is \$$::beer::bills($nick)"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Jul 28, 2020 12:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-07-27T19:08:29-04:00</updated>

		<published>2020-07-27T19:08:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108789#p108789</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108789#p108789"/>
		<title type="html"><![CDATA[bar script help (again)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108789#p108789"><![CDATA[
Yeah, but when i did<div class="codebox"><p>Code: </p><pre><code>!heineken john</code></pre></div>it responded with<div class="codebox"><p>Code: </p><pre><code>*Fills up the glass with heineken*Gives the heineken to j9hn*Enjoy your heineken ComputerTech, Your Total Bill Amount Is $6 </code></pre></div>so i guess this &gt;&gt; *Enjoy your heineken ComputerTech, Your Total Bill Amount Is $6<br>is the problem, perhaps if it checked if i specified a person to say a different sentence<br><br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"> perhaps like this<br><div class="codebox"><p>Code: </p><pre><code>if {[llength [split $text] 0]}putserv "privmsg $chan :here ya go john"} else {putserv "privmsg $chan :here ya go computertech"</code></pre></div>something like that perhaps?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Mon Jul 27, 2020 7:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-07-27T18:47:14-04:00</updated>

		<published>2020-07-27T18:47:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108787#p108787</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108787#p108787"/>
		<title type="html"><![CDATA[bar script help (again)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108787#p108787"><![CDATA[
<blockquote class="uncited"><div>Hmm, it works good, but this part<div class="codebox"><p>Code: </p><pre><code> putserv "PRIVMSG $chan :\001ACTION Fills up the glass with $key\001"       putserv "PRIVMSG $chan :\001ACTION Gives the $key to $vict\001"       putserv "PRIVMSG $chan : Enjoy your $key $nick, Your Total Bill Amount Is \$$::beer::bills($nick)" </code></pre></div>if i change $nick to $vict ,will that make it if i just type !beer it will say giving to me?</div></blockquote>Read the beginning of the code, $vict is depending on the second part of the command:<div class="codebox"><p>Code: </p><pre><code>if { [llength $args]==2 } {         set vict [stripcodes abcgru [lindex $args 1]]         if {![onchan $vict $chan]} {            putserv "PRIVMSG $chan :$nick, you can't afford a $key to $vict, she/he is not here"            return 0         }      } else {         set vict $nick      } </code></pre></div><blockquote class="uncited"><div>and for this part.<div class="codebox"><p>Code: </p><pre><code>  putserv "PRIVMSG $chan :$nick Thank You For Paying Your Bill, Here's your receipt"       putserv "NOTICE $nick : -------------------  "       putserv "NOTICE $nick :|Bar receipt                    "          putserv "NOTICE $nick :| \$$::beer::bills($nick)  "       putserv "NOTICE $nick :| $nick       "       putserv "NOTICE $nick :| $chan"       putserv "NOTICE $nick : ------------------- "       unset ::beer::bills($nick)     } </code></pre></div>is there a way to make the receipt show each drink the user ordered on the receipt?</div></blockquote>Wasn't in the previous question, and it's more elaborate than a simple bill counter.<br>I can do it, but managing bills and payments needs more things than "I want a bar script for fun"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Jul 27, 2020 6:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-07-27T16:06:55-04:00</updated>

		<published>2020-07-27T16:06:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108782#p108782</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108782#p108782"/>
		<title type="html"><![CDATA[bar script help (again)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108782#p108782"><![CDATA[
Hmm, it works good, but this part<br><div class="codebox"><p>Code: </p><pre><code> putserv "PRIVMSG $chan :\001ACTION Fills up the glass with $key\001"       putserv "PRIVMSG $chan :\001ACTION Gives the $key to $vict\001"       putserv "PRIVMSG $chan : Enjoy your $key $nick, Your Total Bill Amount Is \$$::beer::bills($nick)" </code></pre></div>if i change $nick to $vict ,will that make it if i just type !beer it will say giving to me?<br><br>and for this part.<div class="codebox"><p>Code: </p><pre><code>  putserv "PRIVMSG $chan :$nick Thank You For Paying Your Bill, Here's your receipt"       putserv "NOTICE $nick : -------------------  "       putserv "NOTICE $nick :|Bar receipt                    "          putserv "NOTICE $nick :| \$$::beer::bills($nick)  "       putserv "NOTICE $nick :| $nick       "       putserv "NOTICE $nick :| $chan"       putserv "NOTICE $nick : ------------------- "       unset ::beer::bills($nick)     } </code></pre></div>is there a way to make the receipt show each drink the user ordered on the receipt?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Mon Jul 27, 2020 4:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-07-27T09:14:58-04:00</updated>

		<published>2020-07-27T09:14:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108781#p108781</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108781#p108781"/>
		<title type="html"><![CDATA[bar script help (again)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108781#p108781"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>cd /pub/ &amp;&amp; more beer</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Jul 27, 2020 9:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-07-27T09:16:39-04:00</updated>

		<published>2020-07-27T09:13:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108780#p108780</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108780#p108780"/>
		<title type="html"><![CDATA[bar script help (again)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108780#p108780"><![CDATA[
Haha, Cheers CrazyCat <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br><br>I'll give it a go <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>*ComputerTech Gives CrazyCat A Beer<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Mon Jul 27, 2020 9:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-07-27T04:27:54-04:00</updated>

		<published>2020-07-27T04:27:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108779#p108779</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108779#p108779"/>
		<title type="html"><![CDATA[bar script help (again)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108779#p108779"><![CDATA[
You can try the following:<div class="codebox"><p>Code: </p><pre><code>################################################################################################################################################################## Bar.tcl 1.0.5##################################################################################################################################################################ComputerTech#Irc     irc.technet.xi.ht #ComputerTech123#Email   ComputerTech312@Gmail.com#GitHub  https://github.com/computertech312#Website http://tcl3.webnode.co.uk##################################################################################################################################################################START OF SETTINGS##Set triggerset barcmd ""#Set the maxium amount the tab can beset max "100"#END OF SETTINGS##################################################################################################################################################################   namespace eval ::beer {variable barcmd ";"    variable beerarray set bills {}array set drinks {heineken 6wine   25water   2coke   5orange   4vodka    10brandy   30whiskey   9budwiser 7guinness 14carlsberg 8redbull   6fanta     5tea       4coffee    6}   foreach dr [array names drinks] {bind pubm - "*$::beer::barcmd$dr*" ::beer::do_drink}   bind pub - "${barcmd}pay" ::beer::do_the_paybind pub - "${barcmd}menu" ::beer::do_the_menu    proc do_drink {nick uhost handle chan text} {set args [split $text " "]set key [stripcodes abcgru [lindex $args 0]]set key [string range $key 1 end]if { [llength $args]==2 } {set vict [stripcodes abcgru [lindex $args 1]]if {![onchan $vict $chan]} {putserv "PRIVMSG $chan :$nick, you can't afford a $key to $vict, she/he is not here"return 0}} else {set vict $nick}set cost $::beer::drinks($key)if {[array names ::beer::bills -exact $nick] ne ""} {set bill $::beer::bills($nick)if {$bill &gt;= 50} {putserv "PRIVMSG $chan : $nick Your Tab is full With the amount of \$$bill Please pay before ordering more drink"   return  0           }} else {set ::beer::bills($nick) 0}incr ::beer::bills($nick) $costputserv "PRIVMSG $chan :\001ACTION Fills up the glass with $key\001"putserv "PRIVMSG $chan :\001ACTION Gives the $key to $vict\001"putserv "PRIVMSG $chan : Enjoy your $key $nick, Your Total Bill Amount Is \$$::beer::bills($nick)"}    proc do_the_pay {nick uhost handle chan text} {set loaded [array names ::beer::bills -exact $nick]if {$loaded eq ""} {putserv "PRIVMSG $chan :$nick Your Already Payed Your Bill"return}putserv "PRIVMSG $chan :$nick Thank You For Paying Your Bill, Here's your receipt"putserv "NOTICE $nick : -------------------  "putserv "NOTICE $nick :|Bar receipt                    "   putserv "NOTICE $nick :| \$$::beer::bills($nick)  "putserv "NOTICE $nick :| $nick       "putserv "NOTICE $nick :| $chan"putserv "NOTICE $nick : ------------------- "unset ::beer::bills($nick)    }     proc do_the_menu {nick uhost handle chan text} {putserv "NOTICE $nick :Welcome $nick This is our Menu"foreach {drink cost} [array get ::beer::drinks] {putserv "NOTICE $nick :$::beer::barcmd$drink : \$$cost"}}      putlog "Barman 1.0.6 loaded"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Jul 27, 2020 4:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-07-26T23:40:43-04:00</updated>

		<published>2020-07-26T23:40:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108778#p108778</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108778#p108778"/>
		<title type="html"><![CDATA[bar script help (again)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108778#p108778"><![CDATA[
so trying to add the option to give a beer to a user like !beer john<br><br>bot gives john a beer<br><br>this is the code I have so far  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> <br><div class="codebox"><p>Code: </p><pre><code>################################################################################################################################################################## Bar.tcl 1.0.5##################################################################################################################################################################ComputerTech#Irc     irc.technet.xi.ht #ComputerTech123#Email   ComputerTech312@Gmail.com#GitHub  https://github.com/computertech312#Website http://tcl3.webnode.co.uk##################################################################################################################################################################START OF SETTINGS##Set triggerset barcmd ""#Set the maxium amount the tab can beset max "100"#END OF SETTINGS##################################################################################################################################################################   namespace eval ::beer {   variable barcmd ";"    variable beer   array set bills {}   array set drinks {      heineken 6      wine   25      water   2      coke   5      orange   4      vodka    10      brandy   30      whiskey   9      budwiser 7      guinness 14      carlsberg 8      redbull   6      fanta     5      tea       4      coffee    6   }      foreach dr [array names drinks] {      bind pubm - "*$::beer::barcmd$dr*" ::beer::do_drink   }      bind pub - "${barcmd}pay" ::beer::do_the_pay    bind pub - "${barcmd}menu" ::beer::do_the_menu    proc do_drink {nick uhost handle chan text} {      set args [split $text " "]      set key [stripcodes abcgru [lindex $args 0]]      set key [string range $key 1 end]      set cost $::beer::drinks($key)      if {[array names ::beer::bills -exact $nick] ne ""} {         set bill $::beer::bills($nick)         if {$bill &gt;= 50} {            putserv "PRIVMSG $chan : $nick Your Tab is full With the amount of \$$bill Please pay before ordering more drink"               return  0                    }      } else {         set ::beer::bills($nick) 0      }      incr ::beer::bills($nick) $cost         if {[lindex [split $text] 0 ]} {       set dnick "[lindex [split $text] 0 ]"       putserv "privmsg $chan : here ya go go $dnick some $key"    }  else {        putserv "PRIVMSG $chan :\001ACTION Fills up the glass with $key\001"        putserv "PRIVMSG $chan :\001ACTION Gives the $key to $nick\001"        putserv "PRIVMSG $chan : Enjoy your $key $nick, Your Total Bill Amount Is \$$::beer::bills($nick)"    }      }    proc do_the_pay {nick uhost handle chan text} {       set loaded [array names ::beer::bills -exact $nick]       if {$loaded eq ""} {          putserv "PRIVMSG $chan :$nick Your Already Payed Your Bill"          return       }        putserv "PRIVMSG $chan :$nick Thank You For Paying Your Bill, Here's your receipt"        putserv "NOTICE $nick : -------------------  "        putserv "NOTICE $nick :|Bar receipt                    "           putserv "NOTICE $nick :| \$$::beer::bills($nick)  "        putserv "NOTICE $nick :| $nick       "        putserv "NOTICE $nick :| $chan"        putserv "NOTICE $nick : ------------------- "        unset ::beer::bills($nick)    }        proc do_the_menu {nick uhost handle chan text} {      putserv "NOTICE $nick :Welcome $nick This is our Menu"      foreach {drink cost} [array get ::beer::drinks] {      putserv "NOTICE $nick :$::beer::barcmd$drink : \$$cost"      }   }      putlog "Barman 1.0.1 loaded"}   putlog "Bar 1.0.5 Loaded"#################################################################################################################################################################</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Sun Jul 26, 2020 11:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
