mIRC Homepage
Posted By: Kerry2000 Slap!:/me slaps $$1 around a large trout - 15/01/04 07:37 PM
i'm wanting to change this so that it reads from a txt file and does a random slap how do i do this?
Posted By: sparta Re: Slap!:/me slaps $$1 around a large trout - 15/01/04 07:40 PM
:/me slaps $$1 around $read $mircdirslap.txt

then add ur slaps in a file called slaps.txt
it don't work
Posted By: sparta Re: Slap!:/me slaps $$1 around a large trout - 15/01/04 07:50 PM
whats the error you get then?
it's grey and i cannot click on it when i added it to my aliases
Posted By: sparta Re: Slap!:/me slaps $$1 around a large trout - 15/01/04 07:54 PM
Slap!:/me slaps $$1 around a large trout

thats for your popup..

Slap!:/me slaps $$1 around $read $mircdirslap.txt
* Kerry|Away slaps StatServ around

This is all it does and i have added stuff to the slap.txt file
Posted By: sparta Re: Slap!:/me slaps $$1 around a large trout - 15/01/04 08:05 PM
$mircdir\slap.txt

try add that instead then
nope it didn't work
Posted By: Iori Re: Slap!:/me slaps $$1 around a large trout - 15/01/04 08:15 PM
$read(slap.txt)
* $read: invalid parameters
Posted By: EVH Re: Slap!:/me slaps $$1 around a large trout - 15/01/04 08:29 PM
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
Posted By: Iori Re: Slap!:/me slaps $$1 around a large trout - 15/01/04 08:30 PM
Check that slap.txt exists, is in the main mirc dir and contains text to read.
still not working
Posted By: sparta Re: Slap!:/me slaps $$1 around a large trout - 15/01/04 08:51 PM
/help $read
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> ...
Posted By: DaveC Re: Slap!:/me slaps $$1 around a large trout - 17/01/04 05:20 AM
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
Posted By: DaveC Re: Slap!:/me slaps $$1 around a large trout - 17/01/04 05:30 AM
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?
ok i totally give up on this, there isn't any way to do this is there?
Posted By: Iori Re: Slap!:/me slaps $$1 around a large trout - 19/01/04 08:26 PM
All of the suggestions above should work and do work for other people.
Posted By: DaveC Re: Slap!:/me slaps $$1 around a large trout - 20/01/04 02:07 AM
did you try what i suggested in the other thread of this message
https://forums.mirc.com/showthreaded.php?Cat=&Board=scriptsandpopups&Number=71706
© mIRC Discussion Forums