@Up
@Up
@Up
Por Gokussj5, 11 de jul. de 2016 em NPCs, monsters e raids
info
Grupo: Cavaleiro
Registrado: 21/04/15
Posts: 158
Reputação: +12
Gênero: Masculino
Char no Tibia: Nego Das Sombras

@Up
@Up
@Up
info
Grupo: Herói
Registrado: 07/03/16
Posts: 1.4k
Reputação: +385
Gênero: Masculino

Use setstore para verificar se ja foi obtido o pokemon
info
Grupo: Cavaleiro
Registrado: 21/04/15
Posts: 158
Reputação: +12
Gênero: Masculino
Char no Tibia: Nego Das Sombras
Olá galera bom meu npc aqui esta com um bug tipo ele entra os pokemon as pokebola e os potions só que o player fica pegando toda hora, o npc era pra ser o seguinte dps que o player pega o seu pokemon escolhido ele não pegue de novo só pode pega outro char criando ajuda pfv
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'Bulbasaur')) then
doPlayerAddItem(cid, 2155, 1)
doPlayerAddItem(cid, 2394, 50)
doPlayerAddItem(cid, 12347, 50)
end
if(msgcontains(msg, 'Charmander')) then
doPlayerAddItem(cid, 2156, 1)
doPlayerAddItem(cid, 2394, 50)
doPlayerAddItem(cid, 12347, 50)
end
if(msgcontains(msg, 'Squirtle')) then
doPlayerAddItem(cid, 2158, 1)
doPlayerAddItem(cid, 2394, 50)
doPlayerAddItem(cid, 12347, 50)
end
---------------------------------------------------------
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())