well, I think its not the same, and I think thats why u have this errors. Just Try what I say, but if u know better ok
this is 8.1 or 8.11?
The ShopModule:addBuyableItemContainer still not working
For some reason my Descriptions are messed up. I tried connecting on an 8.21 client and an 8.22 client to test this out.
No matter what I look at it says the following. (For Example, Looking at a staircase).
"15:42 You see an item of type 1396."
Edit: This is with patch 7.
It works, but you have to buy the item container the old way, not with trade window.
ShopModule:addBuyableItemContainer({'backpack of smp', 'bp of smp'}, 2001, 7589, 310, 'backpack of strong mana potion')
[15/08/2008 17:00:11] data/npc/lib/npcsystem/modules.lua:785: attempt to index field 'npcHandler' (a nil value)
[15/08/2008 17:00:11] [Warning - NpcScript::NpcScript] Can not load script: data/npc/scripts/runes.lua
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
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)
shopModule:addBuyableItemContainer({'bp sd'}, 2003, 2268, 6500, 6, 'backpack of sudden death')
shopModule:addBuyableItemContainer({'bp uh'}, 2002, 2273, 3500, 2, 'backpack of ultimate healing')
npcHandler:addModule(FocusModule:new())
Try this one (can't remember who made it, got it somewhere in this thread and made it compatible):
Code:local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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) shopModule:addBuyableItemContainer({'bp sd'}, 2003, 2268, 6500, 6, 'backpack of sudden death') shopModule:addBuyableItemContainer({'bp uh'}, 2002, 2273, 3500, 2, 'backpack of ultimate healing') npcHandler:addModule(FocusModule:new())