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.

how set trigger

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
i
imac
Voice
Posts: 5
Joined: Sat Sep 06, 2008 8:13 am

how set trigger

Post by imac »

this is my first time running eggdrop , i got everything running fine but this once script. it is dring me nuts ,, why doesnt it put out a msg in channel?

##############################################

----------------------------

# eggdrop_fta_trigger_system Ver 1.0 #

#Edit this to who you want to activate the triggers (The default is set to
#public, which means everyone can activate them)

set trigbind -|-

#Set the channels to where you want the triggers available
#I've set it up to allow you up to 3 channels, if you want more just add


set channelone "#fta4dummies"
set channeltwo "#help"
set channelthree ""

#Edit these to what ever you want the trigger names to be (IE . rules or !Help)

set trigger1 "!triggers"
set trigger2 ". ps"
set trigger3 ". vs"
set trigger4 ". sv"
set trigger5 ". cs"
set trigger6 ". cw"
set trigger7 ". ev"
set trigger8 ". satopia"
set trigger9 ". ps250 "
set trigger10 ". ps2700"
set trigger11 ". ps2800"
set trigger12 ". ps3500"
set trigger13 ". ps5000"
set trigger14 ". ps6000"
set trigger15 ". ps9000"
set trigger16 ". ps9200"
set trigger17 ". vslp"
set trigger18 ". vsx"
set trigger19 ". vspro"
set trigger20 ". vsu"
set trigger21 ". vsul"
set trigger22 ". vspvr"
set trigger23 ". vs9000"
set trigger24 ". sv1000"
set trigger25 ". sv1000pvr"
set trigger26 ". sv4000"
set trigger27 ". sv360e"
set trigger28 ". sv360p"
set trigger29 ". sv8000"

#Edit these to what ever you want to be displayed in the channel after the trigger the
#has been used, (IE if trigger1 was set to !triggers then change text1 to...
#These are the rules ect ect).

set text1 "STB's that we support are--> . ps . vs . sv . cs . cw . ev . news . satopia . icon "
set text2 "Pansat STB's---> . ps250 . ps2700 . ps2800 . ps3500 . ps5000 . ps6000 . ps9000 . ps9200"
set text3 "Viewsat STB's---> . vslp . vsx . vspro . vsu . vsul . vspvr . vs9000"
set text4 "Sonicview STB's---> . sv1000 . sv1000pvr . sv360e . sv360p . sv4000 . sv8000"
set text5 "Coolsat STB's---> . cs4000 . cs5000 . cs6000 . cs6100 . cs7000 . cs7100 . cs8000 . cs8100"
set text6 "Captiveworks STB's---> . cw600 . cw600p . cw650c . cw700 . cw800"
set text7 "Extremeview STB's---> . maggie . titan"
set text8 "Satopia & Icon STB's . sato . icon"
set text9 "The file your are requesting is located at ---> http://www.4shared.com/file/74829505/32 ... _femu.html"
set text10 "The file your are requesting is located at ---> http://www.4shared.com/file/75076693/d2 ... _femu.html"
set text11 "The file your are requesting is located at ---> http://www.4shared.com/file/74829993/3f ... llemu.html"
set text12 "The file your are requesting is located at ---> http://www.4shared.com/file/74831711/d7 ... F_Emu.html"
set text13 "The file your are requesting is located at ---> http://www.4shared.com/file/75243024/96 ... 7_api.html"
set text14 "The file your are requesting is located at ---> http://www.4shared.com/file/75243174/ea ... 8_api.html"
set text15 "The file your are requesting is located at ---> http://www.4shared.com/file/74831665/9e ... _femu.html"
set text16 "The file your are requesting is located at ---> http://www.4shared.com/file/74829952/d8 ... _femu.html"
set text17 "The file your are requesting is located at ---> http://www.4shared.com/file/74828716/96 ... 1206P.html"
set text18 "The file your are requesting is located at ---> http://www.4shared.com/file/74825923/aa ... 1206X.html"
set text19 "The file your are requesting is located at ---> http://www.4shared.com/file/74830184/ca ... 1206A.html"
set text20 "The file your are requesting is located at ---> http://www.4shared.com/file/74823116/da ... 1206U.html"
set text21 "The file your are requesting is located at ---> http://www.4shared.com/file/75550990/4f ... 211UL.html"

