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.

!state

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
V
ValeY
Voice
Posts: 7
Joined: Wed May 17, 2006 11:43 pm

!state

Post by ValeY »

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.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
V
ValeY
Voice
Posts: 7
Joined: Wed May 17, 2006 11:43 pm

Post by ValeY »

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: Select all

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..
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
V
ValeY
Voice
Posts: 7
Joined: Wed May 17, 2006 11:43 pm

Yes

Post by ValeY »

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.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
V
ValeY
Voice
Posts: 7
Joined: Wed May 17, 2006 11:43 pm

Request

Post by ValeY »

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?
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Code: Select all

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: Select all

CA California
CT Connecticut
V
ValeY
Voice
Posts: 7
Joined: Wed May 17, 2006 11:43 pm

thx

Post by ValeY »

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.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Re: thx

Post by Alchera »

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: Select all

CA California
CT Connecticut
AL Alabama
If so, then paste the results of (via Command Console):

Code: Select all

.set errorInfo
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
V
ValeY
Voice
Posts: 7
Joined: Wed May 17, 2006 11:43 pm

Confussed

Post by ValeY »

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
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
d
dumbro
Voice
Posts: 8
Joined: Sun May 21, 2006 12:24 am

Post by dumbro »

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 :)
Post Reply