View unanswered posts | View active topics It is currently Sun Dec 29, 2024 6:37 am



Reply to topic  [ 6 posts ] 
 Help with mIRC script. 
Author Message
User avatar

Joined: Tue Oct 30, 2007 4:02 pm
Posts: 1434
Reply with quote
Post Help with mIRC script.
Lately I've been doing some little things on mIRC, mostly very simple things. Now I want to do something different.

Let's say that I have a .txt called list.txt composed by:

2(number of lines)
crap
vomit

Now I want someone to be able to input !search or /search (doesn't really matter to me) and be able to compare what's written after the !search with what's inside the file.
So that when someone inputs !search crap a message is forwarded to the user that inputed the message saying that what he searched exists.

Thanks in advance.


Tue Sep 09, 2008 6:25 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Help with mIRC script.
/help $read


Wed Sep 10, 2008 12:39 am
Profile
User avatar

Joined: Tue Oct 30, 2007 4:02 pm
Posts: 1434
Reply with quote
Post Re: Help with mIRC script.
Falcon X wrote:
Grif wrote:
/help $read

This is a very helpful post. Take notes guys.


Indeed.

Anyway would this be correct?

Code:
on *:TEXT:!search*:#chan: {
  $read(list.txt, w,  *$2*)
}


Wed Sep 10, 2008 1:49 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Help with mIRC script.
And then if it returns true have it /msg the chan something confirming that.

But yes, that's basically it.

FalconX: Helping and coddling do not have to be synonymous. Making a script for him doesn't get him to learn.


Wed Sep 10, 2008 1:55 am
Profile
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post Re: Help with mIRC script.
FoiL wrote:
Falcon X wrote:
Grif wrote:
/help $read

This is a very helpful post. Take notes guys.


Indeed.

Anyway would this be correct?

Code:
on *:TEXT:!search*:#chan: {
  $read(list.txt, w,  *$2*)
}


#chan? What. Did you mean $chan(Which wouldn't work there)? Or is it actually a channel called #chan? For any channel it's #.

Also get on our IRC if you want real help besides me giving you the answers.

Code:
on *:TEXT:!search *:#: {
  if ( $read(list.txt, w, * $+ $2 $+ *) ) {
    /msg $chan This word is in my database.
  }
}


Wed Sep 10, 2008 2:00 am
Profile
User avatar

Joined: Tue Oct 30, 2007 4:02 pm
Posts: 1434
Reply with quote
Post Re: Help with mIRC script.
Daman wrote:
#chan? What. Did you mean $chan(Which wouldn't work there)? Or is it actually a channel called #chan? For any channel it's #.

Also get on our IRC if you want real help besides me giving you the answers.

Code:
on *:TEXT:!search *:#: {
  if ( $read(list.txt, w, * $+ $2 $+ *) ) {
    /msg $chan This word is in my database.
  }
}


Thanks, that works(captain obvious no?).

The #chan was a generic channel, I'm making tests with some things and I don't want my scripts to kick in every time.

I'm on my way to irc now.


Wed Sep 10, 2008 2:15 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.109s | 13 Queries | GZIP : Off ]