Question..
![]() ![]() |
Can this be used to find the lowest available shop wizard price using the SW not the SSW. E.g.: Use this script with another to find the lowest price of an item. |
![]() ![]() |
you can use this script to find items. ordering them by price is up to you an example of using this script to find the lowest price would be:
function getLowestPrices(item, attempts, callback)
{
(function recursive(items, e, h, m, item, attempts, callback, list) // creates an recursive function to keep an search after another
{
list.push.apply(list, items);
if (--attempts < 0) // done!
{
callback(list.sort(function(a, b)
{
return ( a.Price == b.Price ? 0 : ( a.Price < b.Price ? -1 : 1 ) );
}));
}
else // keep searching...
{
setTimeout(Wizard.find, 1000, item, recursive, item, attempts, callback, list);
}
})([], undefined, false, undefined, item, attempts, callback, []);
}
// and then...
getLowestPrices("plain omelette", 10, function(items)
{
alert("Lowest price: "+items[0].Price);
});
I haven't tested it but you got the ideia |

