| View previous topic :: View next topic |
| Author |
Message |
ValeY Voice
Joined: 17 May 2006 Posts: 7
|
Posted: Wed May 17, 2006 11:51 pm Post subject: !state |
|
|
Can someone here pls help me with a tcl, when a user type !state CA the eggdrop will respond with State ==> California from a .txt first with the list of states there.
I hope you understand my english. |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Thu May 18, 2006 6:08 am Post subject: |
|
|
you will have to explain/show the formating of the .txt file, else we can only gues how to parse it. _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
ValeY Voice
Joined: 17 May 2006 Posts: 7
|
Posted: Thu May 18, 2006 7:11 am Post subject: |
|
|
Oh okay.. The .txt will be called states.txt and it will contain something like this.
this is the sample of my MIRC bot script
| Code: | n6=on 1:text:!state CO*:#:chkbot | /msg # 8,1 $+ $nick 8,1=> <>8,1 CO = Colorado 8,1<>
n7=on 1:text:!state CT*:#:chkbot | /msg # 8,1 $+ $nick 8,1=> <>8,1 CT = Connecticut 8,1<>
<>8,1 HI = Hawaii 8,1<> |
can u make something like this for my eggdrop.. |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Thu May 18, 2006 8:01 am Post subject: |
|
|
| ValeY wrote: | | The .txt will be called states.txt and it will contain something like this. |
Something like what? For me the mIRC script seems to contain simply a trigger for each state and does not read any states.txt. _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
ValeY Voice
Joined: 17 May 2006 Posts: 7
|
Posted: Thu May 18, 2006 8:34 am Post subject: Yes |
|
|
| Yes, thats right, can you help me with some thing like that.. maybe help me with 3 examples. and i will edit and expand myself. |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Thu May 18, 2006 9:01 am Post subject: |
|
|
so you request a script for a .txt which doesnt exist and simply wante something else? _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
ValeY Voice
Joined: 17 May 2006 Posts: 7
|
Posted: Thu May 18, 2006 10:07 am Post subject: Request |
|
|
Let me request this way.
I need a tcl. then when users type !state CA it will respond in channel not on notice saying State ==> California. I hope you understand this way? |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Fri May 19, 2006 1:35 am Post subject: |
|
|
| Code: | set statef "state.txt"
bind pub -|- !state pub:state
proc pub:state {nick host hand chan text} {
global statef
if {[llength [split $text]] > 1} {
set data [split [read [set op [open $statef r]]] \n];close $op
foreach line $data {
if {[string equal -nocase [lindex [split $text] 0] [lindex $line 0]]} {
putquick "PRIVMSG $chan :State ==> [lindex $line 1]"; break
}
}
}
} |
Make sure your "state.txt" is formatted in shortcut fullname
for example:
| Code: | CA California
CT Connecticut |
|
|
| Back to top |
|
 |
ValeY Voice
Joined: 17 May 2006 Posts: 7
|
Posted: Fri May 19, 2006 9:35 am Post subject: thx |
|
|
Thanks for the rcl. but i dont think its working. after fxiing the state.txt and loading the tcl..
I typed !state AL on my eggdrop channel.. but i got no respond from it..
Kinda bored. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Fri May 19, 2006 7:01 pm Post subject: Re: thx |
|
|
| ValeY wrote: | Thanks for the rcl. but i dont think its working. after fxiing the state.txt and loading the tcl..
I typed !state AL on my eggdrop channel.. but i got no respond from it..
Kinda bored. |
You manually edited state.txt and added the following?
| Code: | CA California
CT Connecticut
AL Alabama |
If so, then paste the results of (via Command Console):
Simply stating "but i got no respond from it.. " means nothing. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
ValeY Voice
Joined: 17 May 2006 Posts: 7
|
Posted: Sun May 21, 2006 11:26 pm Post subject: Confussed |
|
|
| Am also confussed now. but can you help me with a read made TCL for !state i searched the whole site. i found noting good |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Mon May 22, 2006 4:11 am Post subject: |
|
|
have you put the file into the eggdrop "root" directory, meaning the one which contains the binary, .conf etc.? A "no such file" error is the only one I can gues from just looking at the code without any details about errors. If you are too bored to help us to help you, we will also be too bored to help you . _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
dumbro Voice
Joined: 21 May 2006 Posts: 8
|
Posted: Sat May 27, 2006 7:26 pm Post subject: |
|
|
dont help valey, its for his fraud network....cuz soemtime people have creditcard info, and the state is like NY and the website they are trying to order on ask for fullname... so people use !state on fraud network like valey's network  |
|
| Back to top |
|
 |
|