Untitled Diff

Created Diff never expires
1 removal
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
381 lines
7 additions
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
384 lines
function onLoad()
function onLoad()
buttonboard = getObjectFromGUID('8880f2')
buttonboard = getObjectFromGUID('8880f2')
buttonboard.createButton({label = 'Get the\nFinal Scores',
buttonboard.createButton({label = 'Get the\nFinal Scores',
position = {0,0.2,0}, --rotation = {0,180,0},
position = {0,0.2,0}, --rotation = {0,180,0},
click_function = 'startScoring',
click_function = 'startScoring',
width = 1300, height = 800
width = 1300, height = 800
--font_size = 200
--font_size = 200
})
})


--Script zones over each player
--Script zones over each player
ref_zone = {
ref_zone = {
Red = getObjectFromGUID("2568df"),
Red = getObjectFromGUID("2568df"),
Green = getObjectFromGUID("44ef60"),
Green = getObjectFromGUID("44ef60"),
Blue = getObjectFromGUID("88b4d8"),
Blue = getObjectFromGUID("88b4d8"),
Yellow = getObjectFromGUID("fc7c04"),
Yellow = getObjectFromGUID("fc7c04"),
Purple = getObjectFromGUID("628d42"),
Purple = getObjectFromGUID("628d42"),
White = getObjectFromGUID("70b722")
White = getObjectFromGUID("70b722")
}
}
end
end


--Value each card type is worth
--Value each card type is worth
ref_scoreValue = {
ref_scoreValue = {
apples=2, greenApples=4, goldenApples=6, bread=3, ryeBread=6, pumpBread=9, cheese=3, goudaCheese=6, bleuCheese=9, chicken=4, rooster=8, twenty=20, fiver=5, penny=1,
apples=2, greenApples=4, goldenApples=6, bread=3, ryeBread=6, pumpBread=9, cheese=3, goudaCheese=6, bleuCheese=9, chicken=4, rooster=8, fifty=50, twenty=20, fiver=5, penny=1,
crossbow=9, heavyCrossbow=10, mead=7, sMead=8, pepper=6, dragonPepper=8, silk=8, goldenSilk=9, oliveOil=10, brimstoneOil=5, gemstone=15, trophy=11, sword=12, arcaneScrolls=12,
crossbow=9, heavyCrossbow=10, mead=7, sMead=8, pepper=6, dragonPepper=8, silk=8, goldenSilk=9, oliveOil=10, brimstoneOil=5, gemstone=15, trophy=11, sword=12, arcaneScrolls=12,
sp1=7, sp2=6, sp3=6, sp4=6, sp5=6, sp6=5, sp7=5, sp8=4, sp9=5, sp10=4, sp11=5, sp12=6, sp13=5,
sp1=7, sp2=6, sp3=6, sp4=6, sp5=6, sp6=5, sp7=5, sp8=4, sp9=5, sp10=4, sp11=5, sp12=6, sp13=5,
mm1=6, mm2=6, mm3=6, mm4=7, mm5=10, mm6=8, mm7=6, mm8=10,
mm1=6, mm2=6, mm3=6, mm4=7, mm5=10, mm6=8, mm7=6, mm8=10,
bm1=34, bm2=31, bm3=32, bm4=29, bm5=30, bm6=27
bm1=34, bm2=31, bm3=32, bm4=29, bm5=30, bm6=27
}
}


--Trigger this with a button press or any other method you choose to initiate scoring.
--Trigger this with a button press or any other method you choose to initiate scoring.
function startScoring()
function startScoring()
--Players to score
--Players to score
ref_player = getSeatedPlayers()
ref_player = getSeatedPlayers()
--ref_player = {'Blue', 'Yellow', 'Red'} --For if you just don't have any friends and have to play by yourself, or debugging.
--ref_player = {'Blue', 'Yellow', 'Red'} --For if you just don't have any friends and have to play by yourself, or debugging.
--Creation of the main table that each player will have totals input into
--Creation of the main table that each player will have totals input into
scoreTotals = {}
scoreTotals = {}
countTotals = {}
countTotals = {}


