gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
76793 Posts in 13502 Topics by 1651 Members - Latest Member: Arnold99 November 22, 2024, 09:29:27 am
*
gfx*gfx
gfx
WinMX World :: Forum  |  Metis Scripts and Help  |  Other Metis scripts  |  create a story
gfx
gfxgfx
 

Author Topic: create a story  (Read 2235 times)

0 Members and 1 Guest are viewing this topic.

Offline Mechanic

  • Forum Member
create a story
« on: December 23, 2006, 11:49:35 am »
Code: [Select]
<?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¤<--
Mechanic
-->¤ Unlimited Movies and Music ¤<--

Offline reef

  • WMW Volunteer
  • *****
  • ***
Re: create a story
« Reply #1 on: December 29, 2006, 12:22:05 pm »
Code: [Select]
<in condition="4" lvalue="%NAME%" rvalue="<who can add here>">!addstory %PARAMETER%</in>
whats the format for adding other names?   i've tried....

<in condition="4" lvalue="%NAME%" rvalue="reef,anotherusername">!addstory %PARAMETER%</in>
<in condition="4" lvalue="%NAME%" rvalue="reef;anotherusername">!addstory %PARAMETER%</in>

have tried duplicating the line and replacing my name with another user name... cant get it to work for any others

i've only used usergroups b4... not sure how to add more names this way..... any advice would be
appreciated.... :)

Offline Mechanic

  • Forum Member
Re: create a story
« Reply #2 on: December 29, 2006, 01:17:11 pm »
you can either use a room tag in this section if one is available, or you could set up a user group for those that you want, and then you have to make the line to reed for usergroup, last thing you could do is open to all by taking out the condition and l and r values, this can lead to dangerous stuff if an untrusted person decides to add.
Mechanic
-->¤ Unlimited Movies and Music ¤<--

Offline reef

  • WMW Volunteer
  • *****
  • ***
Re: create a story
« Reply #3 on: December 30, 2006, 02:43:05 am »
Thanks Mechanic..... working good now.Neat script    :)

WinMX World :: Forum  |  Metis Scripts and Help  |  Other Metis scripts  |  create a story
 

gfxgfx
gfx
©2005-2024 WinMXWorld.com. All Rights Reserved.
SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
Page created in 0.009 seconds with 23 queries.
Helios Multi © Bloc
gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!