Merchants of Smaug

Posted by Garaelb on Sun 20 Jul 2003 09:43 PM — 5 posts, 19,357 views.

#0
Hi gang - its me your friendly neighborhood SMAUG Building dummy, here with another question.

While trying to build a shop in my game I want the shop to only sell itmes of level 2 - basically for new players. How do i set the item level limit on items sold in a shop? No item should be above level 5. So I want a range between level 2 and level 5 items.

Example a
Lv 2 wooden sword (weapon)
Lv 2 Skull cap (armor)
Lv 2 Sweet Water (potion of cure light)

Any ideas?


Garaelb
#1
Hi gang - I'm still having problems trying to fix the levels of items for sale in a shop.

Area ranges are set -
SOFT - 0-5
HARD 0-65

The shop is actually a whole area of it's own. Kind of like an adventurer's department store. The 'clerks' are mobs of various levels generally above 20th level. But the itmes for sale I want to be 5th level or lower. What can I do? How can I do it? Do you need more information about the area?
#2
Just bumping this up again looking for an answer.
Australia Forum Administrator #3
Setting the soft level to 5 (or lower) seems to limit the items on sale to a maximum of 5 - for example:


Armory
This shop's owner is a dedicated creator of armor and shields.  
Having lost her son to shabby equipment, she took up the job of 
putting protective suits of mail together.  
To the west is the blacksmith's, while the armourer's is to the east.  
An opening in the tent leads back out north onto Market Street.  
Exits: north east west.
The armourer is here fitting a mail helm.
Nick the Recruit is deep in slumber here.
A stray dog noses along the street.

<3000hp 5000m 3100mv> 
list
[Lv Price] Item
[ 5  1742] A crested breastplate.
[ 5   174] An iron bracer.
[ 5  1045] An iron guard.
[ 5  1393] An iron helm.
[ 5  1045] An iron shield.
[ 5   174] An iron visor.
[ 5   348] Black boots.
[ 5   696] Chain sleeves.
[ 5   696] Iron gauntlets.
[ 5   522] Mail leggings.


I don't seem to be able to get the level to go below 5 - however I think it is linked to the area level, with a minimum - seems to be since they are all level 5.

For instance, with the area level set to 65 - the normal - then I see this ...


[Lv Price] Item
[17  1742] A crested breastplate.
[16   174] An iron visor.
[12  1045] An iron guard.
[ 8  1045] An iron shield.
[ 7   174] An iron bracer.
[ 7   696] Chain sleeves.
[ 6  1393] An iron helm.
[ 6   348] Black boots.
[ 6   696] Iron gauntlets.
[ 5   522] Mail leggings.


I suspect there will be a line like this that is relevant ...


 level       = UMIN(5, level);


In fact I found such a line in magic.c however I don't think it is relevant to this particular case.
Amended on Mon 28 Jul 2003 06:10 AM by Nick Gammon
#4
Thanks Nick.

I was starting to guess that it was one of those hard coded features of the game. My players are entering the world nekid and without weapons. Level 5 is a long way to go to get a decent weapon to use. Well I guess I'l just have to make something to do that. I was hoping it could be a store as I hate to just GIVE away anything in the game. Maybe I can make a MOB or something to do that instead.

Thanks again Nick,

And you're much better than just a recruit. ;)

~G~