--Loops over each player
--Loops over each player
for _, player in ipairs(ref_player) do
for _, player in ipairs(ref_player) do
--Creation of table that all of this player's info will go into
--Creation of table that all of this player's info will go into
local subTable = {}
local subTable = {}
local subCount = {}
local subCount = {}


--Get all of the descriptions for all cards in a player zone
--Get all of the descriptions for all cards in a player zone
local cardsInZone = getPlayerCardDesc(player)
local cardsInZone = getPlayerCardDesc(player)


--Loop over scorable card types
--Loop over scorable card types
for type, value in pairs(ref_scoreValue) do
for type, value in pairs(ref_scoreValue) do
--Start a score for this item type for this player
--Start a score for this item type for this player
subTable[type] = 0
subTable[type] = 0
subCount[type] = 0
subCount[type] = 0


--Loop over each card that was in the zone
--Loop over each card that was in the zone
for _, name in ipairs(cardsInZone) do
for _, name in ipairs(cardsInZone) do
--If name matches type, add to its value
--If name matches type, add to its value
if type == name then
if type == name then
if type == "bm1" or type == "bm2" or type == "bm3" or type == "bm4" or type == "bm5" or type == "bm6" then
if type == "bm1" or type == "bm2" or type == "bm3" or type == "bm4" or type == "bm5" or type == "bm6" then
subTable[type] = subTable[type] + value
subTable[type] = subTable[type] + value
subCount[type] = subCount[type] + 3
subCount[type] = subCount[type] + 3
else
else
subTable[type] = subTable[type] + value
subTable[type] = subTable[type] + value
subCount[type] = subCount[type] + 1
subCount[type] = subCount[type] + 1
end
end
end
end
end
end
end
end


--Finsihed adding to subTable. Put sub table into main table
--Finsihed adding to subTable. Put sub table into main table
scoreTotals[player] = subTable
scoreTotals[player] = subTable
countTotals[player] = subCount
countTotals[player] = subCount
--printToAll(countTotals)
--printToAll(countTotals)
end
end


--[[At this point, scoreTotals is filled and looks like this:
--[[At this point, scoreTotals is filled and looks like this:
scoreTotals = {
scoreTotals = {
Red = {
Red = {
apples=12, cheese=8, etc etc etc
apples=12, cheese=8, etc etc etc
},
},
Green = {
Green = {
apples=12, cheese=8, etc etc etc
apples=12, cheese=8, etc etc etc
},
},
}
}
]]--
]]--
calculateScores(scoreTotals, countTotals)
calculateScores(scoreTotals, countTotals)
end
end


--Function used by startScoring to get all cards/coins in the zone
--Function used by startScoring to get all cards/coins in the zone
function getPlayerCardDesc(player)
function getPlayerCardDesc(player)
local objList = ref_zone[player]
local objList = ref_zone[player]
local cardList = {}
local cardList = {}
--Loops over all cards in zone
--Loops over all cards in zone
for _, obj in ipairs(objList.getObjects()) do
for _, obj in ipairs(objList.getObjects()) do
--If object was a card, add its name to table
--If object was a card, add its name to table
if obj.tag == "Card" then
if obj.tag == "Card" then
table.insert(cardList, obj.getDescription())
table.insert(cardList, obj.getDescription())
--If Object was a deck, add each card it contains's name to table
--If Object was a deck, add each card it contains's name to table
elseif obj.tag == "Deck" then
elseif obj.tag == "Deck" then
--Adding of each card name to table
--Adding of each card name to table
for _, card in ipairs(obj.getObjects()) do
for _, card in ipairs(obj.getObjects()) do
table.insert(cardList, card.description)
table.insert(cardList, card.description)
end
end
elseif obj.tag == "Chip" then
elseif obj.tag == "Chip" then
stack = obj.getQuantity()
stack = obj.getQuantity()
if stack == -1 then
if stack == -1 then
if obj.getDescription() == '20' then
if obj.getDescription() == '50' then
table.insert(cardList, 'fifty')
elseif obj.getDescription() == '20' then
table.insert(cardList, 'twenty')
table.insert(cardList, 'twenty')
elseif obj.getDescription() == '5' then
elseif obj.getDescription() == '5' then
table.insert(cardList, 'fiver')
table.insert(cardList, 'fiver')
elseif obj.getDescription() == '1' then
elseif obj.getDescription() == '1' then
table.insert( cardList, 'penny')
table.insert( cardList, 'penny')
end
end
else
else
for i=1, stack do
for i=1, stack do
if obj.getDescription() == '20' then
if obj.getDescription() == '50' then
table.insert(cardList, 'fifty')
elseif obj.getDescription() == '20' then
table.insert(cardList, 'twenty')
table.insert(cardList, 'twenty')
elseif obj.getDescription() == '5' then
elseif obj.getDescription() == '5' then
table.insert(cardList, 'fiver')
table.insert(cardList, 'fiver')
elseif obj.getDescription() == '1' then
elseif obj.getDescription() == '1' then
table.insert( cardList, 'penny')
table.insert( cardList, 'penny')
end
end
end
end
end
end
end
end
end
end
--Return the tale of card descriptions to where it was called
--Return the tale of card descriptions to where it was called
return cardList
return cardList
end
end