#Just comment out the "die" line with a #
#I put it here as a small reminder to edit this script.
#die "* [file tail [info script]]: Forgot to edit this script didn't you?"


#

#DO NOT CHANGE ANYTHING BELOW HERE

#

bind pub $trigbind $trigger1 text-1
bind pub $trigbind $trigger2 text-2
bind pub $trigbind $trigger3 text-3
bind pub $trigbind $trigger4 text-4
bind pub $trigbind $trigger5 text-5
bind pub $trigbind $trigger5 text-6
bind pub $trigbind $trigger5 text-7
bind pub $trigbind $trigger5 text-8
bind pub $trigbind $trigger5 text-9
bind pub $trigbind $trigger5 text-10

proc text-1 {n u h c a } {
global channelone
global channeltwo
global channelthree
global text1
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text1"
}
return 0
}

proc text-2 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text2
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text2"
}
return 0
}

proc text-3 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text3
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text3"
}
return 0
}

proc text-4 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text4
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text4"
}
return 0
}

proc text-5 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text5
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text5"
}
return 0
}

proc text-6 {n u h c a } {
global channelone
global channeltwo
global channelthree
global text6
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text6"
}
return 0
}

proc text-7 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text7
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text7"
}
return 0
}

proc text-8 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text8
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text8"
}
return 0
}

proc text-9 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text9
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text9"
}
return 0
}

proc text-10 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text10
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text10"
}
return 0
}
something has to be better than microsoft..oh yeah linux and eggdrp1.6.19 and unreal3.2.7
i
imac
Voice
Posts: 5
Joined: Sat Sep 06, 2008 8:13 am

Post by imac »

these links alway has to be updated .. is thier away to update the link only, like with somthing like .uptrig trigger link and have the old like removed?

also have annouce in channel that this file has been updated?

also to only let 5 officers be ablle to up date these links only?
thank you very much for reading
something has to be better than microsoft..oh yeah linux and eggdrp1.6.19 and unreal3.2.7
i
imac
Voice
Posts: 5
Joined: Sat Sep 06, 2008 8:13 am

Post by imac »

ok i figured it out....

how do i write the update trigger and announcement code ..on up date every after the ---> is link and needs to be updated..... thank you

im still working on script,, but getting close to finishing it soon it hope....

# eggdrop_fta_trigger_system Ver 1.0 #

#Edit this to who you want to activate the triggers (The default is set to
#public, which means everyone can activate them)

set trigbind "."

#Set the channels to where you want the triggers available
#I've set it up to allow you up to 3 channels, if you want more just add


set channelone "#fta4dummies"
set channeltwo "#help"
set channelthree ""

#Edit these to what ever you want the trigger names to be (IE . rules or !Help)

set trigger1 ".triggers"
set trigger2 ".ps"
set trigger3 ".vs"
set trigger4 ".sv"
set trigger5 ".cs"
set trigger6 ".cw"
set trigger7 ".ev"
set trigger8 ".satopia"
set trigger9 ".ps250"
set trigger10 ".ps2700"
set trigger11 ".ps2800"
set trigger12 ".ps3500"
set trigger13 ".ps5000"
set trigger14 ".ps6000"
set trigger15 ".ps9000"
set trigger16 ".ps9200"
set trigger17 ".vslp"
set trigger18 ".vsx"
set trigger19 ".vspro"
set trigger20 ".vsu"
set trigger21 ".vsul"
set trigger22 ".vspvr"
set trigger23 ".vs9000"
set trigger24 ".sv1000"
set trigger25 ".sv1000pvr"
set trigger26 ".sv4000"
set trigger27 ".sv360e"
set trigger28 ".sv360p"
set trigger29 ".sv8000"
set trigger30 ".vsu"
set trigger31 ".vsul"
set trigger32 ".vspvr"
set trigger33 ".vs9000"
set trigger34 ".sv1000"
set trigger35 ".sv1000pvr"
set trigger36 ".sv4000"
set trigger37 ".sv360e"
set trigger38 ".sv360p"
set trigger39 ".sv8000"
set trigger40 ".sv8000"



