The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NPCs Not Selling Custom Items
Author Message
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #1
NPCs Not Selling Custom Items
Hey,

Another annoying post. I'm sorry, I actually try my best before posting. Sad

I'm trying to make the tailor NPC sell a custom deed, but no luck so far, they show on the selling menu, but they are not in stock. I'll explain a bit more below:

Code:
[TEMPLATE VENDOR_S_TAILOR]
CATEGORY=Vendor Templates
SUBSECTION=Sell Templates
DESCRIPTION=Tailor
SELL=i_sewing_kit,{1 2}
SELL=i_scissors,{1 2}
SELL=i_dye_tub,{1 2}
SELL=i_DYES,{1 2}
...
...
SELL=i_deed_loom_s,{2 6}

Code:
[ITEMDEF i_deed_loom_s]
NAME=deed to an upright loom (South)
VALUE=50000
ID=i_deed
RESOURCES=i_deed, i_loom_s

ON=@Create
MORE=i_loom_s
ATTR=attr_newbie

First - I made sure the deed is reading before the vendor templates.

Second - VALUE does not work, it's 100k instead of 50k.

Third -

Code:
WARNING:1:Cheater 'admin' is submitting illegal buy packet (Requested items out of stock)

Forth - In game the NPC says:

Code:
Alas, I don't have these goods currently stocked. Let me know if there is something else thou wouldst buy.

Again, I can see the items in the menu, but I can't buy them. There must be a problem on the restock, but I haven't figure out how to fix it.

Thanks again!
09-04-2013 07:01 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: NPCs Not Selling Custom Items
Remove the ATTR=ATTR_NEWBIE and test again.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-05-2013 01:57 AM
Find all posts by this user Like Post Quote this message in a reply
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #3
RE: NPCs Not Selling Custom Items
This is not the issue. My houses are newbied as well and sell just fine.

I tested anyway and no luck. It's something else.
Thanks for your help anyway!

Made a new test. The issue seems to be the deeds. Value still not work and I still can't buy.

Any and all other custom item sells just fine... ):
(This post was last modified: 09-05-2013 03:00 PM by pinku.)
09-05-2013 02:49 PM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #4
RE: NPCs Not Selling Custom Items
For an item to be bought and sold it needs both VALUE and WEIGHT...

If you don't explicitly set the WEIGHT of a thing, it will try to compute the weight using the RESOURCES... if the items in the list of RESOURCES do not themselves have WEIGHT or RESOURCES defined, the WEIGHT in the MUL (or UOP) file is used... if they dont have a valid value either, the item is considered unmovable.

To make a long story short, try adding WEIGHT=1 to your deed ITEMDEF and add a VALUE to the base item (that you are setting on MORE in @Create).

That's my theory anyway ;-)
(This post was last modified: 09-05-2013 03:33 PM by RanXerox.)
09-05-2013 03:26 PM
Find all posts by this user Like Post Quote this message in a reply
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #5
RE: NPCs Not Selling Custom Items
This was indeed the error. Shock
I would never imagine that.

Thanks RanXerox!
09-05-2013 05:03 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)