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 21, 2024, 09:48:25 am
*
gfx*gfx
gfx
WinMX World :: Forum  |  Metis Scripts and Help  |  Other Metis scripts  |  Calculator
gfx
gfxgfx
 

Author Topic: Calculator  (Read 4555 times)

0 Members and 1 Guest are viewing this topic.

Offline The Stroker ®

  • Forum Member
    • WinMxHelp
Calculator
« on: March 20, 2008, 03:22:41 pm »
It's a script that works as a calculator chatting
You can substitute the names of commands to your liking

The syntax of the command is:

!command first number second number

!plus 2 3
Bot response is= 2 + 3 = 5

Quote
<?xml version="1.0" standalone="no">
<config> //CALCULATOR By Lúca000

//PLUS
<command type="script" flood="2">
     <in>!plus %PARAMETER%</in>
     <out type="push" extdata="param_somma"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
     <out type="push" extdata="addendo_left"><operator type="strleft" lvalue="%PARAM%" rvalue="$param_somma$"/></out>
     <out type="push" extdata="param_somma2"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
     <out type="push" extdata="addendo_right"><operator type="strright" lvalue="%PARAM%" rvalue="$param_somma2$"/></out>
     <out type="push" extdata="addizionati"> <operator type="+" lvalue="$addendo_left$" rvalue="$addendo_right$"/> </out>
     <out>#c10#$addendo_left$  #c2#+#c10#$addendo_right$ #c2#= #c8#$addizionati$</out>
</command>

//SUBTRACT
<command type="script" flood="2">
     <in>!subtract %PARAMETER%</in>
     <out type="push" extdata="param_sottr"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
     <out type="push" extdata="sottraendo_left"><operator type="strleft" lvalue="%PARAM%" rvalue="$param_sottr$"/></out>
     <out type="push" extdata="param_sottr2"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
     <out type="push" extdata="sottraendo_right"><operator type="strright" lvalue="%PARAM%" rvalue="$param_sottr2$"/></out>
     <out type="push" extdata="sottratti"> <operator type="-" lvalue="$sottraendo_left$" rvalue="$sottraendo_right$"/> </out>
     <out>#c10#$sottraendo_left$  #c2#-#c10#$sottraendo_right$ #c2#= #c8#$sottratti$</out>
</command>

//MULTIPLIES
<command type="script" flood="2">
     <in>!multiplies %PARAMETER%</in>
     <out type="push" extdata="param_moltiplica"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
     <out type="push" extdata="moltiplicando_left"><operator type="strleft" lvalue="%PARAM%" rvalue="$param_moltiplica$"/></out>
     <out type="push" extdata="param_moltiplica2"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
     <out type="push" extdata="moltiplicando_right"><operator type="strright" lvalue="%PARAM%" rvalue="$param_moltiplica2$"/></out>
     <out type="push" extdata="moltiplicati"> <operator type="*" lvalue="$moltiplicando_left$" rvalue="$moltiplicando_right$"/> </out>
     <out>#c10#$moltiplicando_left$  #c2#x #c10#$moltiplicando_right$ #c2#= #c8#$moltiplicati$</out>
</command>


//DIVIDE
<command type="script" flood="2">
     <in>!divide %PARAMETER%</in>
     <out type="push" extdata="param_divisione"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
     <out type="push" extdata="dividendo_left"><operator type="strleft" lvalue="%PARAM%" rvalue="$param_divisione$"/></out>
     <out type="push" extdata="param_divisione2"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
     <out type="push" extdata="dividendo_right"><operator type="strright" lvalue="%PARAM%" rvalue="$param_divisione2$"/></out>
     <out type="push" extdata="divisi"> <operator type="/" lvalue="$dividendo_left$" rvalue="$dividendo_right$"/> </out>
     <out>#c10#$dividendo_left$  #c2#: #c10#$dividendo_right$ #c2#= #c8#$divisi$</out>
</command>

</config>

If you add this command in a XML file, include it into file MXC.

 :D

Excuse my imperfect English  8)
Show my website: https://www.winmxhelp.net
The Best Place for WinMx in Italy.

Download the new WinMx community Patch:   https://patch.winmxconex.com

Offline Røçkåfë££ë® §kåñK

  • WANABE WINMX CHAT SERVER HACKER
  • Forum Member
    • The Rebelion
Re: Calculator
« Reply #1 on: March 20, 2008, 07:04:50 pm »
Does this calculator deal with decimals?
I.e. decimal outputs and decimal inputs?
such as 5/2=2.5
or 3.5+2.7=6.2

??

I created one a while ago that does decimals to 1 decimal place...
[ìíÍIí¯Iì·´¯ìÍ]Íì•íÌí¯`·íI¯ìIÌì í]¡í¯ìIÎ Røçkåfë££ë® §kåñK ÎIí¯ì¡[ì íÍIí¯Iì·´¯ìÍì•íÌ[Ìí¯`·íI¯ìIÌìí]

Offline The Stroker ®

  • Forum Member
    • WinMxHelp
Re: Calculator
« Reply #2 on: March 20, 2008, 07:26:09 pm »
Just numbers without comma :(

Type: 3+2    3-2   3x2      3/2

And elsewhere:  3.6+4.7

Show my website: https://www.winmxhelp.net
The Best Place for WinMx in Italy.

Download the new WinMx community Patch:   https://patch.winmxconex.com

Offline Røçkåfë££ë® §kåñK

  • WANABE WINMX CHAT SERVER HACKER
  • Forum Member
    • The Rebelion
Re: Calculator
« Reply #3 on: March 20, 2008, 09:50:58 pm »
Sorry you kinda lost me,
[ìíÍIí¯Iì·´¯ìÍ]Íì•íÌí¯`·íI¯ìIÌì í]¡í¯ìIÎ Røçkåfë££ë® §kåñK ÎIí¯ì¡[ì íÍIí¯Iì·´¯ìÍì•íÌ[Ìí¯`·íI¯ìIÌìí]

Johnbert18

  • Guest
Re: Calculator
« Reply #4 on: May 20, 2009, 03:38:02 am »
                 Thanks for sharing the syntax.

_________________
Call Center Software

WinMX World :: Forum  |  Metis Scripts and Help  |  Other Metis scripts  |  Calculator
 

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