<?xml version="1.0" standalone="no">
<config>
<command type="script">
<in>!story</in>
<out>We here at #c52#<room name here>#c1# would like for you to help create stories. the triggers are #c57#!readstory #c1#(this one sends you the story in message form), and#c57# !addstory <add stuff here>#c1#. Remember though This is a family room so keep it #c8#Clean#c1#.</out>
<out>We will run each story for a month then start a new one. For now only members can add.</out>
</command>
<command type="script" mode="thread">
<in>!readstory</in>
<out type="script" condition="==" lvalue="%USERVAR[155]%" rvalue="1">Sorry %NAME% but the Story is now active.</out>
<out type="break" condition="==" lvalue="%USERVAR[155]%" rvalue="1"/>
<out type="push" extdata="155">1</out>
<out type="push" extdata="lines"><operator type="readfile" nvalue="<path to metis add ons / plug ins here>\story\lines.txt" lvalue="l" rvalue="1"/></out>
<out type="push" extdata="lines"><operator type="+" lvalue=$lines$ rvalue=1/></out>
<out type="push" extdata="linecount2">1</out>
<out type="push" extdata="storyf"><operator type="readfile" nvalue="<path to metis add ons / plug ins here>\story\story.txt" lvalue="l" rvalue="$linecount2$"/></out>
<out>/message %NAME% $storyf$</out>
<out type="sleep" extdata="1500"/>
<out type="push" extdata="linecount2"><operator type="+" lvalue=$linecount2$ rvalue=1/></out>
<out type="goto" extdata="-4" condition="2" lvalue=$linecount2$ rvalue=$lines$></out>
<out type="pop" extdata="155"/>
</command>
<command type="script">
<in condition="4" lvalue="%NAME%" rvalue="<who can add here>">!addstory %PARAMETER%</in>
<out type="push" extdata="lines"><operator type="readfile" nvalue="<path to metis add ons / plug ins here>\story\lines.txt" lvalue="l" rvalue="1"/></out>
<out type="push" extdata="lines"><operator type="+" lvalue=$lines$ rvalue=1/></out>
<out type="file" mode="t" extdata="<path to metis add ons / plug ins here>\story\lines.txt">$lines$</out>
<out type="file" mode="a" extdata="<path to metis add ons / plug ins here>\story\story.txt">%PARAMETER%\n</out>
<out type="pm" extdata="%RAWNAME%">%PARAMETER% has been added</out>
</command>
<command type="script" mode="thread">
<in usergroup="<MyRoomTopAdmins here>">!newstory</in>
<out type="file" mode="t" extdata="<path to metis add ons / plug ins here>\story\story.txt"></out>
<out type="sleep" extdata="1500"/>
<out type="file" mode="t" extdata="<path to metis add ons / plug ins here>\story\lines.txt">0</out>
</command>
</config>
After trying this script then asking for help I was able to find my mistakes as well as a few tips to make things better. This script has been tested and bugs worked out. This script allows memberes of a room to write a story line by line and then read what others have added. the script requires 2 txt files located in story folder in add ons / plug ins folder, the first being story.txt which is the actual story, and the second is lines.txt which is the line count to read by. the first one can be blank to start off with the second needs to start with a number in it, usually 0 for a blank story. The commands are !story -- to tell about the create a story in room, !readstory -- to have story sent to you in /message form, !addstory <new line here> -- this is to add story lines, and !newstory -- clears old story and lines files to start a new story; only for hosts preferably. If you like the idea great. use as you like
Mechanic
-->¤UNLIMITED MOVIES AND MUSIC¤<--