function findRoyalty(goodCounts, countTotals)
function findRoyalty(goodCounts, countTotals)
local royalty = {}
local royalty = {}
for good, playerCounts in pairs(goodCounts) do
for good, playerCounts in pairs(goodCounts) do
local king = ''
local king = ''
local queen = ''
local queen = ''
local king2 = ''
local king2 = ''
local queen2 = ''
local queen2 = ''
local kingCount = 0
local kingCount = 0
local queenCount = 0
local queenCount = 0
local kingTie = false
local kingTie = false
local queenTie = false
local queenTie = false
local bonus = {0, 0}
local bonus = {0, 0}


if good == 'apples' then
if good == 'apples' then
bonus = {20, 10}
bonus = {20, 10}
elseif good == 'breads' or good == "cheese" then
elseif good == 'breads' or good == "cheese" then
bonus = {15, 10}
bonus = {15, 10}
elseif good == "chicks" then
elseif good == "chicks" then
bonus = {10, 5}
bonus = {10, 5}
end
end


for player, count in pairs(playerCounts) do
for player, count in pairs(playerCounts) do
if count > kingCount then
if count > kingCount then
-- Move the current king to queen position.
-- Move the current king to queen position.
queen = king
queen = king
queenCount = kingCount
queenCount = kingCount


-- Set current player as king.
-- Set current player as king.
king = player
king = player
kingCount = count
kingCount = count


-- If there was a tie for king, move other tied player to queen too.
-- If there was a tie for king, move other tied player to queen too.
if kingTie then
if kingTie then
queen2 = king2
queen2 = king2
queenTie = kingTie
queenTie = kingTie


--Resets king2 and kingTie
--Resets king2 and kingTie
king2 = ''
king2 = ''
kingTie = false
kingTie = false
end
end


elseif count == kingCount and count ~= 0 then
elseif count == kingCount and count ~= 0 then
-- Adds another king if another player is tied for the bonus
-- Adds another king if another player is tied for the bonus
kingTie = true
kingTie = true
king2 = player
king2 = player


elseif count > queenCount then
elseif count > queenCount then
-- Assigns a new queen player
-- Assigns a new queen player
queen = player
queen = player
queenCount = count
queenCount = count


--Resests queen2 and queenTie.
--Resests queen2 and queenTie.
queen2 = ''
queen2 = ''
queenTie = false
queenTie = false


elseif count == queenCount and count ~= 0 then
elseif count == queenCount and count ~= 0 then
-- Ads another queen if another player is tied for the bonus.
-- Ads another queen if another player is tied for the bonus.
queenTie = true
queenTie = true
queen2 = player
queen2 = player
end
end
end
end


