Created
March 31, 2010 20:06
-
-
Save sk89q/350803 to your computer and use it in GitHub Desktop.
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
-- Point values for badges | |
local boomerang = 0 | |
local unboomerang = 0 | |
local brown = 0 | |
local unbrown = 0 | |
local champion = 0 | |
local unchampion = 0 | |
local clean = 0 | |
local unclean = 0 | |
local green = 0 | |
local ungreen = 0 | |
local handsoff = 0 | |
local unhandsoff = 0 | |
local rodless = 0 | |
local unrodless = 0 | |
local solved = 0 | |
local unsolved = 0 | |
local sweep = 0 | |
local unsweep = 0 | |
local unattractive = 0 | |
local ununattractive = 0 | |
local water = 0 | |
local unwater = 0 | |
-- Objects, points for each object | |
local waterrod = 0 | |
local woodrod = 0 | |
local posmagnet = 0 | |
local negmagnet = 0 | |
local unpowwheel = 0 | |
local cwwheel = 0 | |
local ccwheel = 0 | |
-- STOP EDITING HERE -- | |
local final = 0 | |
local paste = "" | |
for _, design in pairs(params.designs) do | |
local score = 0 | |
local emoticons = "" | |
if design.badges.boomerang then score = score + boomerang end | |
if design.badges.boomerang then emoticons = emoticons .. ":boomerang: " end | |
if not design.badges.boomerang then score = score + unboomerang end | |
if design.badges.brown then score = score + brown end | |
if design.badges.brown then emoticons = emoticons .. ":brown: " end | |
if not design.badges.brown then score = score + unbrown end | |
if design.badges.champion then score = score + champion end | |
if design.badges.champion then emoticons = emoticons .. ":champion: " end | |
if not design.badges.champion then score = score + unchampion end | |
if design.badges.clean then score = score + clean end | |
if design.badges.clean then emoticons = emoticons .. ":clean: " end | |
if not design.badges.clean then score = score + unclean end | |
if design.badges.green then score = score + green end | |
if design.badges.green then emoticons = emoticons .. ":green: " end | |
if not design.badges.green then score = score + ungreen end | |
if design.badges.handsoff then score = score + handsoff end | |
if design.badges.handsoff then emoticons = emoticons .. ":handsoff: " end | |
if not design.badges.handsoff then score = score + unhandsoff end | |
if design.badges.rodless then score = score + rodless end | |
if design.badges.rodless then emoticons = emoticons .. ":rodless: " end | |
if not design.badges.rodless then score = score + unrodless end | |
if design.badges.solved then score = score + solved end | |
if design.badges.solved then emoticons = emoticons .. ":solved: " end | |
if not design.badges.solved then score = score + unsolved end | |
if design.badges.sweep then score = score + sweep end | |
if design.badges.sweep then emoticons = emoticons .. ":sweep: " end | |
if not design.badges.sweep then score = score + unsweep end | |
if design.badges.unattractive then score = score + unattractive end | |
if design.badges.unattractive then emoticons = emoticons .. ":unattractive: " end | |
if not design.badges.unattractive then score = score + ununattractive end | |
if design.badges.water then score = score + water end | |
if design.badges.water then emoticons = emoticons .. ":water: " end | |
if not design.badges.water then score = score + unwater end | |
for _, obj in pairs(design.objects) do | |
if obj.type == "WaterRod" then score = score + waterrod end | |
if obj.type == "WoodRod" then score = score + woodrod end | |
if obj.type == "PosMagnet" then score = score + posmagnet end | |
if obj.type == "NegMagnet" then score = score + negmagnet end | |
if obj.type == "UnpowWheel" then score = score + unpowwheel end | |
if obj.type == "CWWheel" then score = score + cwwheel end | |
if obj.type == "CCWheel" then score = score + ccwheel end | |
end | |
print(design.id .. " score is " .. score) | |
final = final + score | |
paste = paste .. "[url=" .. design.url .. "]" .. design.name .. "[/url]" | |
.. " " .. score .. " " .. emoticons .. "\n" | |
end | |
print("Final score: " .. final) | |
result.setcopypaste(paste) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-- Point values for badges
local boomerang = 0
local unboomerang = 0
local brown = 0
local unbrown = 0
local champion = 0
local unchampion = 0
local clean = 0
local unclean = 0
local green = 0
local ungreen = 0
local handsoff = 0
local unhandsoff = 0
local rodless = 0
local unrodless = 0
local solved = 0
local unsolved = 0
local sweep = 0
local unsweep = 0
local unattractive = 0
local ununattractive = 0
local water = 0
local unwater = 0
-- Objects, points for each object
local waterrod = 0
local woodrod = 0
local posmagnet = 0
local negmagnet = 0
local unpowwheel = 0
local cwwheel = 0
local ccwheel = 0
-- STOP EDITING HERE --
local final = 0
local paste = ""
for _, design in pairs(params.designs) do
local score = 0
local emoticons = ""
end
print("Final score: " .. final)
result.setcopypaste(paste)