• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

[NPC] Buyable Vial of Milk and Lemonade

przemek1991

New Member
Joined
Feb 17, 2008
Messages
25
Reaction score
0
Hi, I have a problem with setting in lua buyable vial of milk and lemonade, I do not why it dont show in trade window
LUA:
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)

function creatureSayCallback(cid, type, msg)
	if msgcontains(msg, 'trade') then
		selfSay("Of course, just browse through my wares.")
			talkState = 1
	end
end 

shopModule:addBuyableItem({'lemonade'},	2006, 5, 5, 'lemonade')
shopModule:addBuyableItem({'milk'}, 2006, 4, 6, 'milk')
shopModule:addBuyableItem({'water'}, 2006, 2, 1, 'water')

npcHandler:addModule(FocusModule:new())
only water work for those three(I use v0.2.4 TFS {8.5 Tibia}, please help I'll rep+
 
Last edited:
Hi, I have a problem with setting in lua buyable vial of milk and lemonade, I do not why it dont show in trade window
LUA:
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)

function creatureSayCallback(cid, type, msg)
	if msgcontains(msg, 'trade') then
		selfSay("Of course, just browse through my wares.")
			talkState = 1
	end
end 

shopModule:addBuyableItem({'lemonade'},	[COLOR="Red"]2006[/COLOR], 5, 5, 'lemonade')
shopModule:addBuyableItem({'milk'}, [COLOR="Red"]2006[/COLOR], 4, 6, 'milk')
shopModule:addBuyableItem({'water'}, [COLOR="Red"]2006[/COLOR], 2, 1, 'water')

npcHandler:addModule(FocusModule:new())
only water work for those three(I use v0.2.4 TFS {8.5 Tibia}, please help I'll rep+


change that 2006 on id that items,search it in items.xml and paste there also you need to find vial of milk etc. :wub:
 
Back
Top