arturhaddad
Member
- Joined
- Aug 14, 2010
- Messages
- 217
- Reaction score
- 8
My NPCs don't sell vial of something, like vial of water, blood, oil, etc
In scripts I've tried:
It worked for the water, but:
Gives 2 vials of water (or one of the subtypes listed bellow)
Work until subtype 7
1 - water
2 - blood
3 - beer
4 - slime
5 - limonade
6 - milk
7 - manafluid
Any value above 7 gives
[ShopModule.onBuy]
Item not found on shopItems list
And if I try to add it trough XML:
<parameter key="shop_buyable" value="vial of oil,2006,20;11"/>
In scripts I've tried:
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local Topic = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
-------------------------------------------------SHOP---------------------------------------------------------
shopModule:addBuyableItem({'vial of water'}, 2006, 8, 1, 'vial of water')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
It worked for the water, but:
Gives 2 vials of water (or one of the subtypes listed bellow)
Work until subtype 7
1 - water
2 - blood
3 - beer
4 - slime
5 - limonade
6 - milk
7 - manafluid
Any value above 7 gives
[ShopModule.onBuy]
Item not found on shopItems list
And if I try to add it trough XML:
<parameter key="shop_buyable" value="vial of oil,2006,20;11"/>