WinMX World :: Forum

Metis Scripts and Help => Metis Script Help => Topic started by: Taipan on February 10, 2006, 01:18:58 am

Title: Having problems with a script
Post by: Taipan on February 10, 2006, 01:18:58 am
I am trying 2 get metris to repeat a name that i type in 4 example

Taipan: happybirthday (name)
Metris: yes happy birthday (name)

so far am using the following script
<command type="script">
<in>happy birthday  </in>

<out>                        #c4#Happy Birthday #c8#To You.</out>
<out> </out>
<out> </out>
<out> </out>
<out> </out>
<out> </out>
<out>         #c51#                 #c59#( #c59#( #c52#\ #c57#o #c52#/ #c59#) #c59#)</out>
<out>         #c51#               .----- #c59#/ #c52#/ #c57#^ #c52#\ #c59#\ #c51#-----.</out>
<out>         #c51#               |   #c59#/ `#c8#|    #c8#|#c59#`\    #c51#|</out>
<out>         #c51#               |     #c8#|    #c8#|     #c51#|</out>
<out>         #c51#               |     #c8#|    #c8#|     #c51#|</out>
<out>         #c51#               |     #c8#|    #c8#|     #c51#|</out>
<out>         #c51#               #c4#'-- -- -- === -- -- -'</out>
<out> </out>
</command>
Title: Having problems with a script
Post by: Galactic Overlord on February 10, 2006, 05:51:57 am
Ok then you need to use the %PARAM% varible.....

Code: [Select]
<command type="script">
<in>happy birthday %PARAM%</in>
<out>   %PARAM%  ...       #c4#Happy Birthday #c8#To You.</out>
<out> </out>
<out> </out>
<out> </out>
<out> </out>
<out> </out>
<out>         #c51#                 #c59#( #c59#( #c52#\ #c57#o #c52#/ #c59#) #c59#)</out>
<out>         #c51#               .----- #c59#/ #c52#/ #c57#^ #c52#\ #c59#\ #c51#-----.</out>
<out>         #c51#               |   #c59#/ `#c8#|    #c8#|#c59#`\    #c51#|</out>
<out>         #c51#               |     #c8#|    #c8#|     #c51#|</out>
<out>         #c51#               |     #c8#|    #c8#|     #c51#|</out>
<out>         #c51#               |     #c8#|    #c8#|     #c51#|</out>
<out>         #c51#               #c4#'-- -- -- === -- -- -'</out>
<out> </out>
</command>


What this does is takes whatever is typed after "happy birthday" and plugs it into the %PARAM% varible.... ie: happy birthday GO  would result with "GO" being put into %PARAM%.... but so will anything else typed in afterwards ... ie: happy birthday you silly fool   %PARAM%= "you silly fool"

Remember that Ascii Art doesnt display the same for every program and some programs takes multipule spaces and converts them into a single space so if your "spacing" falls flat replace each space with  &nbsp;
Title: Having problems with a script
Post by: Bearded Blunder on February 10, 2006, 10:26:30 am
Quote
Remember that Ascii Art doesnt display the same for every program and some programs takes multipule spaces and converts them into a single space so if your "spacing" falls flat replace each space with &nbsp;

or use alt+0160
Title: Having problems with a script
Post by: Zénar on February 12, 2006, 12:54:00 am
Yes the alt+255 is good too.
It's just metis don't accept more than one spaces. You can use more spaces only if you use .ini files and with metis, read that file.

If you need more help, just see my program called FastASCII (http://www.mxcontrol.org/modules.php?name=Forums&file=viewtopic&t=1681)!  8)
I hope it will help you
Title: Having problems with a script
Post by: James404 on February 13, 2006, 10:52:45 pm
That isn't why you can use spaces Zenar. I was the one that found out about this little work around when I made my Yahtzee script. You can read spaces from any text file, ini, txt, rtf, ect. You must read line one, two, and so on. And must be done in mode l. But in mode l there is a limit to the number of characters it can save to a variable. When it reads the line and saves it to the variable in mode l, it saves the multiple spaces that way. I'm not sure if multi spaces work in mode c. But I might mess around and try to get something working. If it is read in mode c, then it saves the stuff to your memory, no short limit like mode l has.
Title: Re: Having problems with a script
Post by: Taipan on March 02, 2006, 08:22:30 am
Thanks Overlord worked a treat sorry it took so long 2 reply thanks again for that
Title: Re: Having problems with a script
Post by: Røçkåfë££ë® §kåñK on March 02, 2006, 10:49:33 pm

To answer James,
Hows bout read a line in mode l and push to a variable the push a \n after then read next line and add to end of variable and so on i.e.

Code: [Select]
<out type="push" extdata="linenumber">0</out>
<out type="pop" extdata="file"></out>

<out type="push" extdata="linenumber"><operator type="+" lvalue="$linenumber$" rvalue="1"/></out>
<out type="push" extdata="line"><operator type="readfile" nvalue="FILENAME_HERE.txt" lvalue="l" rvalue="$linenumber$"/></out>
<out type="goto" extdata="3" condition="==" lvalue="$line$" rvalue=""></out>
<out type="push" extdata="file"><operator type="strcat" lvalue="$file$" rvalue="$line$\n"/></out>
<out type="goto" extdata="-4"></out>
Then the entire .txt file is saved in the variable $file$ with newlines so all you would need is one line

Code: [Select]
<out>$file$</out>
And its all perfect
=)

not tested this but cant see why it wouldn't work
Title: Re: Having problems with a script
Post by: hunnybunny on February 22, 2007, 11:50:28 pm
where can i download fast ascii creator. I have it but when i changed pc's and brought the bot up from the external. it's not there. a friend gave it to me and i love that thing. Who ever created it needs a win mx nobel prize!
Title: Re: Having problems with a script
Post by: ]-[êll.Ôñ.ËÀR'][']-[. on February 23, 2007, 05:31:57 am
try here hunnnybunny             http://archive.winmxworld.com/Zenar/Fast%20AscII/