SA-MP Forums Archive
[FilterScript] Googulator v1 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Googulator v1 (/showthread.php?tid=196886)



Googulator v2! (Now with unit and currency conversions!) - JamesC - 07.12.2010

Information

I was pretty bored today and came across a calculator script which could only do basic operations. With a bit of research and some fumbling with the HTTP function and ******'s advanced search tools/built-in calculator, I have created this script. You can do all the basic calculations; adding; subtracting; multiplying; dividing and also (complex) equations via ******, retrieving the result from ******. Since I am no mathematical expert, I haven't fully tested the script with equations, please post here if there are any bugs.

Usage
pawn Код:
/calculate [Equation]

Examples:

/calculate 10 + 5
/calculate (10 + 5) ^ 2
/calculate (10 + 5) * (80 / 10) ^ 2
New in version 2
pawn Код:
/convert [Amount] [From] [To]

Examples:

/convert 100 USD NZD
/convert 100 ms s
/convert 30 days months
/convert 10 cm inches
/convert 1000 GB MB

And many more!
Version 2 also notifies the user of any errors that may have occurred while calculating.

Examples

Код:
/calculate 100 / 0 = Numerical Error
/convert 100 USD COD = Unknown Unit
/convert 100 USD inches = Unit mismatch
Credits

****** - Doing all the hard work that they do.
Zeex - ZCMD
Calgon - Help with HTTP + Moral support + Script name.
Westie - Explode and str_replace
****** - Sscanf

Download

Version 2 (Current)

Pastebin (Source)
Solidfiles (AMX)

Version 1

Pastebin (Source)
Solidfiles (AMX)


Re: Googulator v1 - __ - 07.12.2010

Nice work, JamesC.

I'm going to certainly make use of this.


Re: Googulator v1 - [MWR]Blood - 07.12.2010

Really nice!


Re: Googulator v1 - JamesC - 07.12.2010

Quote:
Originally Posted by __
Посмотреть сообщение
Nice work, JamesC.

I'm going to certainly make use of this.
Quote:
Originally Posted by Delux13
Посмотреть сообщение
Really nice!
Thanks. Will be releasing version 2 soon with currency conversions + basic unit conversions.


Re: Googulator v1 - Grim_ - 07.12.2010

Very nice.

If you do create the currency conversions one, would you mind me editing it a bit to fit with my Currency script? You can PM me for more details regarding the matter.


Re: Googulator v1 - alpha500delta - 07.12.2010

Nice.

Would be epic if you could make it with roots and squares


Re: Googulator v1 - JamesC - 07.12.2010

Quote:
Originally Posted by Grim_
Посмотреть сообщение
Very nice.

If you do create the currency conversions one, would you mind me editing it a bit to fit with my Currency script? You can PM me for more details regarding the matter.
Sure, I'll send you a PM when I'm about to start work on it.

Quote:
Originally Posted by alpha500delta
Посмотреть сообщение
Nice.

Would be epic if you could make it with roots and squares
You can do both at the moment.

pawn Код:
/calculate 5^2 (Would return 25) [Square]
/calculate 25^0.5 (Would return 5) [Root]



Re: Googulator v1 - Mean - 27.12.2010

Wow, thats nice.


Re: Googulator v1 - Aleluja - 27.12.2010

Nice work.. I think that many server will be use this..


Re: Googulator v1 - snac24 - 28.12.2010

Cool ;} ~!~