if king ~= '' then
if king ~= '' then
if countTotals[king].arcaneScrolls ~= 0 then
if countTotals[king].arcaneScrolls ~= 0 then
if kingTie then
if kingTie then
king = king2
king = king2
king2 = nil
king2 = nil
kingTie = false
kingTie = false
end
end
end
end
elseif queen ~= '' then
elseif queen ~= '' then
if countTotals[queen].arcaneScrolls ~= 0 then
if countTotals[queen].arcaneScrolls ~= 0 then
if queenTie then
if queenTie then
queen = queen2
queen = queen2
queen2 = nil
queen2 = nil
queenTie = false
queenTie = false
end
end
end
end
elseif kingTie == true then
elseif kingTie == true then
if countTotals[king2].arcaneScrolls ~= 0 then
if countTotals[king2].arcaneScrolls ~= 0 then
king2 = nil
king2 = nil
kingTie = false
kingTie = false
end
end
elseif queenTie then
elseif queenTie then
if countTotals[queen2].arcaneScrolls ~= 0 then
if countTotals[queen2].arcaneScrolls ~= 0 then
queen2 = nil
queen2 = nil
queenTie = false
queenTie = false
end
end
end
end


--Add scores
--Add scores
if kingTie then -- IF the kings are tied
if kingTie then -- IF the kings are tied
if king and king2 ~= '' then
if king and king2 ~= '' then
scoreTotals[king].total = scoreTotals[king].total + ((bonus[1] + bonus[2]) / 2)
scoreTotals[king].total = scoreTotals[king].total + ((bonus[1] + bonus[2]) / 2)
scoreTotals[king2].total = scoreTotals[king2].total + ((bonus[1] + bonus[2]) / 2)
scoreTotals[king2].total = scoreTotals[king2].total + ((bonus[1] + bonus[2]) / 2)
end
end
elseif queenTie then --If the queens are tied
elseif queenTie then --If the queens are tied
if king ~= '' then
if king ~= '' then
scoreTotals[king].total = scoreTotals[king].total + bonus[1]
scoreTotals[king].total = scoreTotals[king].total + bonus[1]
end
end
if queen and queen2 ~= '' then
if queen and queen2 ~= '' then
scoreTotals[queen].total = scoreTotals[queen].total + (bonus[2] / 2)
scoreTotals[queen].total = scoreTotals[queen].total + (bonus[2] / 2)
scoreTotals[queen2].total = scoreTotals[queen2].total + (bonus[2] / 2)
scoreTotals[queen2].total = scoreTotals[queen2].total + (bonus[2] / 2)
end
end
else
else
if king ~= '' then
if king ~= '' then
scoreTotals[king].total = scoreTotals[king].total + bonus[1]
scoreTotals[king].total = scoreTotals[king].total + bonus[1]
end
end
if queen ~= '' then
if queen ~= '' then
scoreTotals[queen].total = scoreTotals[queen].total + bonus[2]
scoreTotals[queen].total = scoreTotals[queen].total + bonus[2]
end
end
end
end


royalty[good] = {kingTie, queenTie, king, queen, king2, queen2}
royalty[good] = {kingTie, queenTie, king, queen, king2, queen2}
end
end
return royalty
return royalty
end
end


