local revive = {itemid = 12344, max_count = 20}local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler)function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() endfunction Saffari(cid, message, keywords, parameters, node) if not npcHandler:isFocused(cid) then return false end if getPlayerItemCount(cid, revive.itemid) > revive.max_count then npcHandler:say("To enter here, you can only carry "..revive.max_count.." revive(s). Deposit the rest on the DP, please.", cid) return true end if not parameters.premium and not isPremium(cid) then npcHandler:say('Sorry, you need to be premium account!', cid) return true elseif not doPlayerRemoveMoney(cid, parameters.price) then npcHandler:say('Sorry, you dont have enought money!', cid) return true end doPlayerSendTextMessage(cid, 22, 'Good Luck!.') doTeleportThing(cid, parameters.enter) npcHandler:resetNpc() return trueendlocal node1 = keywordHandler:addKeyword({'tower'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Nessa {tower} possui monstros muito fortes você esta pronto para enfrenta-los?? Mais antes guarde suas pokebolas no DP....ah você so tem 60 minutos de tempo para realizar essa quest!!!!'})node1:addChildKeyword({'yes'}, Saffari, {premium = no, price = 0, enter = {x = 1235, y = 630, z = 8}, exit = {x = 1235, y = 630, z = 8}, minutes = 60})node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})npcHandler:addModule(FocusModule:new())




info
Grupo: Campones
Registrado: 21/05/09
Posts: 48
Reputação: +2
Char no Tibia: No have
e ai galera , eu estou querendo arrumar script do meu npc aqui ele bloqueia somente pokeball queria que bloqueasse revives tbm.
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 = {2391, 2392, 2393, 2394, 12617, 12832} -- whit this pokeballs you CANT enter in the quest.
for i = 1, #pokeball do
if getPlayerItemCount(cid, pokeball) >= 1 then
npcHandler:say('Deposit your pokeballs on the DP!', cid)
return true
end
end
if parameters.premium == false and not isPremium(cid) then
npcHandler:say('Sorry, you need to be premium account!', cid)
return true
elseif doPlayerRemoveMoney(cid, parameters.price) == FALSE then
npcHandler:say('Sorry, you dont have enought money!', cid)
return true
end
doPlayerSendTextMessage(cid,22,'Good Luck!.')
doTeleportThing(cid, parameters.enter)
npcHandler:resetNpc()
return true
end
local node1 = keywordHandler:addKeyword({'quest'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Nessa {quest} possui monstros muito fortes você esta pronto para enfrenta-los?? Mais antes guarde suas pokebolas no DP....ah você so tem 60 minutos de tempo para realizar essa quest!!!!'})
node1:addChildKeyword({'yes'}, Saffari, {premium = no,price = 0,enter = {x=1235, y=630, z=8}, exit = {x=1235, y=630, z=8}, minutes = 60})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
npcHandler:addModule(FocusModule:new())
o mais importante é ele bloquear revive já coloquei id do revive junto com a da ball e não deu.
se possivel queria que falasse tower em vez de quest para o jogador entrar.
E que quando entrasse adicionasse 20 revives ou permitir entrar so com 20
mas lembrando só de broquear os revive se conseguirem ja esta bom
id do revive = 12344