• 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!

Alguem pode me ajuda NPC?

Tente este.
Não se esqueça de configurar as posições. Cya!
Code:
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 travelNode = keywordHandler:addKeyword({'cidade vip'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Deseja viajar para Cidade VIP por 100 gold coins?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 100, destination = {x=15091, y=15487, z=7} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Eu não quero ir para este lugar.'})
 
local travelNode = keywordHandler:addKeyword({'cidade principal'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Deseja viajar para Cidade Principal por 100 gold coins?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 100, destination = {x=15161, y=15490, z=7} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Muito caro, hein?'})
  
npcHandler:addModule(FocusModule:new())
 
Back
Top