What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [req] User command script

[req] User command script
Author: Message:
Gosan
New Member
*

Avatar

Posts: 10
Joined: May 2007
O.P. [req] User command script
Hi all! Im looking for just the shell of a script that will allow users to type a command and respond automatically with a text from a book.

Having worked a little on irc bots, i understand i will have to post each sentance of the chapters up myself etc. all im looking for is the coding.

For example:

User A types: Q 1:1-3

I auto respond with:

Chapter 1: Name
Verse 1: osithoeish
Verse 2: oawithawoith
Verse 3: oawiah

Sorry if this has already been requested before, but ive had a snoop around and couldnt find anything. THanks in advance!
05-30-2007 02:12 PM
Profile E-Mail PM Find Quote Report
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
34 / Male / Flag
Joined: Oct 2004
RE: [req] User command script
Reproducing content from books without explicit authorisation from the owner is a breach of copyright and can have very significant consequences, so I hope that you do indeed have permission to do so.
05-30-2007 02:25 PM
Profile PM Find Quote Report
Gosan
New Member
*

Avatar

Posts: 10
Joined: May 2007
O.P. RE: [req] User command script
its a religious book that has no copywrite on it so dont worry about that. Its solely for my msn list rather than a global script release or anything like that. Thats why im solely requesting the coding only , and ill do the rest myself.

Edit: I was reading on patchous website the following:


// Reads the full contents of a text file to a variable
function ReadFile (file) {
  var fileObj = fsObj.OpenTextFile(MsgPlus.ScriptFilesPath + '\\' + file, 1);
  var contents = fileObj.ReadAll();
  fileObj.Close();
  return contents;
}

//Read line at position X from a text file. To read the second line of the file, use ReadLineFromFile('test.txt', 1); (the first line corresponds to index 0)
function ReadLineFromFile (file, line) {
  var fileObj = fsObj.OpenTextFile(MsgPlus.ScriptFilesPath + '\\' + file, 1);
  var lineResult = fileObj.ReadAll();
  lineResult = lineResult.split('\r\n');
  fileObj.Close();
  return lineResult[line];
}


- using this - how would i make it so that if another user requested a line it would return the line to them, instead of just me typing the command?

This post was edited on 05-30-2007 at 03:15 PM by Gosan.
05-30-2007 02:35 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On