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 

Looking for a script or module to create custom commands
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
pavel_kbc
Voice


Joined: 28 Dec 2006
Posts: 23

PostPosted: Fri Dec 29, 2006 4:01 pm    Post subject: Reply with quote

<ra1nb0w> [02:01] Tcl error [del:command]: missing "
<ra1nb0w> [02:01] Tcl error [del:command]: missing "


i fixed.

proc del:command {n u h c a} {
global allcommands
set cmd [string tolower [lindex [split $a] 0]]
if {![catch {unbind pub - $cmd added:$cmd}]} {
if {[set i [lsearch $allcommands -exact $cmd]] != -1} {
set allcommands [lreplace $allcommands $i $i]
}
puthelp "notice $n :Successfully remove \002$cmd\002 PUB command."
} {
puthelp "notice $n :Command \002$cmd\002 does not exist."
}
}
Back to top
View user's profile Send private message
pavel_kbc
Voice


Joined: 28 Dec 2006
Posts: 23

PostPosted: Fri Dec 29, 2006 4:07 pm    Post subject: Reply with quote

when i type : <r00t-fck> !delcommand !testing
its show me error on partyline:
<ra1nb0w> [02:06] Tcl error [del:command]: bad option "! !testing": must be -all, -ascii, -decreasing, -dictionary, -exact, -glob, -increasing, -inline, -integer, -not, -real, -regexp, -sorted, or -start
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Dec 29, 2006 4:43 pm    Post subject: Reply with quote

I've edited the code, these errors shouldn't occur anymore.

I wonder why nobody reported this before, they request and don't use? Laughing
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
pavel_kbc
Voice


Joined: 28 Dec 2006
Posts: 23

PostPosted: Sat Dec 30, 2006 8:05 pm    Post subject: Reply with quote

Sir_fz
what about this one ?

<ra1nb0w> [02:06] Tcl error [del:command]: bad option "! !testing": must be -all, -ascii, -decreasing, -dictionary, -exact, -glob, -increasing, -inline, -integer, -not, -real, -regexp, -sorted, or -start
_________________
join my irc channel
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Dec 30, 2006 8:52 pm    Post subject: Reply with quote

I already fixed that. The bug was in using the [lsearch] command, instead of using [lsearch <switch> <list> <element>] I was using [lsearch <list> <switch> <element>] which obviously is fixed in the code edit. Replace your old code with the new edited code and rehash your Eggdrop.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
pavel_kbc
Voice


Joined: 28 Dec 2006
Posts: 23

PostPosted: Thu Jan 04, 2007 3:41 pm    Post subject: Reply with quote

Sir_Fz, can you please edit for me?

like this Smile
<x-r00t-x> !addcommand !cmds notice %nick testing
-lord- Added add:!cmds command.
<x-r00t-x> !cmds x-r00t-x
-lord- testing

i mean i want to set command like "notice , privmsg, etc"
_________________
join my irc channel
Back to top
View user's profile Send private message
piggy
Voice


Joined: 21 Aug 2005
Posts: 14
Location: London

PostPosted: Sat Jan 27, 2007 4:21 pm    Post subject: Reply with quote

Sir_Fz: A couple of questions to this tcl code.

First Question

Is it possible to make it that you can either state the nickname you want the command to be issued for, or if no nickname is stated then it will do the command for the nickname that issued the command.

Example:

<nickname> !beer MrX
* bot brings MrX a nice cold beer

or

(nickname) !beer
*bot brings (nickname) a nice cold beer


Second question:

Is there any chance of making it that you can add a command that makes the bot select a diffrent item from a list of items and a diffrent action for the responses each time the comand is issued?

Example of the command that would be set:

(owner) !addcommand !beer (pulls out (a fine|an excellent|an excquisite|a tasty|a nicely refined) | pours a (pint|litre|quart) of (Guinness|Amstel|Castle|Jever|Yuengling Lager|Black Label|Piraat|Franziskaner Hefeweizen) for

(nickname) !beer
*bot pulls out an excellent litre of Yuengling Lager for (nickname)

next time the command is issued it responds diffrently.

(nickname) !beer MrX
*bot pours a pint of Guinness for MrX


Third Question

Is it possible to make it that you can add a command that is 2 words?

Example:

(owner) !addcommand !beer me

(nickname) !beer me
*bot pours a quart of Amstel for (nickname)


If this is asking for to much just tell me, i just thought it would be nice to add abit more functionalty to this tcl, make the bot have diffrent responses for the same command Smile

Thanks for any help you can give on this Embarassed
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jan 27, 2007 8:39 pm    Post subject: Reply with quote

I will get back to this when I have more time (i.e. When the semester finishes and when the bullshit happening in the country comes to rest).
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
atreides
Voice


Joined: 20 Nov 2006
Posts: 17

PostPosted: Tue Jan 30, 2007 12:51 am    Post subject: Reply with quote

I'm finding that your script stopped working after awhile. I tried restarting the eggdrop and it doesnt respond to !addcommand anymore. It worked fine but i tried to delete binds. Then, i set a new .txt file to add information to but this isnt working.
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 -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
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