Stanos
Veteran OT User
USING TFS 1.2
So people helped me in this forum how to make traders but when i tried to test them i noticed that i can sell my items but when i want to buy them i cant it always shows grey. Code
BTW yes i had gold in my bag.
So people helped me in this forum how to make traders but when i tried to test them i noticed that i can sell my items but when i want to buy them i cant it always shows grey. Code
BTW yes i had gold in my bag.
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:addBuyableItem({'cheese'}, 2461, 200, 'cheese')
shopModule:addBuyableItem({'meat'}, 2482, 300, 'meat')
function creatureSayCallback(cid, type, msg)
if not npcHandler:isFocused(cid) then
return false
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())