User:Lakelimbo/Sandbox
Modules
I made a very basic module to show some possibilities with Scribunto/Lua. This module has 3 built-in functions:
List divisors of a number
Very simple concept, it will simply list the divisors of a number and list them. If the divisor is 0, a special message will appear.
Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
{{#invoke:test|divisor|10}} {{#invoke:test|divisor|25}} {{#invoke:test|divisor|3}} {{#invoke:test|divisor|18}} {{#invoke:test|divisor|75}} {{#invoke:test|divisor|0}}
Colors
Another function will get a color, and you can get a shade of it too. For demonstration purposes, I only added Bulba's base stat colors:
Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
{{#invoke:test|colors|attack}} {{#invoke:test|colors|color=attack|dark}} {{#invoke:test|colors|speed|shade=light}}
There is also another function there that will take those colors and list them all:
Lua error: Internal error: The interpreter exited with status 127.
{{#invoke:test|listcolors}}