1) Delete the medal and put it back up (well, I haven;t tried this but it should work in theory)
2) Parse through the medal page to get the list of players who earned the medal and clear it.
Obviously, this is the second method. This is essentially a plug-and-play type of script, the only thing that needs to be changed is the URL to the medal, which the information (particularly the medal #) can be obtained through view source on the medal page.
medal_url_page = "http://www.byond.com/games/[Hub key]/[hub name]?command=view_medals_ajax&medal=[medal #]&full=1" // You can get the medal # by looking through the page source on the medal section
i = 1
src << "Starting erasing"
for()// Infinite loop, like while(1)
http = world.Export(medal_url_page) // Gets the HTML from the medal page
CRASH("Is your internet working?")
http = file2text(http["CONTENT"]) // Getting the text of the html
if(findtext(http,"no players have earned this medal")) // If this cannot be found, that means all of the medals for that has been gone
if(!medal_name) // Making sure you want to delete the medal
// Parsing for the medal name
var/n = findtext(http,"title=")+7
n = copytext(http,n,findtext(http,"\"",n))
if(alert(src,"Are you sure you want to delete the medal \"[n]\"?","Erase Medal: [n]","?_?","No","Yes") != "Yes")
medal_name = n
// Clearing the people listed on the medal page
if(!Xkey) // If no more members for that page remains, we break out of the loop to get other people
var/End = findtext(http, "\"", Xkey)
Xkey = copytext(http, Xkey, End)
// src << "world.ClearMedal([medal_name],[Xkey])"
src << "Erased [Xkey] (#[i++])"
http = copytext(http, End)
src << "Ending erasing!"