function calculateScores(scoreTotals, countTotals)
function calculateScores(scoreTotals, countTotals)
goodCounts = {apples = {}, breads = {}, cheese = {}, chicks = {}, contra = {}}
goodCounts = {apples = {}, breads = {}, cheese = {}, chicks = {}, contra = {}}
for _, player in ipairs(ref_player) do
for _, player in ipairs(ref_player) do
goodCounts.apples[player] = countTotals[player].apples + (countTotals[player].greenApples * 2) + (countTotals[player].goldenApples * 3)
goodCounts.apples[player] = countTotals[player].apples + (countTotals[player].greenApples * 2) + (countTotals[player].goldenApples * 3)
goodCounts.breads[player] = countTotals[player].bread + (countTotals[player].ryeBread * 2) + (countTotals[player].pumpBread * 3)
goodCounts.breads[player] = countTotals[player].bread + (countTotals[player].ryeBread * 2) + (countTotals[player].pumpBread * 3)
goodCounts.cheese[player] = countTotals[player].cheese + (countTotals[player].goudaCheese * 2) + (countTotals[player].bleuCheese * 3)
goodCounts.cheese[player] = countTotals[player].cheese + (countTotals[player].goudaCheese * 2) + (countTotals[player].bleuCheese * 3)
goodCounts.chicks[player] = countTotals[player].chicken + (countTotals[player].rooster * 2)
goodCounts.chicks[player] = countTotals[player].chicken + (countTotals[player].rooster * 2)
goodCounts.contra[player] = countTotals[player].mead + countTotals[player].sMead + countTotals[player].silk +
goodCounts.contra[player] = countTotals[player].mead + countTotals[player].sMead + countTotals[player].silk +
countTotals[player].goldenSilk + countTotals[player].pepper + countTotals[player].dragonPepper + countTotals[player].crossbow +
countTotals[player].goldenSilk + countTotals[player].pepper + countTotals[player].dragonPepper + countTotals[player].crossbow +
countTotals[player].heavyCrossbow + countTotals[player].gemstone + countTotals[player].sword + countTotals[player].oliveOil +
countTotals[player].heavyCrossbow + countTotals[player].gemstone + countTotals[player].sword + countTotals[player].oliveOil +
countTotals[player].brimstoneOil + countTotals[player].arcaneScrolls + countTotals[player].trophy + countTotals[player].pumpBread +
countTotals[player].brimstoneOil + countTotals[player].arcaneScrolls + countTotals[player].trophy + countTotals[player].pumpBread +
countTotals[player].ryeBread + countTotals[player].bleuCheese + countTotals[player].goudaCheese + countTotals[player].greenApples +
countTotals[player].ryeBread + countTotals[player].bleuCheese + countTotals[player].goudaCheese + countTotals[player].greenApples +
countTotals[player].goldenApples + countTotals[player].rooster + countTotals[player].bm1 + countTotals[player].bm2 +
countTotals[player].goldenApples + countTotals[player].rooster + countTotals[player].bm1 + countTotals[player].bm2 +
countTotals[player].bm3 + countTotals[player].bm4 + countTotals[player].bm5 + countTotals[player].bm6 + countTotals[player].mm1 +
countTotals[player].bm3 + countTotals[player].bm4 + countTotals[player].bm5 + countTotals[player].bm6 + countTotals[player].mm1 +
countTotals[player].mm2 + countTotals[player].mm3 + countTotals[player].mm4 + countTotals[player].mm5 + countTotals[player].mm6 +
countTotals[player].mm2 + countTotals[player].mm3 + countTotals[player].mm4 + countTotals[player].mm5 + countTotals[player].mm6 +
countTotals[player].mm7 + countTotals[player].mm8
countTotals[player].mm7 + countTotals[player].mm8
--mm1=6, mm2=6, mm3=6, mm4=7, mm5=10, mm6=8, mm7=6, mm8=10,
--mm1=6, mm2=6, mm3=6, mm4=7, mm5=10, mm6=8, mm7=6, mm8=10,


playerTotalScore = 0
playerTotalScore = 0


if countTotals[player].goldenSilk > 0 then
if countTotals[player].goldenSilk > 0 then
playerTotalScore = playerTotalScore + countTotals[player].silk
playerTotalScore = playerTotalScore + countTotals[player].silk
playerTotalScore = playerTotalScore + countTotals[player].bm1 + countTotals[player].bm2
playerTotalScore = playerTotalScore + countTotals[player].bm1 + countTotals[player].bm2
end
end
if countTotals[player].sMead > 0 then
if countTotals[player].sMead > 0 then
playerTotalScore = playerTotalScore + countTotals[player].mead
playerTotalScore = playerTotalScore + countTotals[player].mead
playerTotalScore = playerTotalScore + countTotals[player].bm3 + countTotals[player].bm4
playerTotalScore = playerTotalScore + countTotals[player].bm3 + countTotals[player].bm4
end
end
if countTotals[player].dragonPepper > 0 then
if countTotals[player].dragonPepper > 0 then
playerTotalScore = playerTotalScore + countTotals[player].pepper
playerTotalScore = playerTotalScore + countTotals[player].pepper
playerTotalScore = playerTotalScore + countTotals[player].bm5 + countTotals[player].bm6
playerTotalScore = playerTotalScore + countTotals[player].bm5 + countTotals[player].bm6
end
end
if countTotals[player].heavyCrossbow > 0 then
if countTotals[player].heavyCrossbow > 0 then
playerTotalScore = playerTotalScore + (countTotals[player].crossbow * 2)
playerTotalScore = playerTotalScore + (countTotals[player].crossbow * 2)
end
end


