egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

!state

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
ValeY
Voice


Joined: 17 May 2006
Posts: 7

PostPosted: Wed May 17, 2006 11:51 pm    Post subject: !state Reply with quote

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Thu May 18, 2006 6:08 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
ValeY
Voice


Joined: 17 May 2006
Posts: 7

PostPosted: Thu May 18, 2006 7:11 am    Post subject: Reply with quote

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Thu May 18, 2006 8:01 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
ValeY
Voice


Joined: 17 May 2006
Posts: 7

PostPosted: Thu May 18, 2006 8:34 am    Post subject: Yes Reply with quote

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Thu May 18, 2006 9:01 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
ValeY
Voice


Joined: 17 May 2006
Posts: 7

PostPosted: Thu May 18, 2006 10:07 am    Post subject: Request Reply with quote

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
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Fri May 19, 2006 1:35 am    Post subject: Reply with quote

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
View user's profile Send private message
ValeY
Voice


Joined: 17 May 2006
Posts: 7

PostPosted: Fri May 19, 2006 9:35 am    Post subject: thx Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri May 19, 2006 7:01 pm    Post subject: Re: thx Reply with quote

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):
Code:
.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
Back to top
View user's profile Send private message Visit poster's website
ValeY
Voice


Joined: 17 May 2006
Posts: 7

PostPosted: Sun May 21, 2006 11:26 pm    Post subject: Confussed Reply with quote

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Mon May 22, 2006 4:11 am    Post subject: Reply with quote

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 Smile.
_________________
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
View user's profile Send private message MSN Messenger
dumbro
Voice


Joined: 21 May 2006
Posts: 8

PostPosted: Sat May 27, 2006 7:26 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber