mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2015
Posts: 16
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2015
Posts: 16
so basically what im trying to do is get a result like this

!adventure "into a cave and"

Nick adventured into a cave and "result from text file would go here".

on *:TEXT:*!adventure*:#: {
if ((%floodadventure) || ($($+(%,floodadventure.,$nick),2))) { return }
set -u10 %floodadventure On
set -u30 %floodadventure. $+ $nick On
msg $chan $nick adventured $2- , $!read(text.txt,n) $+.
}

what it spits out is:

Nick adventured into a cave and , $read(text.txt,n).

I know the first part right up to the $2- is correct, and the $+. at the end.
But I cannot for the life of me figure out how to get the read text file to tag along on the end of that line.
I know it must be possible, but I would like to do it without using the Var= %random method when i know there is a way to get it to read from a text file.

Any and all help would be awesomely appreciated ^_^

Thanks in advance!!!!

Last edited by logan_671; 27/03/15 08:21 AM.
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
! stops the identifier from being evaluated

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
You are required to have a space before AND after $+ when concatenating two strings. The correct usage is "$+ ."

And yes, the '!' in your $read() identifier is used to delay evaluation. You probably stole that from somebody's /timer example. To better explain what this is, perform the following demonstration:

Type $!!!!!!!!!!me into your chat box and press the Tab key multiple times on your keyboard.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Feb 2015
Posts: 16
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2015
Posts: 16
no i did not steal that from someone else, It was a line That I was already using for a different command, BUT thanks for the help.

Joined: Feb 2015
Posts: 16
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2015
Posts: 16
Best answer by far, thanks for the help! it's always something so simple lol


Link Copied to Clipboard