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.

Search found 18 matches

by Seka
Fri Apr 29, 2011 9:43 am
Forum: Scripting Help
Topic: [SOLVED] Set Variable to Line in File / Write Variable
Replies: 11
Views: 7808

if {[catch {source rpday.tcl} err]} { set ::rpday 1 } set ::rpchan "#Bot_Test" bind time - "00 00 * * *" tchange proc tchange {min hour day month year} { global rpchan switch -exact -- $::rpday { 1 {putquick "TOPIC $::rpchan :It is Day One!"} 2 {putquick "TOPIC $:...
by Seka
Tue Apr 26, 2011 2:56 pm
Forum: Scripting Help
Topic: [SOLVED] How to Call a Single Variable with Multiple Values
Replies: 11
Views: 7319

That piece may be a little beyond my means, then.

I really do appreciate all of the help you've given me with all of my requests! If there was a way to bump your ID to "guru" status, I would cast my vote! :)

Thank you again, for all of your help and patience. I've learned a lot about TCL.
by Seka
Tue Apr 26, 2011 2:45 pm
Forum: Scripting Help
Topic: [SOLVED] How to Call a Single Variable with Multiple Values
Replies: 11
Views: 7319

Ah, I see.

I dropped the "then" from the statement. The part that concerns me is the string match:

Code: Select all

if {[string match -nocase -- "*$::item*" $text]} { 
Is the variable formatted properly to generate a positive match? "*$::item*" seems so convoluted.
by Seka
Tue Apr 26, 2011 2:33 pm
Forum: Scripting Help
Topic: [SOLVED] How to Call a Single Variable with Multiple Values
Replies: 11
Views: 7319

Ok. Here is what I have for both of my binds and procs. They're also both present in the same script. I'm not sure if that is going to cause a problem, in itself. I apologize for the lack of formatting. My editor doesn't appreciate TCL. foreach item $triggerwords { bind pubm - "% *${item}*"...
by Seka
Tue Apr 26, 2011 1:48 pm
Forum: Scripting Help
Topic: [SOLVED] Set Variable to Line in File / Write Variable
Replies: 11
Views: 7808

Awesome.

Solved.

Thanks again!
by Seka
Tue Apr 26, 2011 1:47 pm
Forum: Scripting Help
Topic: [SOLVED] How to Call a Single Variable with Multiple Values
Replies: 11
Views: 7319

Instead of using "*ocean*" since I stored the trigger words in $item, can I use that variable in the statement? Like below: bind pubm - $item pubm::randaction Or will that rip a whole in the universe? I can see that getting this script to do what I want is going to be a lot more effort tha...
by Seka
Tue Apr 26, 2011 1:21 pm
Forum: Scripting Help
Topic: [SOLVED] How to Call a Single Variable with Multiple Values
Replies: 11
Views: 7319

The script is working the way it should, but I have one more issue. The proc only responds when the trigger word is the first word in the post. So, it won't kick off if the word is in an "action" post or if the word is within a statement. i.e. If the trigger word is "ocean" and a...
by Seka
Tue Apr 26, 2011 1:18 pm
Forum: Scripting Help
Topic: [SOLVED] Set Variable to Line in File / Write Variable
Replies: 11
Views: 7808

Looks like that is going to do it. I just need to format my topic a little better. I can't figure out how to keep the script from thinking that the brackets in the topic are code.

Thanks for your help, NML!
by Seka
Sun Apr 24, 2011 11:46 am
Forum: Scripting Help
Topic: [SOLVED] Set Variable to Line in File / Write Variable
Replies: 11
Views: 7808

Ok. So, here's what I've got. It is untested, so far. Let me know if I need to change anything, please: set channel "#Bot_Test" # Open the TCL with the variable? set fd [open "restore" "WRONLY CREAT TRUNC"] puts $fd $rpday close $fd # Execute every day at midnight? bind...
by Seka
Fri Apr 22, 2011 11:38 am
Forum: Scripting Help
Topic: [SOLVED] Set Variable to Line in File / Write Variable
Replies: 11
Views: 7808

Thank you both for the quick responses. I was able to rig something together, using the documentation. nml375, It looks like what you're suggesting could significantly lower the amount of code in my primary script. My question is this, though. If I need to increment the value of the variable and sto...
by Seka
Fri Apr 22, 2011 9:36 am
Forum: Scripting Help
Topic: [SOLVED] Set Variable to Line in File / Write Variable
Replies: 11
Views: 7808

[SOLVED] Set Variable to Line in File / Write Variable

I am pretty sure I know how to write a variable to a line in a file. My goal here is to use an outside file to "record" the state of a variable, so that if the bot resets it doesn't forget what the variable was set to the last time it accessed the script. Let me explain. I need to incremen...
by Seka
Thu Apr 21, 2011 4:16 pm
Forum: Scripting Help
Topic: [SOLVED] Another help request: Time Driven Channel Post
Replies: 3
Views: 3019

Got it figured.
by Seka
Thu Apr 21, 2011 9:38 am
Forum: Scripting Help
Topic: [SOLVED] Another help request: Time Driven Channel Post
Replies: 3
Views: 3019

I was under the impression that I would need to convert the time to something readable, in order to use the following commands properly.

So I should remove this:

Code: Select all

set tower_time [ctime $tell_time] 
But leave in:

Code: Select all

set tell_time [lindex $args 0] 
And add the 'args' variable?
by Seka
Wed Apr 20, 2011 11:19 pm
Forum: Scripting Help
Topic: [SOLVED] Another help request: Time Driven Channel Post
Replies: 3
Views: 3019

[SOLVED] Another help request: Time Driven Channel Post

I have the following code in place: bind time - "00 * * * *" clock proc time:clock {min hour day month year} { set tell_time [lindex $args 0] set tower_time [ctime $tell_time] if {$tower_time == 12:00} { putquick "PRIVMSG $channel :\00306The clocktower tolls the Noon Bell." } els...
by Seka
Wed Apr 20, 2011 2:20 pm
Forum: Scripting Help
Topic: [SOLVED] How to Call a Single Variable with Multiple Values
Replies: 11
Views: 7319

Awesome.

I will put this together and give it a try when I get back home.

Thanks for the help!