factors?:
item grade
buyable from NPC (highest item here is sword of delusion duals i believe)
cost of enchants
number of enchants (used/succesful?)
greed (yeah)
if you fail going to +(lets say)5 on one item, then get +5 the second try, are you justified to sell it at double the cost to cover it?
+3 is easy i suppose: average item cost + cost enchant*3
going to +4... adding double the cost of one enchant onto the price as a risk factor? tripling the price of one enchant going up to +6?
I'm not really going crazy trying to figure this out (yet) but still, i'd like to know your thoughts :p
I tried making a 100% accurate spreadsheet to calculate the cost and statistical cost of overenchants, but after two nights and several hours it just got so complicated due to all the factors involved, that the sheet would be more awkward to use than it would be to just guess the price by your gut.
Another major major problem is that nobody knows the exact overenchant success rates for each item. Some (even the login daily tip) says 1 in 3 failure rate accross the board, some say 70% for weapons and 50% for armor, "that certain site" says 68%. Personally, I'm growing more and more biased towards 75% on fighter weapons and the first OE on armor, with 50% on mystic weapons and 33% on successive armor OE's. Many (including me) are even inclined to believe that grade is of importance, with d-grade sets being near impossible to get to +6 while plenty will say they got some of their +6 B-grade in one or two tries.
Anyway.
Assuming the rate of success for an OE is 2/3, that would mean the statistical price of one OE (assuming the enchants are free, just to keep it simple) is [original item] * (100/(2/3)), or *1.5.
Then you have to factor in the enchant scroll costs. Then how much return you get from failed oe's (because if you want to factor in fails, you have to include the "profit" from that fail as well). Then how much one added enchant adds to that return. Don't forger to multiply the return with how many tries it will statistically take.
What you end up with is a horribly long equation with half a dozen entries you need to manually alter for each specific situation, and even then it won't be accurate because the success rate isn't known and just an assumption.
Basically I just go with [item market value+scrolls]*1.5 for each OE (remember to multiply it exponentially, using the previous result for the next OE and not just 1.5*2), with "a little more than half" the item's crystal value in return for each fail.
Anything more and it's starting to get pretty pointless, since the difference between assuming a rate of 66 and 68 is larger than the difference if you accurately include the added crystals from enchants or not.
As for setting the price depending on if you failed the first one or not? Eh.. not really the right way to think about it imo. What's the point in succeeding the first OE if you sell it cheap "because" it succeeded on first try? As a buyer I don't care half a left nipple about how many tries it took him to make it.
A +4 sword is worth to me exactly the same amount from someone who failed 18 of them as someone who got it on first try with free scrolls on a weapon he got as a drop.