mIRC Home    About    Download    Register    News    Help

Print Thread
.txt ? #168718 12/01/07 11:44 PM
Joined: Jan 2007
Posts: 10
J
Joshee Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Jan 2007
Posts: 10
what is it and how do i use it ? smile

basicly im guessing its how you get stuff to do !fact or whatever and it gives a random one?

but can anyone shed some light on it for me?


Look ^here^ to see a scripting noob smile
Re: .txt ? [Re: Joshee] #168720 13/01/07 12:06 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
.txt is a text file. You can do many things with text files, depending on what you want to do.


Invision Support
#Invision on irc.irchighway.net
Re: .txt ? [Re: Joshee] #168721 13/01/07 12:06 AM
Joined: Jan 2007
Posts: 259
K
Kardafol Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
Its a text file, that contains text.

Usual names are readme.txt, and is most likely supplied with something you download.


Those who can, cannot. Those who cannot, can.
Re: .txt ? [Re: Joshee] #168735 13/01/07 11:25 AM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
Just to add to the answers above (and hopefully not confuse you!), a file extension does not have to specify the type of file, although it generally does.

It is possible to have a file called "readme" (with no extension) that is a text file, or a text file with the name "this_is_a_text_file.mp3". It would perhaps confuse any mp3 players, but it is possible. It's what is contained in the file that determines what type of file it is. The extension is just a nicety that (most) people agree on.

"The wonderful thing about standards is that there are so many to choose from!"


Sais
Re: .txt ? [Re: Joshee] #168736 13/01/07 11:27 AM
Joined: Dec 2005
Posts: 54
B
Bundy Offline
Babel fish
Offline
Babel fish
B
Joined: Dec 2005
Posts: 54
Microsoft Word - Notepad - and many other applications use text files (.txt) Use Google for a full explanation - 'what is a .txt file?'

Regards,

b

Re: .txt ? [Re: Bundy] #169065 18/01/07 08:23 PM
Joined: Jan 2007
Posts: 10
J
Joshee Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Jan 2007
Posts: 10
is a text file one of the things to make ur bot say random stuff from the file? if so how do i use it


Look ^here^ to see a scripting noob smile
Re: .txt ? [Re: Joshee] #169075 18/01/07 11:50 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You could store lines to say in a text file, yes. However, that's not all it is used for, nor is that the only way to have a bot say something. A text file, as mentioned, is simply a file that is (usually) used to hold text.

If you want to have a bot do something specific, it would help to explain what you want it to do and we can help you with a script to do it.


Invision Support
#Invision on irc.irchighway.net
Re: .txt ? [Re: Riamus2] #169114 19/01/07 03:36 PM
Joined: Jan 2007
Posts: 10
J
Joshee Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Jan 2007
Posts: 10
ok right specific:

CAN a text file do this:
Person:!fact
bot:*whatever fact it may be*
but it choses the fact at random?
so if the same person did it again it would do a different fact ? can it do it? and whats the script for it?


Look ^here^ to see a scripting noob smile
Re: .txt ? [Re: Joshee] #169129 19/01/07 07:47 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
on *:text:!fact:#yourchannel: {
  msg $chan $read(facts.txt)
}


Then, just have the facts in the file like:

The sky is blue.
The grass is green.
The sun rises in the morning.

Make sure that you change #yourchannel to the channel you want it in. If you want it for all channels, just put # without a channel name. Also, make sure you use the same filename in the script as what you stored the facts into.


Invision Support
#Invision on irc.irchighway.net