mIRC Homepage
Posted By: soodumb retrieve text from file with /play - 07/12/06 02:49 AM
Hi Guys
Im still quit new to this so go easy on me
Its the quote script again, all works fine and plays the last 3 quotes added when !quote is typed in the channel
They are saved in a txt file called quotes.txt when someone types !quote .add using the line
.write -iln1 quote.txt $3- $fulldate
As you can see the most resent quote is added in the 1st line of the txt file and when !quote is typed it displays as
this is quote number one Wed Dec 6 21:41:02 2006
this is quote number two Wed Dec 6 19:17:58 2006
this is quote number three Wed Dec 6 16:33:29 2006
Is there any way i can change it so it displays
this is quote number one added 2hrs 14mins 27secs ago
this is quote number two added 4hrs 38mins 2secs ago
this is quote number three added 7hrs 39mins 31secs ago
My times are a guess as dont want to work out exactly how long ago they were added.
Hence the need for the change in display.
Hope i've made this clear and any help is greatly recieved
Posted By: RusselB Re: retrieve text from file with /play - 07/12/06 02:54 AM
This can be done, however, it would be a lot easier to do if we had your quote script. There have been a number of quote scripts done, and they don't all use the same format for storing the information, so please post your quote script, and remember to use the Code Tags (indicated by the # character in the toolbar at the top of this message area)
Posted By: Riamus2 Re: retrieve text from file with /play - 07/12/06 12:51 PM
Use /play with an alias and have it replace the last 5 tokens with $calc($ctime - $ctime(last 5 tokens)) and it will work.
© mIRC Discussion Forums