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 Saffari(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
local pokeball = {2390,2391, 2392, 2393} -- pokebollas com q ele n pode estar na mao
for i = 1, #pokeball do
if getPlayerItemCount(cid, pokeball[i]) >= 1 then
npcHandler:say('You have to pokeballs you then can not release their access to Saffari back another time!', cid)
return true
end
end
if doPlayerRemoveMoney(cid, parameters.price) == TRUE then
doPlayerAddItem(cid, 2390, 30)
doPlayerAddItem(cid, 2152, 5)
doTeleportThing(cid, parameters.enter)
else
npcHandler:say('Sorry, You need '..parameters.price..' hundred dollars!', cid)
end
npcHandler:resetNpc()
return true
end
local node1 = keywordHandler:addKeyword({'saffari'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'O safari é o lar de criaturas raras, algumas perigosas outras não. Você deseja entrar?{yes}\n*Não é permitido entrar com outras pokebolas, apenas safari balls.'})
node1:addChildKeyword({'yes'}, Saffari, {price = 10000,enter = {x=1147, y=1411, z=7}})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
npcHandler:addModule(FocusModule:new())
hi
saffari



info
Group: Campones
Joined: 13/07/11
Posts: 17
Reputation: 0
Tibia Character: Nenhum
Tipo do script: NPC + Script NPC
Protocolo (versão do Tibia): 8.54
Servidor utilizado: Pokemon Dash Advanced
Nível de experiência: Qualquer uma
Adicionais/Informações: Quero que o NPC verifique se o carinha tenha os items - 2390, 2391, 2392, 2393 ai se o player estiver com esses items a mensagem que deverá aparecer será essa: You have to poke balls you then can not release their access to Saffari back another time. - Ai se a pessoa não tiver as balls ele libera a entrada.
Coordenadas se ele não tiver com a ball e for liberada a entrada do mesmo será essa: x=1147, y=1411, z=7 e também que adicione 30x do id 2390 e remova 5x 2152.
Se caso ele possua as poke balls ele terá aquela mensagemzinha, mas aquela mensagem so aparece se ele tiver dito: Saffari ai se ele tiver com as ball aparecerá se não ele liberará o acesso ao saffari.
Quem fizer para min este script estarei dando REP+