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.
Old posts that have not been replied to for several years.
hikaro
Halfop
Posts: 68 Joined: Wed Mar 10, 2004 4:29 am
Post
by hikaro » Sat Nov 13, 2004 2:12 pm
Hi anyone pls have time to make me tcl script please...
i want it like this, when ppls type !score on main the bot will msg the nick all file in score.txt (folder eggdrop). And i want to add like this, the bot master just need /msg botnick !update file file file file . and it will replace all the older file ( means older files deleted ).
anyone please? i really need this script thx
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Sat Nov 13, 2004 2:24 pm
You'll find the info you need to read from a file
here.
hikaro
Halfop
Posts: 68 Joined: Wed Mar 10, 2004 4:29 am
Post
by hikaro » Sat Nov 13, 2004 2:36 pm
thanks for fast reply,i read it but i still cant get it ;(
i'm newbie here, can someone else script it for me please..
]Kami[
Owner
Posts: 590 Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:
Post
by ]Kami[ » Sat Nov 13, 2004 4:23 pm
I think there was a rule about topic name....
hikaro
Halfop
Posts: 68 Joined: Wed Mar 10, 2004 4:29 am
Post
by hikaro » Sat Nov 13, 2004 5:51 pm
yea i read it and try also but cant, i just dont know how to make it like when i pv it will del the old file and replace with new one...
someone please help me make it, i will really appreciate it.
thanks
]Kami[
Owner
Posts: 590 Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:
Post
by ]Kami[ » Sat Nov 13, 2004 6:26 pm
Check
this . I don't really know what you mean with update thingie.
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Sat Nov 13, 2004 9:04 pm
Your topic name is actually not right, In your topic title it says help you make a script, but your asking us to make you a script, you don't seem to do any effort yourself :p
hikaro
Halfop
Posts: 68 Joined: Wed Mar 10, 2004 4:29 am
Post
by hikaro » Sun Nov 14, 2004 4:34 am
thx ]kami[...
yea the script i want is like that but i want it auto update when the owner or master of the bot msg the bot like (/msg botnick !update file file file) the bot will replace the old file in .txt with the new one... thats where i stuck....
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Sun Nov 14, 2004 10:59 am
post the code you got so far, and maybe we can tell what's wrong with it.
hikaro
Halfop
Posts: 68 Joined: Wed Mar 10, 2004 4:29 am
Post
by hikaro » Sun Nov 14, 2004 11:47 am
Code: Select all
bind pub -|- "!score" pub:score
bind msg m "!update" msg:update
proc pub:score {nick host hand chan arg} {
set fname [open score.txt r]
while {![eof $fname]} {
set scored [gets $fname]
putquick "PRIVMSG $chan :$scored"
}
close $fname
}
proc msg:update {nick host hand chan arg} {
i just can do like that, i dont know how to make it auto replace from old file to new file... anyone please?[/quote]
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Sun Nov 14, 2004 12:47 pm
Code: Select all
bind msg m update p
proc p {n u h t} {
set t [split $t]
set old [lindex $t 0]
set new [lindex $t 1]
exec mv $new $old
}
hikaro
Halfop
Posts: 68 Joined: Wed Mar 10, 2004 4:29 am
Post
by hikaro » Sun Nov 14, 2004 1:02 pm
demon thx for your reply, but it doesnt work....
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Sun Nov 14, 2004 2:42 pm
hikaro wrote: demon thx for your reply, but it doesnt work....
then specify the
exact format of update command, or tweak this to work yourself