27-07-2006, 11:31 PM
Code:
If Item(player(myindex).inv(item).num).Dur < item(itemnum).dur then
percent = item(itemnum).dur / item(player(myindex).inv(item).num).dur
diff = 100 - percent
Cost to shop = item(itemnum).cost - diff
else
cost to shop = item(itemnum).cost
end if
i am sure you can extrapolate teh rest of yoru work form this if not
let me know I should be able to help you when I have time