#Edit these to what ever you want to be displayed in the channel after the trigger the
#has been used, (IE if trigger1 was set to !triggers then change text1 to...
#These are the rules ect ect).

set text1 "\002\00306 STB's that we support are--> .ps | .vs | .sv | .cs | .cw | .ev | .news | .satopia | .icon \003\002"
set text2 "\002\00306 Pansat STB's---> .ps250 .ps2700 .ps2800 .ps3500 .ps5000 .ps6000 .ps9000 .ps9200 \003\002"
set text3 "\002\00306 Viewsat STB's---> .vslp .vsx .vspro .vsu .vsul .vspvr .vs9000 \003\002"
set text4 "\002\00306 Sonicview STB's---> .sv1000 .sv1000pvr .sv360e .sv360p .sv4000 .sv8000 \003\002"
set text5 "\002\00306 Coolsat STB's---> .cs4000 .cs5000 .cs6000 .cs6100 .cs7000 .cs7100 .cs8000 .cs8100 \003\002"
set text6 "\002\00306Captiveworks STB's---> .cw600 .cw600p .cw650c .cw700 .cw800 \003\002"
set text7 "\002\00306 Extremeview STB's---> .maggie .titan \003\002"
set text8 "\002\00306 Satopia & Icon STB's .sato .icon\003\002"
set text9 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/74829505/32 ... _femu.html"
set text10 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/75076693/d2 ... _femu.html"
set text11 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/74829993/3f ... llemu.html"
set text12 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/74831711/d7 ... F_Emu.html"
set text13 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/75243024/96 ... 7_api.html"
set text14 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/75243174/ea ... 8_api.html"
set text15 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/74831665/9e ... _femu.html"
set text16 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/74829952/d8 ... _femu.html"
set text17 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/74828716/96 ... 1206P.html"
set text18 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/74825923/aa ... 1206X.html"
set text19 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/74830184/ca ... 1206A.html"
set text20 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/74823116/da ... 1206U.html"
set text21 "\002\00306The file your are requesting is located at --->\003\002 http://www.4shared.com/file/75550990/4f ... 211UL.html"

set text22 "The file your are requesting is located at ---> http://www.4shared.com/file/74829505/32 ... _femu.html"
set text23 "The file your are requesting is located at ---> http://www.4shared.com/file/75076693/d2 ... _femu.html"
set text24 "The file your are requesting is located at ---> http://www.4shared.com/file/74829993/3f ... llemu.html"
set text25 "The file your are requesting is located at ---> http://www.4shared.com/file/74831711/d7 ... F_Emu.html"
set text26 "The file your are requesting is located at ---> http://www.4shared.com/file/75243024/96 ... 7_api.html"
set text27 "The file your are requesting is located at ---> http://www.4shared.com/file/75243174/ea ... 8_api.html"
set text28 "The file your are requesting is located at ---> http://www.4shared.com/file/74831665/9e ... _femu.html"
set text29 "The file your are requesting is located at ---> http://www.4shared.com/file/74829952/d8 ... _femu.html"
set text30 "The file your are requesting is located at ---> http://www.4shared.com/file/74828716/96 ... 1206P.html"
set text31 "The file your are requesting is located at ---> http://www.4shared.com/file/74825923/aa ... 1206X.html"
set text32 "The file your are requesting is located at ---> http://www.4shared.com/file/74830184/ca ... 1206A.html"
set text33 "The file your are requesting is located at ---> http://www.4shared.com/file/74823116/da ... 1206U.html"
set text34 "The file your are requesting is located at ---> http://www.4shared.com/file/75550990/4f ... 211UL.html"
set text35 "The file your are requesting is located at ---> http://www.4shared.com/file/74829952/d8 ... _femu.html"
set text36 "The file your are requesting is located at ---> http://www.4shared.com/file/74828716/96 ... 1206P.html"
set text37 "The file your are requesting is located at ---> http://www.4shared.com/file/74825923/aa ... 1206X.html"
set text38 "The file your are requesting is located at ---> http://www.4shared.com/file/74830184/ca ... 1206A.html"
set text39 "The file your are requesting is located at ---> http://www.4shared.com/file/74823116/da ... 1206U.html"
set text40 "The file your are requesting is located at ---> http://www.4shared.com/file/75550990/4f ... 211UL.html"






