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.

loading tcl scripts

Old posts that have not been replied to for several years.
Locked
n
newaki
Voice
Posts: 7
Joined: Thu Dec 02, 2004 12:54 am

loading tcl scripts

Post by newaki »

Ok im very new at this. Im tryin to run to tcl scripts... one is a greeter and the other one is a file to update channel info for VB....

i put the filenames (scripts\blah.tcl) at the bottom of my conf file... but when the bot loads up and joins the channel i have no clue on how to run them...

Please help me... i have the lastest version of eggdrop

Thanks
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Maybe you should try reading any info supplied with the tcl?
n
newaki
Voice
Posts: 7
Joined: Thu Dec 02, 2004 12:54 am

Post by newaki »

all they say is to put the tcl at the buttom of the conf file and they tell em the command. like ( !refresh and !startact).... but when i type them in the bout jus repeats wha i say
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Post by Stealthx »

Load the TCL by typing source scripts/whatever.tcl and do a .rehash or .restart in your DCC chat with the bot.

If you have no idea how the bot works with the TCL, read the given syntax given in the .tcl file itself.
+ Stealth Box +
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

How about you post the code?
n
newaki
Voice
Posts: 7
Joined: Thu Dec 02, 2004 12:54 am

Post by newaki »

This stinks.... i tired it but im still gettin nothing....
<newaki> source scripts/greetd.tcl
<newaki|bot> <newaki> source scripts/greetd.tcl
<newaki> source scripts/ircrefresh.tcl
<newaki|bot> <newaki> source scripts/ircrefresh.tcl
<newaki> .rehash
<newaki|bot> [16:02] #newaki# rehash
<newaki|bot> Rehashing.
<newaki|bot> [16:02] Writing user file...
<newaki|bot> [16:02] Writing channel file...
<newaki|bot> [16:02] Rehashing ...
<newaki|bot> [16:02] Listening at telnet port 2003 (all).
<newaki|bot> [16:02] Userinfo TCL v1.07 loaded (URL BF GF IRL EMAIL DOB PHONE ICQ).
<newaki|bot> [16:02] use '.help userinfo' for commands.
<newaki|bot> [16:02] Userfile loaded, unpacking...
I get this when i try to "load" them

Here is this to scripts im tryin to use.

This is the greeter script

Code: Select all

#  Script: Greetd.tcl
# Version: 0.05b
#  Author: Jeff Fisher <fishy@dlcwest.com>
#
# Updates:
#   12Feb98 - can now select delay time (idea by Angelos7)
#
#   Notes:
#
#    - can do multi-channel multi-lined greet msgs
#    - can either msg all users or just non-users
#    - will only show the greet to one identd or non-identd within 2min
#       or whatever you change the time level too ...
#

# Who to show?
#  0 = all users
#  1 = non-users
set greetd(show) 0

# Delay time before reshowing the greet? (In minutes)
set greetd(delay) 2

# Show via PRIVMSG or NOTICE?
set greetd(method) "NOTICE"

# Greet Messages and Their Channels ...
#  - Channel names within the ( and ) must be lowercase, otherwise it wont work
#  - Example:
#      set greetd_msg(#eggdrop) {
#       "Welcome to #Eggdrop"
#       "For Eggdrop Files, try ftp.sodre.net/pub/eggdrop"
#      }
#
# Got it? Its not that hard :)

set greetd_msg(#justshare) {
 "Welcome to #JustShare"
 "Please follow the rules."
 "1) Use your forum name "/nick forumname""
 "2) DO NOT ADVERTISE!"
 "3) Do not PM any of the staff unless you have permission"
 "4) Do not herass any of the staff"

}

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

if {$greetd(delay) < 0} {set greetd(delay) 3}

bind join - *!*@* autogreet

proc autogreet {nick uhost hand chan} {
 global greetd_msg botnick greetd_queue greetd
 set chan [string tolower $chan]

 if {$nick == $botnick} {return 0}
 if {$greetd(show) == 1 && $hand != "*"} {return 0}
 if {![info exists greetd_msg($chan)]} {return 0}
 if {[info exists greetd_queue($chan![ident $uhost])]} {return 0}

 foreach i $greetd_msg($chan) {puthelp "$greetd(method) $nick :$i"}
 set greetd_queue($chan![ident $uhost]) 1
 set a [timer $greetd(delay) "unset greetd_queue($chan![ident $uhost])"]
}

