Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ SWR Shop prices
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Dolph
(10 posts) Bio
|
| Date
| Tue 19 Aug 2003 08:32 AM (UTC) |
| Message
| | 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. | | Top |
|
| Posted by
| Nick Cash
USA (626 posts) Bio
|
| Date
| Reply #1 on Thu 21 Aug 2003 03:38 AM (UTC) |
| Message
| 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
http://www.nick-cash.com | | Top |
|
| Posted by
| Boborak
USA (228 posts) Bio
|
| Date
| Reply #2 on Fri 22 Aug 2003 09:18 AM (UTC) |
| Message
| 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 | | 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.
13,862 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top