#Just comment out the "die" line with a #
#I put it here as a small reminder to edit this script.
#die "* [file tail [info script]]: Forgot to edit this script didn't you?"


#

#DO NOT CHANGE ANYTHING BELOW HERE

#

bind pub $trigbind $trigger1 text-1
bind pub $trigbind $trigger2 text-2
bind pub $trigbind $trigger3 text-3
bind pub $trigbind $trigger4 text-4
bind pub $trigbind $trigger5 text-5
bind pub $trigbind $trigger6 text-6
bind pub $trigbind $trigger7 text-7
bind pub $trigbind $trigger8 text-8
bind pub $trigbind $trigger9 text-9
bind pub $trigbind $trigger10 text-10
bind pub $trigbind $trigger11 text-11
bind pub $trigbind $trigger12 text-12
bind pub $trigbind $trigger13 text-13
bind pub $trigbind $trigger14 text-14
bind pub $trigbind $trigger15 text-15
bind pub $trigbind $trigger16 text-16
bind pub $trigbind $trigger17 text-17
bind pub $trigbind $trigger18 text-18
bind pub $trigbind $trigger19 text-19
bind pub $trigbind $trigger20 text-20
bind pub $trigbind $trigger21 text-21
bind pub $trigbind $trigger22 text-22
bind pub $trigbind $trigger23 text-23
bind pub $trigbind $trigger24 text-24
bind pub $trigbind $trigger25 text-25
bind pub $trigbind $trigger26 text-26
bind pub $trigbind $trigger27 text-27
bind pub $trigbind $trigger28 text-28
bind pub $trigbind $trigger29 text-29
bind pub $trigbind $trigger30 text-30
bind pub $trigbind $trigger31 text-31
bind pub $trigbind $trigger32 text-32
bind pub $trigbind $trigger33 text-33
bind pub $trigbind $trigger34 text-34
bind pub $trigbind $trigger35 text-35
bind pub $trigbind $trigger36 text-36
bind pub $trigbind $trigger37 text-37
bind pub $trigbind $trigger38 text-38
bind pub $trigbind $trigger39 text-39
bind pub $trigbind $trigger40 text-40




proc text-1 {n u h c a } {
global channelone
global channeltwo
global channelthree
global text1
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text1"
}
return 0
}

proc text-2 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text2
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text2"
}
return 0
}

proc text-3 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text3
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text3"
}
return 0
}

proc text-4 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text4
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text5"
}
return 0
}

proc text-5 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text5
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text5"
}
return 0
}

proc text-6 {n u h c a } {
global channelone
global channeltwo
global channelthree
global text6
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text6"
}
return 0
}

