QUOTE(Scremaz @ Jun 9 2014, 19:04)

pseudocode is better than nothing (IMG:[
invalid]
style_emoticons/default/smile.gif)
Couldn't really do that for the logics either but oh well:
First off, modify the repair cost on the right pane to show existing supplies of repair mats:
From this:
CODE
Repair Cost:
2x Wispy Catalyst
4x Scrap Wood
to this:
CODE
Repair Cost:
2x Wispy Catalyst (18)
4x Scrap Wood (43)
Then, if the needed materials is more than the stocked mats, they'll be displayed in red, and the purchasing cost is displayed on the right like this:
CODE
Repair Cost:
2x Wispy Catalyst (18)
4x Scrap Wood (3) -100C
the (3) will be in red.
Sounds easy enough, but the main (=hard) part starts here:
And then there's the repair all button underneath the repair button in the currently equiped section, which will auto calculate the total repair costs and stock. It'll tell you the amount of mats needed and auto-buy the mats if necessary and tell you the total cost of repair in mats and credits in a popup message, click yes and you'll repair them all.
I'd vouch for the option to not auto-buy the scraps when you have scrap deficits if you don't want to... as the variable in the script.
Not exactly a cinch of a script to write I think as it may need a handful of debugging, but that should be the gist of it.
EDIT: as holy_demon said, the POST request would be the annoying part indeed... Well, instead of making POST request for each equip it should've pre-calculate them instead and order the mats in one go, but it'll need quite a debugging.
This post has been edited by LostLogia4: Jun 9 2014, 13:28