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

	<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>2004-04-11T14:14:39-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-04-11T14:14:39-04:00</updated>

		<published>2004-04-11T14:14:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35439#p35439</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35439#p35439"/>
		<title type="html"><![CDATA[Learn script where and need help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35439#p35439"><![CDATA[
again megahall ive seen this before on megahall u want a faq engine or something like that ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Apr 11, 2004 2:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jailmann]]></name></author>
		<updated>2004-04-11T14:09:03-04:00</updated>

		<published>2004-04-11T14:09:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35438#p35438</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35438#p35438"/>
		<title type="html"><![CDATA[Learn script where and need help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35438#p35438"><![CDATA[
no no i dont need at chat bot<br><br>this script i need whit one change <br><br>i can learn the bot som words and when a user ask whit ? or ?? the bot will anser if the bot no the word after ?? or ? but i need to add so the user can ask the word? after<br><br>like this the bot is in a channel where there a rules then user now have to aks ? rules it will be better if the user can ask rules? and example this<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4801">Jailmann</a> — Sun Apr 11, 2004 2:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-04-11T14:03:30-04:00</updated>

		<published>2004-04-11T14:03:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35437#p35437</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35437#p35437"/>
		<title type="html"><![CDATA[Learn script where and need help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35437#p35437"><![CDATA[
hmm i don't think u can teach the bot anything i think this script was made for u to enter something then when some one asks u about something u can say !learn target format <br><br>and the bot will tell the target about format command .. or something like this not sur didn't realy look at the script yet .. <br><br>i think what you want is a chat bot try megahall or something look for it it is a chat bot thing not sur how it works never used it or don't know if it is any good but its the only one that i know that does this ...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Apr 11, 2004 2:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jailmann]]></name></author>
		<updated>2004-04-11T13:56:12-04:00</updated>

		<published>2004-04-11T13:56:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35436#p35436</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35436#p35436"/>
		<title type="html"><![CDATA[Learn script where and need help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35436#p35436"><![CDATA[
it is a learn script i can learn the bot anuthing like this<br><br>!learn vuf is a dog <br><br>!learn cat is a mis<br><br>then to se the answer is ?? vuf or ? vuf then the bot will answer vuf is a dog or ?? cat or ? cat then the bot will answer cat is a mis<br><br>i need thebot to use Vuf? the bot will answer the same vuf? vuf is a dog<br><br>i can learn the bot anything whit the !learn triggers there in the script to<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4801">Jailmann</a> — Sun Apr 11, 2004 1:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-04-11T13:50:04-04:00</updated>

		<published>2004-04-11T13:50:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35435#p35435</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35435#p35435"/>
		<title type="html"><![CDATA[Learn script where and need help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35435#p35435"><![CDATA[
sounds easy hmm does it require more then one line ?? and every one can add eh ..? or do i understand wrong ..<br><br>do you wana set ur own id for the input or .. do you want it the match anything like<br><br>ofloo is the test<br><br>if u say !trigger test it shows ofloo is the test <br>or only when u say !trigger ofloo<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Apr 11, 2004 1:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jailmann]]></name></author>
		<updated>2004-04-11T13:36:20-04:00</updated>

		<published>2004-04-11T13:36:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35433#p35433</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35433#p35433"/>
		<title type="html"><![CDATA[Learn script where and need help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35433#p35433"><![CDATA[
Hallo<br><br>Sorry hehe i write somthing in danish <br><br><br>The script works like this<br><br>i can !learn Ofloo is the best<br><br>then i write ? Ofloo <br><br>then the bot answer Ofloo is the best<br><br>But can there be add so peaplo can do this Ofloo? then the bot will answher to<br><br>And can there be add in the script what channel there workes whit what there these triggers now<br><br>?? Ofloo<br>? Ofloo<br>and if there can be add Ofloo?<br><br>If i have channel #test and #test1<br><br>Can there be add this in the script ? only works in #test and Ofloo? only works in #test1 so i can chose what channel the diffrent trigger works in ??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4801">Jailmann</a> — Sun Apr 11, 2004 1:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-04-11T13:04:36-04:00</updated>

		<published>2004-04-11T13:04:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35431#p35431</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35431#p35431"/>
		<title type="html"><![CDATA[Learn script where and need help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35431#p35431"><![CDATA[
what are u talking about ? could you plz give an example of what you want<br><br>and what is navn ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Apr 11, 2004 1:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jailmann]]></name></author>
		<updated>2004-04-11T11:50:40-04:00</updated>

		<published>2004-04-11T11:50:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35422#p35422</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35422#p35422"/>
		<title type="html"><![CDATA[Learn script where and need help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35422#p35422"><![CDATA[
Hallo <br><br><br>I have this Script but i have a few change to it or somone noes where to find another one<br><br>1 need to Put in the script so user kan write navn?<br><br>2 Can it be possible to set in the script waht channel there works whit ? navn or navn? og what channel i can learn the stuff in <br><br><br>The script is here<br><br><br>putlog "Learn v1.0 by Nite"<br><br>set learnfile "/sti/$botnick.learn"<br>bind pub o|o !learn pub:learn<br>#bind msg o|o !learn msg:learn<br>bind pub  - "?" pub:learned<br>#bind msg o|o "?" msg:learned<br>bind pub  - "??" pub:learned<br>#bind msg o|o "??" msg:learned<br>bind pub o|o !forget pub:forget<br>#bind msg o|o !forget msg:forget<br><br># Tcl chokes on this for unknown reasons. *sigh*<br>proc ctoken {str delim} {<br>set index [string match [$delim] $str]<br>set token [string range $str 0 $index]<br>set strvar [string range $str $index [string length $str] ]<br>return $token<br>}<br><br># Tcl barfs on this on two.  Who knows why?<br>proc msg:learn {nick host hand args} {<br>pub:learn {$nick $host $hand "" $args}<br>}<br><br>proc pub:learn {nick host hand chan args} {<br>global learnfile<br>set args [string trim $args "{} "]<br><br># Seperate the first word from the rest of the line.<br># Should be: set word [ctoken $args " "]<br><br>set len [string length $args]<br>if {$len == 0} {<br>putserv "PRIVMSG $chan $nick :How am I to learn that?  No Way!"<br>return<br>}<br><br>set space [string first " " $args]<br>if {$space == -1} {<br>putserv "PRIVMSG $chan $nick :Hey, you did it wrong! Go to<br>school!"<br>return<br>}<br><br>set word [string trim [string range $args 0 $space] ]<br>set learn [string trim [string range $args $space $len] ]<br><br> # Add it into the *.learn file.<br>set file [open $learnfile a+]<br>        puts $file "${word}::$learn"<br>close $file<br><br>putserv "PRIVMSG $chan $nick :$word... Okay."<br>}<br><br><br><br>proc pub:learned {nick host hand chan args} {<br>  global learnfile<br><br>  set found 0<br><br>  set args [string trim $args "{} "]<br>  if {[string length $args] == 0} {<br>putserv "NOTICE $nick :Eh?  Try '? help'"<br>return <br>  }<br><br>  if [file readable $learnfile] {<br>    set file [open $learnfile RDONLY]<br>    while {1} {<br>      if [eof $file] break<br>      set line [gets $file]<br><br>      # Get the word.  Should be: set word [ctoken $line ":"]<br>      set len [string length $line]<br>      set colon [string first ":" $line]<br>      set word [string range $line 0 [expr $colon -1] ]<br>      set line [string range $line [expr $colon +1] $len]<br><br>      # Get the flags.  Should be: set flags [ctoken $line ":"]<br>      set len [string length $line]<br>      set colon [string first ":" $line]<br>      set flags [string range $line 0 [expr $colon -1] ]<br>      set line [string range $line [expr $colon +1] $len]<br>        <br>      if {[string compare $args $word] == 0} {<br>        putserv "PRIVMSG $chan :$word == $line"<br>        incr found<br>      }<br>    }<br>    close $file<br>  } else {<br>    putserv "NOTICE $nick :But I don't know anything!"<br>    return<br>  }<br>  if {$found == 0} {<br>putserv "NOTICE $nick :$args? What are you jabbering about?"<br>  }<br><br>}<br><br><br><br># copyfile doesn't work.  frename doesn't work.  I hate kludges!<br>proc pub:forget {nick host hand chan args} {<br>  global learnfile<br>  set found 0<br><br>  set args [string trim $args "{} "]<br><br>  if {[string length $args] == 0} {<br>putserv "NOTICE $nick :I don't remember what you wanted me to<br>forget."<br>return <br>  }<br><br>  # Step one: Create a new file without the $args keyword.<br>  if [file readable $learnfile] {<br>    set file [open $learnfile RDONLY]<br>    set newfile [open $learnfile.tmp w]<br><br>    while {1} {<br>      if [eof $file] break<br>      set line [gets $file]<br><br>      # Get the word.  Should be: set word [ctoken $line ":"]<br>      set len [string length $line]<br>      set colon [string first ":" $line]<br>      set word [string range $line 0 [expr $colon -1] ]<br>      set line [string range $line [expr $colon] $len]<br><br>      if {[string compare $args $word]} {<br>puts $newfile "$word$line"<br>      } else {<br>incr found<br>      }<br>    }<br>    close $file<br>    close $newfile<br>  } else {<br>    putserv "NOTICE $nick :But I don't know anything!"<br>    return<br>  }<br><br>  if {$found == 0} {<br>    putserv "PRIVMSG $chan $nick :But I have no idea what \"$args\" is!"<br>    return<br>  }<br><br>  # Step two: Rewrite the $learnfile from the new file.<br>  set file [open $learnfile w]<br>  set newfile [open $learnfile.tmp r]<br>  while { 1 } {<br>if [eof $newfile] break<br>puts $file [gets $newfile]<br>  }<br>  close $file<br>  close $newfile<br>  putserv "PRIVMSG $chan $nick :Oh no! I just forgot what \"$args\" was!"<br>}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4801">Jailmann</a> — Sun Apr 11, 2004 11:50 am</p><hr />
]]></content>
	</entry>
	</feed>
