The gear presets suck, the search sucks, and a lot of items are missing. Glory/combat bracelet only have (4) and uncharged versions.
Also it still tries to buy things in the GE without coins in inventory, like why not check first?
Use a delay, in case you need to eat, tele, etc.
Also make sure when you calculate the random delay, you set it to a variable. Otherwise every loop it will recalculate and be more likely to be a shorter delay.
Make sure to add a delay between hovering and either choose to hover over the same NPC or it might just hover over what's closest (depending how you have it coded), which could change frequently.
"'n' is multiplied by 'n-1'" -- no, n is multiplied by factorial(n-1)
"Value is assigned to 'temp'" -- not really how recursive functions work, there is no "temporary" store in memory, but it is a temporary variable if you mean as such.