HI !
My npc sell me 2 x the same item as i check on trade.
NPC.xml :
Poion seller.lua :
My npc sell me 2 x the same item as i check on trade.
NPC.xml :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Senzu Seller" script="data/npc/scripts/potion seller.lua" walkinterval="2000" floorchange="0">
<health now="150" max="150"/>
<look type="154"/>
<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|. If need any heal item's, ask me for a trade."/>
<parameter key="message_farewell" value="Good bye."/>
<parameter key="message_walkaway" value="Farewell then.." />
<parameter key="module_shop" value="1" />
<parameter key="shop_buyable" value="" />
</parameters>
</npc>
Poion seller.lua :
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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:addBuyableItem({'senzu'}, 2673, 10000, 'senzu')
npcHandler:addModule(FocusModule:new())