Calculator Commands
Calculator Commands is a simple way to calculate in Blockland. It's not clientsided. It's a server script so that all your users can calculate if needed for building or eventing, whatever.
UsageAny time ingame you can type
/calc helpto get a list of what commands do what.
/calc <type> # #Basically, you could type
/calc add 3 5 and it would calculate 3 + 5
This will appear in the chat right after:
CC Add: 3 + 5 = 8Same thing will work for these commands:
/calc add/subtract/multiply/divide/sin/cos/tan #1 #2/rad/degChangelog-All calculation functions now only allow numbers 1 and up (No 0 or letters.)
-Better way of scanning user's given numbers.
-Changed the error message to say CC (Add): instead of CC:. (will say what the calculation is, add, subtract, etc.)
-Changed commands from add, subtract, multiply, divide to ccAdd, ccSubtract, etc etc.
-Changed the /ccHelp command to say the version number and the new commands.
-Added /ccSin, /ccCos, and /ccTan.
-Modified /ccHelp a bit, including colours and new commands.
Probably more, I forget.
I basically re-wrote all of the code, to prepare for the upcoming client-sided version.
* Everything is in one command, /calc <type> <num1> <num2>.
* Just type /calc for what used to be /cchelp.
+ Added a message to players when they join (Not sure if it works yet, someone confirm.)
+ Added proper brackets to if/else triggers.
- Removed sin, cos, and tan. They were pointless.
*Fixed join message.
*Fixed join message.
+Re-added Sin/Cos/Tan (now with degree support)
-Removed the "this server has calculator commands v1.9.235.4 blah blah" line from /calc
NOTICE: The client-sided version will not be happening. I feel this should stay as a server-mod.
This update does not contain any new features, but I still see it as an important one.
*Re-did half the code to reduce the amount of lines and wedge pattern (see bottom of post).
*/calc is now /calc help. /calc will not work.
*Message now says CC <type>: instead of CC (<type>):
Wedge Pattern Fix
So if you ever looked at the server.cs it would sometimes like a bit like this:
if(blah = 1)
{
if(blahhj = 1)
{
dothis;
}
}
Now it is like this:
if(blah = 1 && blahhj = 1)
{
dothis;
}
Dropbox Download
RTB Manager Downloadnot yet.