egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need help with A fun.tcl (commands react on 3 ways)

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
gunnie
Voice


Joined: 04 Jan 2011
Posts: 1

PostPosted: Tue Jan 04, 2011 3:26 pm    Post subject: Need help with A fun.tcl (commands react on 3 ways) Reply with quote

Hi everybody.
I search the forum, but don't find A proper answer on it.
I'm also A newbie in tlc.

Some friends of mine compiled A fun.tcl (bot react on pub-commands).
Now I'm trying to put an extra line in it,so I can make my commands react on 3 ways.
1. !push (example)

Code:
bind pub - !brb brb_msg
proc brb_msg {nick uhost hand chan args} {
  putchan $chan "eventjes geduld mensen ... $nick komt zodadelijk weer :)"
  return 1
}


2. !push nick (example)

Code:
bind pub - !bye bye_msg
proc bye_msg {nick uhost hand chan args} {
  if {[lindex $args 0] == ""} { puthelp "notice $nick :gebruik !bye <nick>" ; return 0 }
  putchan $chan "Tot ziens $args ... ik hoop dat je gauw weer terug komt ... cya ... :-)"
  return 1
}


3. !push nick/botnick (example)

Code:
bind pub - !badje badje_msg
proc badje_msg {nick uhost hand chan args} {
global botnick
  if {[lindex $args 0] == ""} { puthelp "notice $nick :gebruik !badje <nick>" ; return 0 }
  if {[lindex $args 0] == $botnick } { putchan $chan "'t Is nie omda gij raar riekt $nick , dat ik in bad moet hé!" ; return 0 }
  putchan $chan "$nick neemt een heerlijk heet badje samen met $args, Oohhh ... wat een passie ... of zijn jullie met rubberen eendjes aan't spelen :ppp"
  return 1
}


The first one I can make.
And one where the bot react on nick/botnick also

But I can't figure out how to make it work in one code. (like in example 3, but that in that code all 3 manners are present.)

Sorry if mine English is not perfect,but I'm Belgian.
That's also the reason that my commands are in Dutch.
Back to top
View user's profile Send private message
Diamond85
Voice


Joined: 25 Oct 2008
Posts: 27

PostPosted: Thu Jan 13, 2011 7:23 pm    Post subject: Re: Need help with A fun.tcl (commands react on 3 ways) Reply with quote

gunnie wrote:
Hi everybody.
I search the forum, but don't find A proper answer on it.
I'm also A newbie in tlc.


hello Gunnie.
my english is very bad but I'll try to help.
if you are looking for scripts for Eggdrop then you should not search only specific forums but also in the World Wide Web

http://www.eggdrop-help.de/page/download/8/

there loading the channelservice.tcl down. you need only make a difference with the texts in your language.


or if you think something like that then here:

Code:

bind PUB -|- !HI pub:HI

proc pub:HI {nick host hand chan arg} {

   global botnick

   set arg [split $arg]
   set nick [split $nick]

   if {$arg == ""} {
      set arg $nick
   }

   if {[isbotnick $arg]} {
      putquick "PRIVMSG $chan :Hello $nick im the Bot on $chan"
      return 0
   }

   if {![onchan $arg $chan]} {
      putquick "PRIVMSG $chan :$arg is not on $chan."
      return 0
   }
   putquick "PRIVMSG $chan :Hello $arg welcome to $chan"
}


result:
14/01/11 01:05:46 <Diamond85> !hi
14/01/11 01:05:46 <@EggDrop> Hello Diamond85 welcome to #BestIRCd

14/01/11 01:05:54 <Diamond85> !hi EggDrop
14/01/11 01:05:54 <@EggDrop> Hello Diamond85 im the Bot on #BestIRCd

14/01/11 01:06:01 <Diamond85> !hi aaaaa
14/01/11 01:06:01 <@EggDrop> Hello aaaaa welcome to #BestIRCd

14/01/11 01:06:06 <Diamond85> !hi abc
14/01/11 01:06:06 <@EggDrop> abc is not on #BestIRCd.

Can you German? if so it would be easier for me because my English is not so good, too Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber