I will help you if you explain me better the idea...
Preciso De Um Npc Que Der Pra Viajar
Por cacaiu, 06 de mai. de 2012 em Scripts
info
Grupo: Barão
Registrado: 30/10/11
Posts: 207
Reputação: +83
Char no Tibia: Anjo Assasinu

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({'enigma city'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wish to travel to Enigma City for 50 gold coins?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 1000, cost = 50, destination = {x=942, y=978, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})
keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'Enigma City\' for just a small fee.'})
npcHandler:addModule(FocusModule:new())
premium = true -- se precisa ser premium
level = 1000 -- que level precisa ter
cost = 50 -- o custo da viagem
destination = {x=942, y=978, z=6} -- a pos para onde ele vai
Editado Maio 6 por GabrielSv
info
Grupo: Barão
Registrado: 17/10/10
Posts: 230
Reputação: +10
Char no Tibia: Nascont

vey n ta pegando, tem como explica ai n?
tipo..
onde boto o nome dele?
onde fica o type dele?
kd o arquivo.lua dele?
explica aew xd dou rep +
Amigo agradeço pela sua ajuda mas..
eu mexendo aki nos meus arquivos conssegui encontrar um npc que pegou mais obrigado mesmo assim =D
info
Grupo: Artesão
Registrado: 03/02/09
Posts: 134
Reputação: +15
Char no Tibia: Knight sparxzin

em data/npc copie e cole algum arquivo.xml, renomeie para NOMEDONPC e coloque isso dentro:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="NOMEDONPC" script="data/npc/scripts/NOMEDONPC.lua" walkinterval="2000" floorchange="0">
<health now="185" max="185"/>
<look type="151" head="78" body="68" legs="39" feet="76" addons="3"/>
<voices>
<voice text="Ask me for a passage..." interval2="100" margin="1" yell="no"/>
</voices>
<parameters>
<parameter key="message_farewell" value="Good bye." />
<parameter key="message_walkaway" value="Good bye then." />
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="passage;" />
<parameter key="keyword_reply1" value="Do you want me take you to {cidade1} or {cidade2}?" />
<parameter key="message_greet" value="Welcome, |PLAYERNAME|! I sell {passage}."/>
</parameters>
</npc>
agora em data/npc/scrips copie e cole algum arquivo.lua e renomeie para o NOMEDONPC e coloque isso dentro:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
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
-- OTServ event handling functions end
-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
local travelNode = keywordHandler:addKeyword({'cidade1'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to go to cidade1 for free?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=POsX, y=POsY, z=POsZ} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then not.'})
local travelNode = keywordHandler:addKeyword({'cidade2'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to go to cidade2 for free?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=POsX, y=POsY, z=POsZ} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then not.'})
keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Yes, I\'m the captain of this ship.'})
keywordHandler:addKeyword({'captain'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Yes, I\'m the captain of this ship.'})
npcHandler:addModule(FocusModule:new())
x=POsX, y=POsY, z=POsZ = coloque aqui as cordenadas para onde o player sera teleportado cidade1, cidade2 = Nomes das cidades ou lugares que o player deve falar para o npc NOMEDONPC = nome que voce quiser dar ao seu npc tem mais algumas opçoes nesse script, só edite se vc quiser (:
Editado Maio 7 por öKTöBëR




info
Grupo: Barão
Registrado: 17/10/10
Posts: 230
Reputação: +10
Char no Tibia: Nascont
gent preciso da ajuda de vcs.
queria um npc que desse teleport em player, tipo leva o player para outro local. oq tenho aki em casa n ta pegando queria um que pegasse em dash advancer =D rep+ xD