é cara aki tá o script você configura ai.
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
function creatureSayCallback(cid, type, msg)
if (not npcHandler:isFocused(cid)) then
return false
end
if msgcontains(msg, 'thais') and not isPlayerPzLocked(cid) then
if doPlayerRemoveItem(cid, 2152, 15) == true then
doTeleportThing(cid,{x=32311, y=32210, z=6})
self:releaseFocus(cid)
else
npcHandler:say('You don\'t have enought money to travel!', cid)
self:releaseFocus(cid)
end
end
if msgcontains(msg, 'carlin') and not isPlayerPzLocked(cid) then
if doPlayerRemoveItem(cid, 2152, 15) == true then
doTeleportThing(cid,{x=32387, y=31821, z=6})
self:releaseFocus(cid)
else
npcHandler:say('You don\'t have enought money to travel!', cid)
self:releaseFocus(cid)
end
end
if isPlayerPzLocked(cid) then
npcHandler:say('You can\'t travel, you have pz!', cid)
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to all places: {thais}, {carlin}.'})
npcHandler:addModule(FocusModule:new())




info
Grupo: Campones
Registrado: 14/12/11
Posts: 74
Reputação: 0
Char no Tibia: Bagola
Entao quero um Npc de viagem. eu quero que cada viagem custe 15 da Prata.
Grato!
CIDADES----------------------------X/Y/Z
Odin City 230 258 6
Hammunatrapa City 345 244 6
Savage City 259 286 6
Eldora City 532 335 6
Vermillhon 651 145 7
Khazzar 576 564 7
Vilarejo 364 1152 5
Ice Island 360 836 7
+REP para quem me ajudar