for good, score in pairs(scoreTotals[player]) do
for good, score in pairs(scoreTotals[player]) do
playerTotalScore = playerTotalScore + score
playerTotalScore = playerTotalScore + score
end
end
scoreTotals[player].total = playerTotalScore
scoreTotals[player].total = playerTotalScore
end
end
marketRoyalty = findRoyalty(goodCounts, countTotals)
marketRoyalty = findRoyalty(goodCounts, countTotals)


for _, player in ipairs(ref_player) do
for _, player in ipairs(ref_player) do
scoreTotals[player].total = math.floor(scoreTotals[player].total)
scoreTotals[player].total = math.floor(scoreTotals[player].total)
end
end


showScores(scoreTotals, marketRoyalty)
showScores(scoreTotals, marketRoyalty)
end
end


function showScores(scoreTotals, royalty)
function showScores(scoreTotals, royalty)
for _, player in ipairs(ref_player) do
for _, player in ipairs(ref_player) do
printToAll(player .. ' has ' .. scoreTotals[player].total .. ' total points!', stringColorToRGB(player))
printToAll(player .. ' has ' .. scoreTotals[player].total .. ' total points!', stringColorToRGB(player))
printToAll(' ' .. goodCounts.apples[player] .. ' bushels of apples', stringColorToRGB(player))
printToAll(' ' .. goodCounts.apples[player] .. ' bushels of apples', stringColorToRGB(player))
if royalty.apples[1] then
if royalty.apples[1] then
if player == royalty.apples[3] or player == royalty.apples[5] then
if player == royalty.apples[3] or player == royalty.apples[5] then
printToAll(' [b]Tied for Apple King![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Tied for Apple King![/b]', {0.6, 0.6, 0.6})
end
end
elseif royalty.apples[2] then
elseif royalty.apples[2] then
if player == royalty.apples[3] then
if player == royalty.apples[3] then
printToAll(' [b]Apple King![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Apple King![/b]', {0.6, 0.6, 0.6})
elseif player == royalty.apples[4] or player == royalty.apples[6] then
elseif player == royalty.apples[4] or player == royalty.apples[6] then
printToAll(' [b]Tied for Apple Queen![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Tied for Apple Queen![/b]', {0.6, 0.6, 0.6})
end
end
else
else
if royalty.apples[3] == player then
if royalty.apples[3] == player then
printToAll(' [b]Apple King![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Apple King![/b]', {0.6, 0.6, 0.6})
elseif royalty.apples[4] == player then
elseif royalty.apples[4] == player then
printToAll(' [b]Apple Queen![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Apple Queen![/b]', {0.6, 0.6, 0.6})
end
end
end
end


printToAll(' ' .. goodCounts.breads[player] .. ' loaves of bread', stringColorToRGB(player))
printToAll(' ' .. goodCounts.breads[player] .. ' loaves of bread', stringColorToRGB(player))
if royalty.breads[1] then
if royalty.breads[1] then
if player == royalty.breads[3] or player == royalty.breads[5] then
if player == royalty.breads[3] or player == royalty.breads[5] then
printToAll(' [b]Tied for Bread King![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Tied for Bread King![/b]', {0.6, 0.6, 0.6})
end
end
elseif royalty.breads[2] then
elseif royalty.breads[2] then
if player == royalty.breads[3] then
if player == royalty.breads[3] then
printToAll(' [b]Bread King![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Bread King![/b]', {0.6, 0.6, 0.6})
elseif player == royalty.breads[4] or royalty.breads[6] then
elseif player == royalty.breads[4] or royalty.breads[6] then
printToAll(' [b]Tied for Bread Queen![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Tied for Bread Queen![/b]', {0.6, 0.6, 0.6})
end
end
else
else
if royalty.breads[3] == player then
if royalty.breads[3] == player then
printToAll(' [b]Bread King![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Bread King![/b]', {0.6, 0.6, 0.6})
elseif royalty.breads[4] == player then
elseif royalty.breads[4] == player then
printToAll(' [b]Bread Queen![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Bread Queen![/b]', {0.6, 0.6, 0.6})
end
end
end
end


