[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  SWR Shop prices
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

SWR Shop prices

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Posted by Dolph   (10 posts)  [Biography] bio
Date Tue 19 Aug 2003 08:32 AM (UTC)
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.
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #1 on Thu 21 Aug 2003 03:38 AM (UTC)
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.

~Nick Cash
[Go to top] top

Posted by Boborak   USA  (228 posts)  [Biography] bio
Date Reply #2 on Fri 22 Aug 2003 09:18 AM (UTC)
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 ;-)

[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]