mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Joined: Jan 2004
Posts: 13
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2004
Posts: 13
i'm wanting to change this so that it reads from a txt file and does a random slap how do i do this?

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
:/me slaps $$1 around $read $mircdirslap.txt

then add ur slaps in a file called slaps.txt


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Jan 2004
Posts: 13
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2004
Posts: 13
it don't work

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
whats the error you get then?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Jan 2004
Posts: 13
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2004
Posts: 13
it's grey and i cannot click on it when i added it to my aliases

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Slap!:/me slaps $$1 around a large trout

thats for your popup..

Slap!:/me slaps $$1 around $read $mircdirslap.txt


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Jan 2004
Posts: 13
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2004
Posts: 13
* Kerry|Away slaps StatServ around

This is all it does and i have added stuff to the slap.txt file

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
$mircdir\slap.txt

try add that instead then


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Jan 2004
Posts: 13
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2004
Posts: 13
nope it didn't work

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
$read(slap.txt)

Joined: Jan 2004
Posts: 13
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2004
Posts: 13
* $read: invalid parameters

Joined: Oct 2003
Posts: 273
E
EVH Offline
Fjord artisan
Offline
Fjord artisan
E
Joined: Oct 2003
Posts: 273
lol do this

type /write slap.txt around a bit with a baseball bat.

or

type /write slap.txt around a bit with the mirc.hlp file.

and then try

Last edited by EVH; 15/01/04 08:32 PM.
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Check that slap.txt exists, is in the main mirc dir and contains text to read.

Joined: Jan 2004
Posts: 13
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2004
Posts: 13
still not working

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
/help $read


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
alias slap {
  var %filename = slap.txt
  if (!$isfile(%filename)) {
    /write %filename around a bit with a large trout
    /write %filename around with volume 1 of Windows for dummies
    /write %filename with an economy sized butterfinger bar.
  }
  /me slaps $$1 $read(%filename)
}
menu nicklist {
  Slap $$1 (Text File): /slap $$1
}

Add more lines to slap.txt that would follow /me slaps <name> ...


-KingTomato
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
replace
Slap!:/me slaps $$1 around a large trout

with
Slap!:/me slaps $$1 $read(slaps.txt)

now type this in mirc
/write -c slaps.txt around a large trout
/write slaps.txt around with two large trout

and if u want to add some more type in mirc
/run notepad slaps.txt

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
oh man, i couldnt even get $read to come back with a
* $read: invalid parameters

tried all types of things
//echo . $read()
//echo . $read(slap.txt,a,14)
//echo . $read(?lap.txt)
etc etc

even
/mkdir slap.txt
//echo . $read(slap.txt)
just came back as
.

i wonder what it was?

Joined: Jan 2004
Posts: 13
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2004
Posts: 13
ok i totally give up on this, there isn't any way to do this is there?

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
All of the suggestions above should work and do work for other people.

Page 1 of 2 1 2

Link Copied to Clipboard