andypsylon
be be
Code:
npcHandler:resetNpc()
tfs 1.0
https://github.com/otland/forgottenserver/search?q=resetNpc&ref=cmdform
somebody else?
who knows the solution?
npcHandler:resetNpc()
-- Resets the lastNode field, and this resetting the current position in the node hierarchy to root.
function KeywordHandler:reset(cid)
if self.lastNode[cid] then
self.lastNode[cid] = nil
end
end
local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})