printToAll(' ' .. goodCounts.cheese[player] .. ' wheels of cheese', stringColorToRGB(player))
printToAll(' ' .. goodCounts.cheese[player] .. ' wheels of cheese', stringColorToRGB(player))
if royalty.cheese[1] then
if royalty.cheese[1] then
if player == royalty.cheese[3] or player == royalty.cheese[5] then
if player == royalty.cheese[3] or player == royalty.cheese[5] then
printToAll(' [b]Tied for Cheese King![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Tied for Cheese King![/b]', {0.6, 0.6, 0.6})
end
end
elseif royalty.cheese[2] then
elseif royalty.cheese[2] then
if player == royalty.cheese[3] then
if player == royalty.cheese[3] then
printToAll(' [b]Cheese King![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Cheese King![/b]', {0.6, 0.6, 0.6})
elseif player == royalty.cheese[4] or royalty.cheese[6] then
elseif player == royalty.cheese[4] or royalty.cheese[6] then
printToAll(' [b]Tied for Cheese Queen![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Tied for Cheese Queen![/b]', {0.6, 0.6, 0.6})
end
end
else
else
if royalty.cheese[3] == player then
if royalty.cheese[3] == player then
printToAll(' [b]Cheese King![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Cheese King![/b]', {0.6, 0.6, 0.6})
elseif royalty.cheese[4] == player then
elseif royalty.cheese[4] == player then
printToAll(' [b]Cheese Queen![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Cheese Queen![/b]', {0.6, 0.6, 0.6})
end
end
end
end


printToAll(' ' .. goodCounts.chicks[player] .. ' chickens', stringColorToRGB(player))
printToAll(' ' .. goodCounts.chicks[player] .. ' chickens', stringColorToRGB(player))
if royalty.chicks[1] then
if royalty.chicks[1] then
if player == royalty.chicks[3] or player == royalty.chicks[5] then
if player == royalty.chicks[3] or player == royalty.chicks[5] then
printToAll(' [b]Tied for Chicken King![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Tied for Chicken King![/b]', {0.6, 0.6, 0.6})
end
end
elseif royalty.chicks[2] then
elseif royalty.chicks[2] then
if player == royalty.chicks[3] then
if player == royalty.chicks[3] then
printToAll(' [b]Chicken King![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Chicken King![/b]', {0.6, 0.6, 0.6})
elseif player == royalty.chicks[4] or royalty.chicks[6] then
elseif player == royalty.chicks[4] or royalty.chicks[6] then
printToAll(' [b]Tied for Chicken Queen![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Tied for Chicken Queen![/b]', {0.6, 0.6, 0.6})
end
end
else
else
if royalty.chicks[3] == player then
if royalty.chicks[3] == player then
printToAll(' [b]Chicken King![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Chicken King![/b]', {0.6, 0.6, 0.6})
elseif royalty.chicks[4] == player then
elseif royalty.chicks[4] == player then
printToAll(' [b]Chicken Queen![/b]', {0.6, 0.6, 0.6})
printToAll(' [b]Chicken Queen![/b]', {0.6, 0.6, 0.6})
end
end
end
end


printToAll(' ' .. goodCounts.contra[player] .. ' contraband items', stringColorToRGB(player))
printToAll(' ' .. goodCounts.contra[player] .. ' contraband items', stringColorToRGB(player))
printToAll('[b]-----------------------[/b]', {0.2, 0.2, 0.2})
printToAll('[b]-----------------------[/b]', {0.2, 0.2, 0.2})
end
end
end
end