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-nmm7 (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-nmm7 (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-nmm7 (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
NPC not selling any items
Author Message
tleilax
Journeyman
*

Posts: 56
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jun 2012
Reputation: 0



Post: #1
NPC not selling any items
Hello, after upgrading to 56b from 55i, I've encountered strange behaviour with my NPC script. One (dwarf) is selling items normally, the other one (necro) on "buy" replies "Sorry I have no goods to sell"

Could you help me find the error in script? Posting both NPCs. Myself, I can't find anything strange.

Dwarf one (working):
Code:
[CHARDEF c_dwarf_baker]
NAME=#NAMES_HUMANMALE the dwarven Baker
ID=C_MAN
DESIRES=i_gold,e_notoriety

TSPEECH=spk_human_prime
TSPEECH=jobbaker
TSPEECH=spk_shopkeep
TSPEECH=spk_needs
TSPEECH=spk_rehello
TSPEECH=spk_human_default

TEVENTS=e_Human_HearUnk
TEVENTS=e_Human_Needs
TEVENTS=e_Human_ConvInit
TEVENTS=e_Human_Greet
TEVENTS=e_Human_Space
TEVENTS=e_Human_Refuse
TEVENTS=e_Human_Environ
TEVENTS=e_resist

ON=@Create
TAG.POISONIMUNITY=0
TAG.ZRANITELNOST=0
NPC=BRAIN_VENDOR
NEED=i_FLOUR_SACK
COLOR=colors_darkskin
STR={34 48}
DEX={33 47}
INT={26 40}

COOKING={55.0 78.0}
SWORDSMANSHIP={15.0 38.0}
TASTEID={50.0 70.0}
TACTICS={15.0 38.0}
PROVOCATION=180

ITEMNEWBIE=i_hair_LONG
COLOR=colors_hair
ITEMNEWBIE=i_beard_LONG
COLOR=match_hair

ON=@NPCRestock
ITEM=i_shirt_plain
COLOR=colors_all
ITEM=random_pants
COLOR=colors_all
ITEM=random_shoes
COLOR=colors_neutral
ITEM=i_apron_full
ITEM=random_coin_purse

//vendor items
SELL=VENDOR_S_BAKER_TEMPLATE
//BUY=VENDOR_B_BAKER_TEMPLATE

CATEGORY=NPC Dwarves
SUBSECTION=Tradesmen
DESCRIPTION=Baker (male)

Necro one (not working):
Code:
[CHARDEF c_Necro_BAKER]
NAME=#NAMES_drow
ID=C_MAN
DESIRES=i_gold,t_grain,e_notoriety
AVERSIONS=t_TRAP,t_eerie_stuff

TSPEECH=spk_human_prime
TSPEECH=jobbaker
TSPEECH=spk_shopkeep
TSPEECH=spk_needs
TSPEECH=spk_rehello
TSPEECH=spk_human_default

TEVENTS=e_Human_HearUnk
TEVENTS=e_Human_Needs
TEVENTS=e_Human_ConvInit
TEVENTS=e_Human_Greet
TEVENTS=e_Human_Space
TEVENTS=e_Human_Refuse
TEVENTS=e_Human_Environ
TEVENTS=e_resist

ON=@Create
TAG.POISONIMUNITY=0
TAG.ZRANITELNOST=0
TITLE=Drow
COLOR=096c
NPC=BRAIN_VENDOR
NEED=i_FLOUR_SACK

STR={34 48}
DEX={33 47}
INT={26 40}

COOKING={55.0 78.0}
SWORDSMANSHIP={15.0 38.0}
TASTEID={50.0 70.0}
TACTICS={15.0 38.0}
PROVOCATION=160.0

ITEM=RANDOM_LIGHT
ITEMNEWBIE=i_staff_gnarled
ITEMNEWBIE=i_hair_long
COLOR=0b5d
ITEMNEWBIE=i_robe
COLOR=00455
ITEMNEWBIE=i_sandals
COLOR=00455

ITEM=random_coin_purse

//vendor items
SELL=VENDOR_S_BAKER_TEMPLATE
//BUY=VENDOR_B_BAKER_TEMPLATE

CATEGORY=Special-Necromance
SUBSECTION=Tradesmen
DESCRIPTION=Baker

It's just not this one NPC, but all the necro vendors.
12-27-2013 09:21 AM
Find all posts by this user Like Post Quote this message in a reply
dagger4k
Journeyman
*

Posts: 194
Likes Given: 1
Likes Received: 12 in 12 posts
Joined: Mar 2012
Reputation: 0



Post: #2
RE: NPC not selling any items
Look under sphere_template_vend
12-27-2013 07:43 PM
Find all posts by this user Like Post Quote this message in a reply
tleilax
Journeyman
*

Posts: 56
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jun 2012
Reputation: 0



Post: #3
RE: NPC not selling any items
But they both have the same vendor template...

Code:
[TEMPLATE VENDOR_S_BAKER_TEMPLATE]
DEFNAME=VENDOR_S_BAKER_TEMPLATE
CATEGORY=Vendor Templates
SUBSECTION=Sell Templates
DESCRIPTION=Baker
SELL=i_bread_loaf,{0 15}
SELL=i_pie_baked,{0 7}
SELL=i_cake,{0 5}
SELL=i_muffin,{0 6}
SELL=i_flour_sack,{0 8}
SELL=i_bread_french,{0 11}
SELL=i_pan_cookies,{0 6}
SELL=i_pizza,{0 9}
SELL=i_jar_honey,{0 6}
SELL=i_dough,{0 8}
(This post was last modified: 12-27-2013 07:51 PM by tleilax.)
12-27-2013 07:51 PM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #4
RE: NPC not selling any items
This is the problem... missing ON=@NPCRestock in the necro NPC

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
12-27-2013 11:47 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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