I am attempting to make a script for throwing darts. I have
got everything figured out except for the bullseye. I want
a bullseye to be rare so I put it in the table with the rest
of the numbers. The only problem with this is that it will
print display as a Single, Double or Triple Bullseye. How
do I ignore svalue in the script below if snumber =
bullseye?
Thank you.
got everything figured out except for the bullseye. I want
a bullseye to be rare so I put it in the table with the rest
of the numbers. The only problem with this is that it will
print display as a Single, Double or Triple Bullseye. How
do I ignore svalue in the script below if snumber =
bullseye?
-- dart names
local SNUMBERS = {"1", "1", "1", "1", "2", "2", "2", "2", "3", "3", "3", "3", "4", "4", "4", "4", "5", "5", "5", "5", "6", "6", "6", "6", "7", "7", "7", "7", "8", "8", "8", "8", "9", "9", "9", "9", "10", "10", "10", "10", "11", "11", "11", "11", "12", "12", "12", "12", "13", "13", "13", "13", "14", "14", "14", "14", "15", "15", "15", "15", "16", "16", "16", "16", "17", "17", "17", "17", "18", "18", "18", "18", "19", "19", "19", "19", "20", "20", "20", "20", "20", "20", "Bullseye"}
local SVALUE = {"Single", "Single", "Single", "Single", "Single", "Single", "Single", "Single", "Single", "Single", "Double", "Double", "Double", "Double", "Double", "Double", "Triple", "Triple", "Triple"}
-- generate the darts
sdarts = {}
for i, snumbers in ipairs (SNUMBERS) do
for j, svalue in ipairs (SVALUE) do
table.insert (sdarts, svalue .. " " .. snumbers)
end -- for each number
end -- for each value
-- shuffle it
require "commas"
shuffle (sdarts)
Send ("emote throws a dart at a dart board. " .. table.remove (sdarts))
Thank you.