This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Clan Script if possible...

Old posts that have not been replied to for several years.
M
Magma
Voice
Posts: 9
Joined: Fri Jun 03, 2005 7:59 pm

Clan Script if possible...

Post by Magma »

So I want to setup some stuff for my bot.

I want it so that if anyone with a name which starts with [11W] they get a +v when they join the channel

Along with something basic were if a user says a command it will be done.

So if they say !url

the bot will respond with our URL to our site

!url
!contact
!forums
!staff

basic commands were the bot is just gonna say it in the channel or in a PM or something.

The rest of the channel OP's and half-ops will be through Chanserv, just need a wild card for the +v
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Have we bothered to even attempt a search of either the TCL Achive or the forums?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
M
Magma
Voice
Posts: 9
Joined: Fri Jun 03, 2005 7:59 pm

Post by Magma »

I dont know what im looking for that would auto voice any user with [11W] before there name
D
Dizzle
Op
Posts: 109
Joined: Thu Apr 28, 2005 11:21 am
Contact:

Post by Dizzle »

well this will autovoice pll with the tag [11W] on

Code: Select all


#onjoin voice with the right tag 

bind join - "*" voice:nicks 

proc voice:nicks {nick uhost hand chan} { 
if {[botisop $chan] && ([string match "[11W]*" $nick])} { 
pushmode $chan +v $nick
} 
}

## nichchange with the right tag 

bind nick - "*" voice:nickch

proc voice:nickch {nick uhost hand chan newnick} { 
if {[botisop $chan] && ([string match "[11W]*" $newnick])} { 
pushmode $chan +v $newnick 
} 
} 

M
Magma
Voice
Posts: 9
Joined: Fri Jun 03, 2005 7:59 pm

Post by Magma »

so would I save that as a tcl script now...

sorry im super new to eggdrop
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

nope dizzle, that wouldn't.

You can't use braces because it will think it's a command

Code: Select all

#onjoin voice with the right tag

bind join - "*" voice:nicks

proc voice:nicks {nick uhost hand chan} {
if {[botisop $chan] && ([string match "\[11W\]*" $nick])} {
pushmode $chan +v $nick
}
}
k
kanibus
Halfop
Posts: 44
Joined: Tue May 03, 2005 7:22 am

Post by kanibus »

and the other stuff is pretty easy too

Code: Select all

bind pub -|- !url show_url
bind pub -|- !contact show_contact
bind pub -|- !forums show_forums
bind pub -|- !staff  show_staff

proc show_url {nick host hand chan text } {
  putserv "NOTICE $nick : Visit us at www.mysitehere.com !!"
}


proc show_contact {nick host hand chan text } {
  putserv "NOTICE $nick : You can contact me at my@email.com !!"
}


proc show_forums {nick host hand chan text } {
  putserv "NOTICE $nick : Check out our forums at www.mysitehere.com/forums !!"
}


proc show_staff {nick host hand chan text } {
  putserv "NOTICE $nick : the staff here, add more notices if you need"
}
you can have it send the info by pm simply by changing NOTICE with PRIVMSG
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

kanibus wrote:and the other stuff is pretty easy too

Code: Select all

bind pub -|- !url show_url
bind pub -|- !contact show_contact
bind pub -|- !forums show_forums
bind pub -|- !staff  show_staff

proc show_url {nick host hand chan text } {
  putserv "NOTICE $nick : Visit us at www.mysitehere.com !!"
}


proc show_contact {nick host hand chan text } {
  putserv "NOTICE $nick : You can contact me at my@email.com !!"
}


proc show_forums {nick host hand chan text } {
  putserv "NOTICE $nick : Check out our forums at www.mysitehere.com/forums !!"
}


proc show_staff {nick host hand chan text } {
  putserv "NOTICE $nick : the staff here, add more notices if you need"
}
you can have it send the info by pm simply by changing NOTICE with PRIVMSG
What kanibus wrote will work fine but you end up with loads and loads of binds on your bot i would suggest using something like this that will keep your binds down to a minimum.

Code: Select all

bind pub - * triggers

proc triggers {nick uhost hand chan arg} {
    set trigger [lindex [split $arg] 0]
    
    switch -exact -- [string tolower $trigger] {
        "!url" {
            putserv "NOTICE $nick :Visit us at www.mysitehere.com !!"
        }
        "!contact" {
            putserv "NOTICE $nick :You can contact me at my@email.com !!"
        }
        "!forums" {
            putserv "NOTICE $nick :Check out our forums at www.mysitehere.com/forums !!"
        }
        "!staff" {
            putserv "NOTICE $nick :the staff here, add more notices if you need"
        }
        default {
            putserv "NOTICE $nick :Unknown command: $trigger"
        }
    }
}
hope this helps. :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
k
kanibus
Halfop
Posts: 44
Joined: Tue May 03, 2005 7:22 am

Post by kanibus »

thanks for the tip doom :)
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Pleasure :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
M
Magma
Voice
Posts: 9
Joined: Fri Jun 03, 2005 7:59 pm

Post by Magma »

so if I need to add more commands later I can just add something like

Code: Select all

"!command" { 
            putserv "NOTICE $nick :info here" 
        } 
Right?

Also do I just save that into a TCL script?
D
Dizzle
Op
Posts: 109
Joined: Thu Apr 28, 2005 11:21 am
Contact:

Post by Dizzle »

Right :D
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Magma wrote:so if I need to add more commands later I can just add something like

Code: Select all

"!command" { 
            putserv "NOTICE $nick :info here" 
        } 
Right?

Also do I just save that into a TCL script?
As Dizzle Said that is correct but what he forgot to point out was it has to be above 'default' in the switch statement else you will break it ;)

And yes just save that as triggers.tcl place it into your scripts directory and load it by putting

Code: Select all

source scripts/triggers.tcl
at the bottom of your config file 8)
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
M
Magma
Voice
Posts: 9
Joined: Fri Jun 03, 2005 7:59 pm

Post by Magma »

Code: Select all

[13:36] Tcl error in file '11wpao.conf':
[13:36] missing close-brace
    while executing
"proc triggers {nick uhost hand chan arg} {
    set trigger [lindex [split $arg] 0]

    switch -exact -- [string tolower $trigger] {
        "!..."
    (file "scripts/paocommand.tcl" line 3)
    invoked from within
"source scripts/paocommand.tcl"
    (file "11wpao.conf" line 1338)
[13:36] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
Connection closed by foreign host.
what did I do wrong :s
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

you are missing a close-brace. Paste your trigger script in here so i can see it please :)
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Locked