Created
January 25, 2012 15:40
-
-
Save Maw-Fox/1676837 to your computer and use it in GitHub Desktop.
Mako pools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$include lib/rp | |
: wwwmakopool[ arr:data ref:player str:param -- ] | |
{ "Current active pools:" | |
rpsys "Mako Pool/" array_get_propvals dup array_count not if pop "No pools are active at the moment." else | |
"<table width=700>" | |
"<tr><th>Name</th><th>Description</th><th>Current Contribution</th><th>Percent Complete</th></tr>" | |
foreach var! desc var! name | |
"<tr><td>" name @ "</td><td>" | |
desc @ "</td><td>" | |
rpsys { "Mako Pool/" name @ "/Total Contributions" }cat getpropint dup "/" swap | |
rpsys { "Mako Pool/" name @ "/Goal" }cat getpropint dup rot swap / var! poolpercent "</td><td>" | |
poolpercent @ | |
repeat | |
"</table>" | |
then | |
}cat .tell | |
"</body>" .tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment