[Resolved] GC9NW86 - Challenge to cover 25% of the land area of the US February 24, 2022 03:33AM |
Registered: 6 years ago Posts: 73 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US February 24, 2022 11:37AM |
Moderator Registered: 7 years ago Posts: 20,862 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US February 25, 2022 04:38AM |
Registered: 6 years ago Posts: 73 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US March 05, 2022 03:04AM |
Registered: 6 years ago Posts: 73 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US March 05, 2022 11:42AM |
Moderator Registered: 7 years ago Posts: 20,862 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US March 05, 2022 06:15PM |
Registered: 6 years ago Posts: 73 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US March 19, 2022 04:01PM |
Registered: 6 years ago Posts: 73 |
= true end local res={} for _,f in ipairs(finds) do if not codes[f.gccode] and f.type~="Locationless (Reverse) Cache" then table.insert(res, f) else PGC.print(f.cache_name .. " " .. f.gccode .. " http://coord.info/" .. f.gccode .. " " .. f.region .. "\n" ) end end return res end local WinCount=0 local LossCount=0 States = {} States["Alabama"] ={} States["Alabama"]["Name"] = "Alabama" States["Alabama"]["Status"] = "Not Found" States["Alabama"]["Votes"] = "50645.33" States["Alaska"] ={} States["Alaska"]["Name"] = "Alaska" States["Alaska"]["Status"] = "Not Found" States["Alaska"]["Votes"] = "570640.95" States["Arizona"] ={} States["Arizona"]["Name"] = "Arizona" States["Arizona"]["Status"] = "Not Found" States["Arizona"]["Votes"] = "113594.08" States["Arkansas"] ={} States["Arkansas"]["Name"] = "Arkansas" States["Arkansas"]["Status"] = "Not Found" States["Arkansas"]["Votes"] = "52035.48" States["California"] ={} States["California"]["Name"] = "California" States["California"]["Status"] = "Not Found" States["California"]["Votes"] = "155779.22" States["Colorado"] ={} States["Colorado"]["Name"] = "Colorado" States["Colorado"]["Status"] = "Not Found" States["Colorado"]["Votes"] = "103641.89" States["Connecticut"] ={} States["Connecticut"]["Name"] = "Connecticut" States["Connecticut"]["Status"] = "Not Found" States["Connecticut"]["Votes"] = "4842.36" States["Delaware"] ={} States["Delaware"]["Name"] = "Delaware" States["Delaware"]["Status"] = "Not Found" States["Delaware"]["Votes"] = "1948.54" States["District of Columbia"] ={} States["District of Columbia"]["Name"] = "District of Columbia" States["District of Columbia"]["Status"] = "Not Found" States["District of Columbia"]["Votes"] = "61.05 States["Florida"] ={} States["Florida"]["Name"] = "Florida" States["Florida"]["Status"] = "Not Found" States["Florida"]["Votes"] = "53624.76" States["Georgia"] ={} States["Georgia"]["Name"] = "Georgia" States["Georgia"]["Status"] = "Not Found" States["Georgia"]["Votes"] = "57513.49" States["Hawaii"] ={} States["Hawaii"]["Name"] = "Hawaii" States["Hawaii"]["Status"] = "Not Found" States["Hawaii"]["Votes"] = "6422.63" States["Idaho"] ={} States["Idaho"]["Name"] = "Idaho" States["Idaho"]["Status"] = "Not Found" States["Idaho"]["Votes"] = "82643.12" States["Illinois"] ={} States["Illinois"]["Name"] = "Illinois" States["Illinois"]["Status"] = "Not Found" States["Illinois"]["Votes"] = "55518.93" States["Indiana"] ={} States["Indiana"]["Name"] = "Indiana" States["Indiana"]["Status"] = "Not Found" States["Indiana"]["Votes"] = "35826.11" States["Iowa"] ={} States["Iowa"]["Name"] = "Iowa" States["Iowa"]["Status"] = "Not Found" States["Iowa"]["Votes"] = "55857.13" States["Kansas"] ={} States["Kansas"]["Name"] = "Kansas" States["Kansas"]["Status"] = "Not Found" States["Kansas"]["Votes"] = "81758.72" States["Kentucky"] ={} States["Kentucky"]["Name"] = "Kentucky" States["Kentucky"]["Status"] = "Not Found" States["Kentucky"]["Votes"] = "39486.34" States["Louisiana"] ={} States["Louisiana"]["Name"] = "Louisiana" States["Louisiana"]["Status"] = "Not Found" States["Louisiana"]["Votes"] = "43203.90" States["Maine"] ={} States["Maine"]["Name"] = "Maine" States["Maine"]["Status"] = "Not Found" States["Maine"]["Votes"] = "30842.92" States["Maryland"] ={} States["Maryland"]["Name"] = "Maryland" States["Maryland"]["Status"] = "Not Found" States["Maryland"]["Votes"] = "9707.24" States["Massachusetts"] ={} States["Massachusetts"]["Name"] = "Massachusetts" States["Massachusetts"]["Status"] = "Not Found" States["Massachusetts"]["Votes"] = "7800.06" States["Michigan"] ={} States["Michigan"]["Name"] = "Michigan" States["Michigan"]["Status"] = "Not Found" States["Michigan"]["Votes"] = "56538.90" States["Minnesota"] ={} States["Minnesota"]["Name"] = "Minnesota" States["Minnesota"]["Status"] = "Not Found" States["Minnesota"]["Votes"] = "79626.74" States["Mississippi"] ={} States["Mississippi"]["Name"] = "Mississippi" States["Mississippi"]["Status"] = "Not Found" States["Mississippi"]["Votes"] = "46923.27" States["Missouri"] ={} States["Missouri"]["Name"] = "Missouri" States["Missouri"]["Status"] = "Not Found" States["Missouri"]["Votes"] = "68741.52" States["Montana"] ={} States["Montana"]["Name"] = "Montana" States["Montana"]["Status"] = "Not Found" States["Montana"]["Votes"] = "145545.80" States["Nebraska"] ={} States["Nebraska"]["Name"] = "Nebraska" States["Nebraska"]["Status"] = "Not Found" States["Nebraska"]["Votes"] = "76824.17" States["Nevada"] ={} States["Nevada"]["Name"] = "Nevada" States["Nevada"]["Status"] = "Not Found" States["Nevada"]["Votes"] = "109781.18" States["New Hampshire"] ={} States["New Hampshire"]["Name"] = "New Hampshire" States["New Hampshire"]["Status"] = "Not Found" States["New Hampshire"]["Votes"] = "8952.65" States["New Jersey"] ={} States["New Jersey"]["Name"] = "New Jersey" States["New Jersey"]["Status"] = "Not Found" States["New Jersey"]["Votes"] = "7354.22" States["New Mexico"] ={} States["New Mexico"]["Name"] = "New Mexico" States["New Mexico"]["Status"] = "Not Found" States["New Mexico"]["Votes"] = "121298.15" States["New York"] ={} States["New York"]["Name"] = "New York" States["New York"]["Status"] = "Not Found" States["New York"]["Votes"] = "47126.40" States["North Carolina"] ={} States["North Carolina"]["Name"] = "North Carolina" States["North Carolina"]["Status"] = "Not Found" States["North Carolina"]["Votes"] = "48617.91" States["North Dakota"] ={} States["North Dakota"]["Name"] = "North Dakota" States["North Dakota"]["Status"] = "Not Found" States["North Dakota"]["Votes"] = "69000.89" States["Ohio"] ={} States["Ohio"]["Name"] = "Ohio" States["Ohio"]["Status"] = "Not Found" States["Ohio"]["Votes"] = "40860.69" States["Oklahoma"] ={} States["Oklahoma"]["Name"] = "Oklahoma" States["Oklahoma"]["Status"] = "Not Found" States["Oklahoma"]["Votes"] = "68594.92" States["Oregon"] ={} States["Oregon"]["Name"] = "Oregon" States["Oregon"]["Status"] = "Not Found" States["Oregon"]["Votes"] = "95988.01" States["Pennsylvania"] ={} States["Pennsylvania"]["Name"] = "Pennsylvania" States["Pennsylvania"]["Status"] = "Not Found" States["Pennsylvania"]["Votes"] = "44742.70" States["Rhode Island"] ={} States["Rhode Island"]["Name"] = "Rhode Island" States["Rhode Island"]["Status"] = "Not Found" States["Rhode Island"]["Votes"] = "1033.81" States["South Carolina"] ={} States["South Carolina"]["Name"] = "South Carolina" States["South Carolina"]["Status"] = "Not Found" States["South Carolina"]["Votes"] = "30060.70" States["South Dakota"] ={} States["South Dakota"]["Name"] = "South Dakota" States["South Dakota"]["Status"] = "Not Found" States["South Dakota"]["Votes"] = "75811.00" States["Tennessee"] ={} States["Tennessee"]["Name"] = "Tennessee" States["Tennessee"]["Status"] = "Not Found" States["Tennessee"]["Votes"] = "41234.90" States["Texas"] ={} States["Texas"]["Name"] = "Texas" States["Texas"]["Status"] = "Not Found" States["Texas"]["Votes"] = "261231.71" States["Utah"] ={} States["Utah"]["Name"] = "Utah" States["Utah"]["Status"] = "Not Found" States["Utah"]["Votes"] = "82169.62" States["Vermont"] ={} States["Vermont"]["Name"] = "Vermont" States["Vermont"]["Status"] = "Not Found" States["Vermont"]["Votes"] = "9216.66" States["Virginia"] ={} States["Virginia"]["Name"] = "Virginia" States["Virginia"]["Status"] = "Not Found" States["Virginia"]["Votes"] = "39490.09" States["Washington"] ={} States["Washington"]["Name"] = "Washington" States["Washington"]["Status"] = "Not Found" States["Washington"]["Votes"] = "66455.52" States["West Virginia"] ={} States["West Virginia"]["Name"] = "West Virginia" States["West Virginia"]["Status"] = "Not Found" States["West Virginia"]["Votes"] = "24038.21" States["Wisconsin"] ={} States["Wisconsin"]["Name"] = "Wisconsin" States["Wisconsin"]["Status"] = "Not Found" States["Wisconsin"]["Votes"] = "54157.80" States["Wyoming"] ={} States["Wyoming"]["Name"] = "Wyoming" States["Wyoming"]["Status"] = "Not Found" States["Wyoming"]["Votes"] = "97093.14" if (debug == true) then PGC.print("\nStates:\n") PGC.print(States) end local finds = remove_crazy_caches( PGC.GetFinds( profileId, { fields = {'gccode', 'cache_name', 'visitdate', 'region', 'type'}, order = 'NEWESTFIRST', filter = filter })) PGC.print(finds) for _,y in ipairs(finds) do -- Loop through the found caches and updat States States[y["region"]]["Status"]="Found" end votecount = 0 local html = "" local log="" local logFirstLine = "Unfortunately you have not visited enough states greater than 25% of the Area of the United States. Here are the states you have: \br\br" local htmlFirstLine = "Unfortunately you have not visited enough states greater than 25% of the Area of the United States. Here are the states you have: <br><br>" for _,v in spairs(States, function(t,a,c) return c > a end) do if (v["Status"] == 'Found') then if v["type"] ~= 'Locationless (Reverse) Cache' then WinCount=WinCount+1 votecount = votecount + v["Votes"] html = html .."<b>" .. v["Name"] .. "</b> " .. v["Votes"] .. " votes. <br>" log=log .."**" .. v["Name"] .. "** " .. v["Votes"] .. " votes. \n" --if (votecount > VotesNeeded) then -- ok = true -- logFirstLine = "#WOOT WOOT, I WON!!#\nI needed " .. VotesNeeded .. " to win and have " .. votecount .. " sq miles of the possible 3,535,948.13 sq miles\n\n" -- htmlFirstLine = "<b>WOOT WOOT, I WON!!</b><br>I needed " .. VotesNeeded .. " to win and have " .. votecount .. " sq miles of the possible 3,535,948.13 sq miles <br><br>" --end if (debug == true) then PGC.print("\n" .. v["Status"] .. ": " .. v["Name"] .. " " .. v["Votes"] .. " votes. Running Total: " .. votecount) end end else LossCount=LossCount +1 end end if (votecount > VotesNeeded) then ok = true logFirstLine = "#WOOT WOOT, I WON!!#\nI needed " .. VotesNeeded .. " to win and have " .. votecount .. " sq miles of the possible 3,535,948.13 sq miles\n\n" htmlFirstLine = "<b>WOOT WOOT, I WON!!</b><br>I needed " .. VotesNeeded .. " to win and have " .. votecount .. " sq miles of the possible 3,535,948.13 sq miles <br><br>" else ok= false html = html .. "<br><br><Strong>Your found area is " .. votecount .. " from " .. WinCount .. " states.</strong><br><br>You need to travel to the following states:<br><br>" for _,v in spairs(States, function(t,a,c) return c > a end) do if (v["Status"] ~= 'Found') then html = html ..'<b><font color="red">' .. v["Name"] .. '</font></b> ' .. v["Votes"] .. ' votes lost. <br>' end end end log = logFirstLine .. log html = htmlFirstLine .. html return { ok = ok, log = log, html = html }
Re: GC9NW86 - Challenge to cover 25% of the land area of the US March 19, 2022 04:11PM |
Registered: 6 years ago Posts: 73 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US March 30, 2022 04:11PM |
Registered: 5 years ago Posts: 638 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US March 30, 2022 10:33PM |
Registered: 7 years ago Posts: 260 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US March 31, 2022 06:36PM |
Registered: 5 years ago Posts: 638 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US April 03, 2022 07:05PM |
Registered: 6 years ago Posts: 73 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US April 03, 2022 08:55PM |
Registered: 5 years ago Posts: 638 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US April 03, 2022 09:38PM |
Registered: 6 years ago Posts: 73 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US April 04, 2022 05:52PM |
Registered: 6 years ago Posts: 73 |
Re: GC9NW86 - Challenge to cover 25% of the land area of the US April 05, 2022 10:42AM |
Registered: 5 years ago Posts: 638 |