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.
The divisors for 10 are:
The divisors for 25 are:
The divisors for 3 are:
The divisors for 18 are:
The divisors for 75 are:
0 has no divisors!
{{#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:
efcc18 efcc18 e46cca
{{#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:
defense colors:
spattack colors:
spdefense colors:
speed colors:
hp colors:
attack colors:
{{#invoke:test|listcolors}}
Categories
- No categories associated with this article