botlending forum  

Go Back   botlending forum > Eggdrop & TCL > Tcl scripting

Tcl scripting Tcl scripting related questions

Reply
 
LinkBack Thread Tools Display Modes
Old 15-10-2005, 01:26   #1 (permalink)
Junior Member
 
UltraS99's Avatar
 
Join Date: Dec 2004
Location: Cu mata in dormitor
Age: 20
Posts: 46
Rep Power: 0
UltraS99 is an unknown quantity at this point
Post comenzi !plata !service etc

As dori si eu un tcl cu !plata !servici ...... pentru un canal de psybnc/..... imi poate da si mie cineva un tcl va rog frumos ca imi trebuie si mie
UltraS99 is offline   Reply With Quote
Old 15-10-2005, 12:31   #2 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 221
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

am lucrat la ceva. E ff simplu dar ar trebui sa mearga.

Code:
## aici setezi ce vrei sa zica cand se da pe canal comanda !psybnc
set psybnc {
"line 1"
"line 2"
}

## aici setezi ce vrei sa zica cand se da pe canal comanda !eggdrop
set eggdrop {
"line 1"
"line 2"
}

## aici setezi ce vrei sa zica cand se da pe canal comanda !shell
set shell {
"line 1"
"line 2"
}

## aici setezi ce vrei sa zica cand se da pe canal comanda !plata
set plata {
"line 1"
"line 2"
}


## aici setezi ce vrei sa zica cand se da pe canal cimanda !vhosts
set vhosts {
"line 1"
"line 2"
}

## aici setezi ce vrei sa zica cand se da pe canal comanda !contact
set contact {
"line 1"
"line 2"
}








bind pub - !psybnc pub:psybnc
proc pub:psybnc {nick uhost hand chan text} {
global psybnc
foreach line $psybnc { puthelp "NOTICE $nick :$line" }
}

bind pub - !eggdrop pub:eggdrop
proc pub:eggdrop {nick uhost hand chan text} {
global eggdrop
foreach line $eggdrop { puthelp "NOTICE $nick :$line" }
}

bind pub - !shell pub:shell
proc pub:shell {nick uhost hand chan text} {
global shell
foreach line $shell { puthelp "NOTICE $nick :$line" }
}

bind pub - !plata pub:plata
proc pub:plata {nick uhost hand chan text} {
global plata
foreach line $plata { puthelp "NOTICE $nick :$line" }
}


bind pub - !vhosts pub:vhosts
proc pub:vhosts {nick uhost hand chan text} {
global vhosts
foreach line $vhosts { puthelp "NOTICE $nick :$line" }
}


bind pub - !contact pub:contact
proc pub:contact {nick uhost hand chan text} {
global contact
foreach line $contact { puthelp "NOTICE $nick :$line" }
}

daca apar probleme dai reply aci cu eroarea

si cine se pricepe sa faca un antiflood il rog sa posteze k sa vad si eu cum se face si k sa nu riscam sa supunem botul lui UltraS99 la flood
arcade is offline   Reply With Quote
Old 15-10-2005, 22:16   #3 (permalink)
Member
 
Kurupt's Avatar
 
Join Date: Jun 2004
Location: Hermannstadt
Age: 24
Posts: 108
Rep Power: 36
Kurupt will become famous soon enough
Send a message via Yahoo to Kurupt
Default

arcade sper ca nu te superi daca iti dau niste sfaturi/tips
E un script functional dar cu prea multe linii si prea multe lucruri in plus, ai putea face asa ceva folosind mult mai putine linii de cod.

Citeste:
http://www.tcl.tk/man/tcl8.5/TclCmd/array.htm

Code:
    (6)  PUBM (stackable)
         bind pubm <flags> <mask> <proc>
         procname <nick> <user@host> <handle> <channel> <text>

         Description: just like MSGM, except it's triggered by things said
           on a channel instead of things /msg'd to the bot. The mask is
           matched against the channel name followed by the text and can
           contain wildcards. Also, if a line triggers a PUB bind, it will not
           trigger a PUBM bind.
         Module: irc
Ai putea face un bind pubm - * proc
si ai pune !commands !eggs la cuvinte keye

P.S Nu am timp sa termin cod, dar o sa il pun in 2/3 zile.
__________________
Owner of #ro-tcl
Kurupt is offline   Reply With Quote
Old 16-10-2005, 22:28   #4 (permalink)
Member
 
Kurupt's Avatar
 
Join Date: Jun 2004
Location: Hermannstadt
Age: 24
Posts: 108
Rep Power: 36
Kurupt will become famous soon enough
Send a message via Yahoo to Kurupt
Default

Aici:
Code:
## $Id: prices.tcl, version 0.0 , ggdrop-1.6.x 2005 dpgc@purehype.net Exp $
## Author:   Kurupt                                    
## Info:     Will responde for some commands
## Thanks to:
#            smart@UnderNet#ro-tcl     
#
## Contact:  mail: dpgc@purehype.net    
#            irc : #ro-tcl (on undernet)
#            web : http://k.aitia.info


## START    

# cuvintele

# Variabile
set price(psybnc) {
"haribo macht kinder froh linie 1"
"linie 2"
}
set price(eggdrop) {"haribo macht kinder froh linie 1"}
set price(shell) {"haribo macht kinder froh linie 1"}
set price(vhost) {"haribo macht kinder froh linie 1"}
set price(plata) {"haribo macht kinder froh linie 1"}
set price(contact) {"haribo macht kinder froh linie 1"}

#seteaza cuvintele
set price(1) "!psybnc"
set price(2) "!eggdrop"
set price(3) "!shell"
set price(4) "!vhost"
set price(5) "!plata"
set price(6) "!contact"

## BINDS
bind pub - $price(1) {price $price(psybnc)}
bind pub - $price(2) {price $price(eggdrop)}
bind pub - $price(3) {price $price(shell)}
bind pub - $price(4) {price $price(vhost)}
bind pub - $price(5) {price $price(plata)}
bind pub - $price(6) {price $price(contact)}

proc price {num nick uhost hand chan text} {
foreach haribo $num {
putmsg $chan "$haribo"
  }
}

   
putlog "price loaded"

P.S. Nu am avut timp sa implementez flood protect, pentru bugs sau cereri postati aici,
__________________
Owner of #ro-tcl

Last edited by Kurupt; 16-11-2006 at 19:50.
Kurupt is offline   Reply With Quote
Old 17-10-2005, 01:17   #5 (permalink)
Junior Member
 
UltraS99's Avatar
 
Join Date: Dec 2004
Location: Cu mata in dormitor
Age: 20
Posts: 46
Rep Power: 0
UltraS99 is an unknown quantity at this point
Post

Da cum face sa dea prin notice nu vreau sa dea msg pe canal vreau sa dea notice la acea persona care da comanda
UltraS99 is offline   Reply With Quote
Old 17-10-2005, 03:53   #6 (permalink)
Member
 
Join Date: Jun 2004
Location: Canada
Age: 18
Posts: 141
Rep Power: 0
AdrianK is on a distinguished road
Default

Code:
 proc price {num nick uhost hand chan text} {
putmsg $chan "$num"
  }
inlocueshti cu
Code:
 proc price {num nick uhost hand chan text} {
puthelp "NOTICE $chan :$num"
  }
AdrianK is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comenzi BOT oxyg3n a&a light script 10 28-04-2006 09:45
ma intereseaza niste comenzi solitare #a&a 1 26-01-2005 17:12
public comenzi cu nickul botului ca prefix si semnele in fata comenzilor Kurupt Tcl scripting 9 04-08-2004 03:15


All times are GMT +3. The time now is 14:09.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.