proc ident {data} {
 if {[string index $data 0] == "~"} {return #@[lindex [split $data @] 1]}
 return [string range [maskhost $data] 2 end]
}

putlog "Greetd.tcl v0.05b by guppy"
This is the VB IRC Hack Script

Code: Select all

#####################################################################################
#  EGGDROP IRC MANAGER | v1.3				
#
#  Author:		Velocd				
#			(www.animesystem.com)		
#							
#  Requirements:	vBulletin 3			
#			Eggdrop (www.eggheads.org)	
#							
#  Support:		http://www.vbulletin.org/forum/showthread.php?p=476793	
#####################################################################################


#########################
####  Configuration  ####
#########################

set irc_chan "#JustShare"

# Set activity_wait to the number of 
# seconds between updates

set activity_wait 180

set vb_script "http://www.censored.com/forum/irconline.php"
set vb_key "55555"


##########################################
####  Modify below at your discretion ####
##########################################

package require http

set activity 0

# Default triggers (binds)

bind join - * refresh_users
bind nick - * refresh_users
bind mode - * refresh_users
bind part - * check_part
bind sign - * check_part
bind kick - * check_part
bind pubm - * incr_activity
bind topc - * refresh_topic

# Manual triggers (/msg <bot_nick> !<command>)
# These only work for bot owners

bind pub n !startact activity_timer
bind pub n !refresh refresh_users

proc refresh_topic {nick host hand chan topic} {
	global irc_chan vb_script vb_key

	if {$chan != $irc_chan} {
		return 0
	}

	regsub -all {\002|\003([0-9]{1,2}(,[0-9]{1,2})?)?|\017|\026|\037} $topic "" topic 

	set http_string [::http::formatQuery do refresh chan $chan key $vb_key topic $topic]

	catch [set token {::http::geturl $vb_script -query $http_string}] token
	::http::cleanup {$token}

	return 0
}

proc incr_activity {nick host hand chan {text ""}} {
	global activity irc_chan

	if {$chan != $irc_chan} {
		return 0
	}

	incr activity 1

	return 0
}

proc activity_timer {nick host hand chan {text ""}} {
	global irc_chan

	if {[utimers] != ""} {
		putserv "privmsg $nick :Timer already exist: [utimers]"
		return 0
	}

	if {$chan != $irc_chan} {
		return 0
	}

	start_timer
	
	return 0
}

proc start_timer {} {
	global activity_wait irc_chan

	utimer $activity_wait refresh_activity

	return 0
}

proc refresh_activity {} {
	global irc_chan vb_script vb_key activity

	set http_string [::http::formatQuery do refresh chan $irc_chan key $vb_key activity $activity]

	catch [set token {::http::geturl $vb_script -query $http_string}] token
	::http::cleanup {$token}

	set activity 0

	start_timer

	return 0
}

proc check_part {nick host hand chan {text ""} {misc ""}} {
	refresh_users $nick $host $hand $chan "parted"

	return 0
}

proc refresh_users {nick host hand chan {text ""} {misc ""}} {
	global irc_chan vb_script vb_key

	if {$chan != $irc_chan} {
		return 0
	}

	set ops ""
	set halfops ""
	set voiced ""
	set normal ""
	set num_users 0

	foreach user [chanlist $chan] {
		if {$user == $nick && $text == "parted"} {
			continue
		}

		if {[onchan $user $chan]} {
			incr num_users

			if {[isop $user $chan]} {
				lappend ops "@$user"
			} elseif {[ishalfop $user $chan]} {
				lappend halfops "%$user"
			} elseif {[isvoice $user $chan]} {
				lappend voiced "+$user"
			} else {
				lappend normal $user
			}
		}
	}

	set http_string [::http::formatQuery do refresh chan $chan key $vb_key online $num_users ops $ops halfops $halfops voiced $voiced normal $normal]

	catch [set token {::http::geturl $vb_script -query $http_string}] token
	::http::cleanup {$token}
	
	return 0
}
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

if you want to load a script by typing on bot's partyline, preceed what you've been typing so far with .tcl
User avatar
WeiJie
Halfop
Posts: 73
Joined: Thu May 20, 2004 9:30 pm
Location: Singapore

Post by WeiJie »

How do I load a TCL by bot's partyline (DCC Chat)?
WeiJie
Admin of IntelFusion
Http://dj-online.org
#Sparks@Boatquay @ mIRC Galaxynet
User avatar
KrzychuG
Master
Posts: 306
Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:

Post by KrzychuG »

.tcl source scripts/file.tcl
Que?
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

add
source scripts/greetd.tcl
source scripts/ircrefresh.tcl
to the bottom of your config- file. Then type
.rehash
on your bots partyline (DCC chat)
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

I think you should also try Allscripts v1.69 :)
Locked