Originally Posted By: Artiiz
Hello,

So I'm trying to make a slap command which will read several words that the targeted person can be slapped by.

The problem is that I've saved a txt doc in /scripts, as an .txt file.
When I open the file it contains this:
http://gyazo.com/5265387889561dec73581e5475a8ebfe

And I've wrote in my remote script like this:
Code:
on 1:text:slap:#artiiz:{
  msg $chan slap $nick with $read(slap.txt)
}


But it just says this:
http://gyazo.com/befa4aa20903e932845b8d32be5802d1

What do I have to do, to make the $read command read the whole file?

Appreciate all the help!

Best Regards
Artiiz


It appears you have created a file with mIRC script editor (for slap.txt) instead of creating the file outright with a text editor. I assume that the file isnt actually named slap.txt and is probably something like slap.txt.ini. The file contents is also incorrect (because of how you created it) you should create a new TEXT file and put each item you want to slap with on a new line.

If you wanted to be able to edit the file for convenience sake with the mIRC editor you can easily do something like:

Code:
on 1:TEXT:slap:#artiiz:{
    var %items an elephant,an object,a fish,a car

    msg $chan slap $nick with $gettok(%items,$rand(1,$numtok(%items,44)),44)
}

Instead of storing the slap objects in an external file.

Also if you want the slap to show up like a /me you can use /describe $chan instead of /msg $chan.