SWR Shop prices

Posted by Dolph on Tue 19 Aug 2003 08:32 AM — 3 posts, 15,683 views.

#0
I have noticed that shop keepers seem to change their prices depending on the level of the character buying the item and was wondering if there was a way to disable this and keep the prices constant no matter what the level of the character is.
USA #1
Well, I'm not able to look at my source right now, but I do believe do_list calls a function to find out the price. All you would have to do is:
A) Tinker the function
B) Take out the call and replace it with a call to the price, so that you may directly buy it from the price. Thus, setting the price to 200 would make it cost 200, instead of how stock has it. In order to make that work you will need to fix do_buy also (I'm thinking much of the same way..). Once I get my internet running again and I don't have to use this computer, I'll see if I can help you out a bit more if you need it.
USA #2
There is a function in shops.c called 'get_cost' it has a rather extravagant way of calculating the cost of an object. If you're comfortable with tinkering with code that's where you'd want to look. However if you just want to make the prices "standard" replace the get_cost function with this:


int get_cost( CHAR_DATA *ch, CHAR_DATA *keeper, OBJ_DATA *obj, bool fBuy )
{
  return obj->cost;
}


This is by far not the most efficiant way to do this, but it works ;-)

-Bobo