proc text-7 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text`7
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text7"
}
return 0
}

proc text-8 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text8
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text8"
}
return 0
}

proc text-9 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text9
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text9"
}
return 0
}

proc text-10 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text10
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text10"
}
return 0
}

proc text-11 {n u h c a } {
global channelone
global channeltwo
global channelthree
global text11
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text11"
}
return 0
}

proc text-12 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text12
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text12"
}
return 0
}

proc text-13 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text13
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text13"
}
return 0
}

proc text-14 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text14
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text14"
}
return 0
}

proc text-15 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text15
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text15"
}
return 0
}

proc text-16 {n u h c a } {
global channelone
global channeltwo
global channelthree
global text16
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text16"
}
return 0
}

proc text-17 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text17
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text17"
}
return 0
}

proc text-18 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text18
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text18"
}
return 0
}

proc text-19 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text19
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text19"
}
return 0
}

proc text-20 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text20
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text20"
}
return 0
}

proc text-21 {n u h c a } {
global channelone
global channeltwo
global channelthree
global text21
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text21"
}
return 0
}

proc text-22 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text22
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text22"
}
return 0
}

proc text-23 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text23
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text23"
}
return 0
}

proc text-24 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text24
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text24"
}
return 0
}

proc text-25 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text25
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text25"
}
return 0
}

proc text-26 {n u h c a } {
global channelone
global channeltwo
global channelthree
global text26
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text26"
}
return 0
}

proc text-27 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text27
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text27"
}
return 0
}

proc text-28 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text28
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text28"
}
return 0
}

proc text-29 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text29
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text29"
}
return 0
}

proc text-30 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text30
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text30"
}
return 0
}


proc text-31 {n u h c a } {
global channelone
global channeltwo
global channelthree
global text31
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text31"
}
return 0
}

proc text-32 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text32
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text32"
}
return 0
}

proc text-33 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text33
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text33"
}
return 0
}

proc text-34 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text34
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text34"
}
return 0
}

proc text-35 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text35
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text35"
}
return 0
}

proc text-16 {n u h c a } {
global channelone
global channeltwo
global channelthree
global text36
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text36"
}
return 0
}

proc text-17 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text37
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text37"
}
return 0
}

proc text-38 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text38
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text38"
}
return 0
}

proc text-39 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text39
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text39"
}
return 0
}

proc text-40 {n u h c a} {
global channelone
global channeltwo
global channelthree
global text40
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text40"
}
return 0
}
something has to be better than microsoft..oh yeah linux and eggdrp1.6.19 and unreal3.2.7
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

I changed your script a bit (Not tested):

Code: Select all

# setudef creates a new channel setting...
# use ".chanset #chan +fta" to enable the script in your channel(s)
setudef flag fta

# an array for info commands (fill inn the rest of triggers and texts 1-8 here)
set ftac(.triggers) "\002\00306 STB's that we support are--> .ps | .vs | .sv | .cs | .cw | .ev | .news | .satopia | .icon \003\002"
set ftac(.ps) "... etc"

# array for url commands (move your triggers and urls from text 9-40 here)
set ftau(.ps250) "http://whatever..."

# file for saving urls:
set ftafile fta.urls.tcl

# display ftac-messages:
proc fta_cmd {trigger n u h c a} {
	if {[channel get $c fta]} {
		puthelp "PRIVMSG $c :$::ftac($trigger)"
	}
}

# display ftau messages with a prefix:
proc fta_url {trigger n u h c a} {
	if {[channel get $c fta]} {
		puthelp "PRIVMSG $c :\002\00306The file your are requesting is located at --->\003\002 $::ftau($trigger)"
	}
}

proc fta_change_url {n u h a} {
	global ftau
	if {[scan $a %s%s trigger url]==2} {
		if {[info exists ftau($trigger)]} {
			if {[regexp -- {^https?://.+} $url]} {
				set ftau($trigger) $url
				set msg "Updated url for $trigger: $url"
				foreach c [channels] {
					if {[botonchan $c]&&[channel get $c fta]} {
						puthelp "PRIVMSG $c :$msg"
					}
				}
				if {[catch {savearray ftau $::ftafile} err]} {
					puthelp "PRIVMSG $n :error saving urls: $err (but my internal list was still updated)"
				} else {
					puthelp "PRIVMSG $n :updated."
				}
			} else {
				puthelp "PRIVMSG $n :invalid url ($url) http:// or https:// required."
			}
		} else {
			puthelp "PRIVMSG $n :invalid trigger ($trigger)"
		}
	} else {
		puthelp "PRIVMSG $n :Usage: $::lastbind <trigger> <new url>"
	}
}

# this proc will save an array as tcl code
proc savearray {array file {mode w}} {
	upvar 1 $array var
	set f [open $file $mode]
	if {[array exists var]} {
		puts $f [list array set $array [array get var]]
	}
	close $f
}

# create the binds and load url file:
proc fta_init {} {
	global ftafile ftau
	if {[file exists $ftafile]&&[catch {source $ftafile} err]} {
		putlog "eggdrop_fta_trigger_system Ver 1.0.1 (ERROR loading url file: $err)"
	} else {
		putlog "eggdrop_fta_trigger_system Ver 1.0.1"
	}
	# info commands
	foreach trigger [array names ::ftac] {
		bind pub - $trigger [list fta_cmd $trigger]
	}
	# url commands
	foreach trigger [array names ::ftau] {
		bind pub - $trigger [list fta_url $trigger]
	}
	# update url command (MSG!)
	bind msg n .ftaurl fta_change_url
}

fta_init
Edit: fixed loading problem and added global update spam.
Last edited by user on Sat Dec 27, 2008 4:27 pm, edited 2 times in total.
Have you ever read "The Manual"?
I
IRC_MAC
Voice
Posts: 18
Joined: Sat Dec 13, 2008 7:52 pm

Post by IRC_MAC »

to tell you the truth no.. i only got into this just about 3 weeks ago, never even heard of eggdrop, but my firends talked me into this. along with my ham buddies, so im stuck. but i like to learn new things all the time. my son says im to old for this stuff. it keeps me busy and out of trobble.. o lost my glass... cant see the screen..... what was the trigger to update? you should see the glass's i have to wear for computer work lol, omg
thank you so very much man... god bless you
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Code: Select all

/msg <bot> .ftaurl <trigger> <url>
The trigger must exist, the url must start with http:// or https:// and the bot must know you as its owner.
Have you ever read "The Manual"?
I
IRC_MAC
Voice
Posts: 18
Joined: Sat Dec 13, 2008 7:52 pm

Post by IRC_MAC »

i do a .chanset #fta4dummies +fta
and i get
Error trying to set +fta for #fta4dummies, invalid mode.
I
IRC_MAC
Voice
Posts: 18
Joined: Sat Dec 13, 2008 7:52 pm

Post by IRC_MAC »

oh its working now!!!!! works great! thank you.. any way we can had that update message to put out in channel with the name of the file that was just uploasded, so the people know when their file is in?
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Do you mean when a url is changed?
Do you want this message displayed in all channels that are +fta?
Have you ever read "The Manual"?
I
IRC_MAC
Voice
Posts: 18
Joined: Sat Dec 13, 2008 7:52 pm

Post by IRC_MAC »

yes. this way they know when thier file is in. so they dont bang the bot.
when they change the files i get sometimes 300 to 600 people are going to be banging the bot.
I
IRC_MAC
Voice
Posts: 18
Joined: Sat Dec 13, 2008 7:52 pm

Post by IRC_MAC »

when doing/msg binmonster .ftaurl .vsx http://......... it says it updated but when i rehash eggdrop it goes back to the original file that was written in by hand..

any idea?
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Try the edited version.
Have you ever read "The Manual"?
I
IRC_MAC
Voice
Posts: 18
Joined: Sat Dec 13, 2008 7:52 pm

Post by IRC_MAC »

thank you user for it works great, the only problem is it doesnt save the updated file. when i rehash server it goes back the the orignal date file i typed in 12-06-08 the new file is 12-22-08 and it says irs updated and it puts it out on the channel so everyone wont bang the bot.. but doesnt save the new url...

thnx for all ur help
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

IRC_MAC wrote:when i rehash server it goes back the the orignal date file
I forgot to make the url array global when loading urls... try the edited version.
Have you ever read "The Manual"?
I
IRC_MAC
Voice
Posts: 18
Joined: Sat Dec 13, 2008 7:52 pm

Post by IRC_MAC »

great job! user..... works great,, i should hire you to write the other stuff i have been looking for a welcome script that would post out more that one sentence...i need something thats about 10 sentences long.. for all the info. but that has to be a private msg. i dont want the bot spaming all that info on channel... you do great work user ...............
thnx
now im trying to learn joomla.....what joy!!!!
Post Reply