silveralol
Advanced OT User
- Joined
- Mar 16, 2010
- Messages
- 1,480
- Solutions
- 9
- Reaction score
- 211
Hello, I'm here trying making my npcs open the trade window when I say "hi", but I did not find the way....
TFS 1.2
in data/npc/lib/npcsystem/npchandler,lua
I find the function of greet players, then I want to do something to get working what I'm asking for..
I don't find the function that call the trade window... :/
thanks
TFS 1.2
in data/npc/lib/npcsystem/npchandler,lua
I find the function of greet players, then I want to do something to get working what I'm asking for..
Code:
function NpcHandler:greet(cid, message)
if cid ~= 0 then
local callback = self:getCallback(CALLBACK_GREET)
if callback == nil or callback(cid, message) then
if self:processModuleCallback(CALLBACK_GREET, cid) then
local msg = self:getMessage(MESSAGE_GREET)
local parseInfo = { [TAG_PLAYERNAME] = Player(cid):getName() }
msg = self:parseMessage(msg, parseInfo)
self:say(msg, cid, true)
else
return
end
else
return
end
end
self:addFocus(cid)
end
thanks