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

Alguem pode me ajuda NPC?

loginoob

New Member
Joined
Feb 6, 2008
Messages
93
Reaction score
0
Location
Brazil
Tipo quero npc viagem

npc de viagem vip, se alguem pode me ajuda nesse npc agradeço :]
 
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