Most of it works for the most part, there are tons of errors and other things that need tending to.
Right now, I am not sure what this was being used for. If I am reading the code correctly, it was updating a database of sorts with pricing. Which could be a database that was updating from the PnW API to be stored locally. I also do not know how often the API is updated to make sure that prices are correct. The current domain being used, is no longer active.
function checkPrices(){
if(resCount != resources.length * 2){
setTimeout(checkPrices, 1e3);
}else{
createProfitsTable();
createBuySellTable();
var now = new Date().getTime();
if(GM_getValue("dblastUpdate", 0) == 0 || Number(GM_getValue("dblastUpdate"))+3.6e+6 < now){
GM_setValue("dblastUpdate", now);
GM_xmlhttpRequest({
method: "POST",
url: "http://www.ereptools.tk/paw/pnwhelper.php",
data: "coal="+GM_getValue("sellcoal")+"&oil="+GM_getValue("selloil")+"&bauxite="+GM_getValue("sellbauxite")+"&iron="+GM_getValue("selliron")+"&lead="+GM_getValue("selllead")+"&uranium="+GM_getValue("selluranium")+"&food="+GM_getValue("sellfood")+"&gasoline="+GM_getValue("sellgasoline")+"&aluminum="+GM_getValue("sellaluminum")+"&steel="+GM_getValue("sellsteel")+"&munitions="+GM_getValue("sellmunitions")+"&credits="+GM_getValue("sellcredits"),
headers: {
"Content-Type": "application/x-www-form-urlencoded"
}
});
}
}
}