Ok
Eu tenho uma duvida:
O que ta errado?
O Brock usa o primeiro Pokémon , depois ele fala "..." e não da a insignia!
Eu estou usando o Pokémon Flash , e achei a script na internet , então não achei os créditos :s
script:
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 getUidsInContainer(containeruid) -- By MatheusMkalo
local dat = {}
for i = 0, (getContainerSize(containeruid)-1) do
local item = getContainerItem(containeruid, i)
if isContainer(item.uid) then
local items = getUidsInContainer(item.uid)
for i = 0, #items do
table.insert(dat, items)
end
else
table.insert(dat, item.uid)
end
end
return dat
end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerStorageValue(cid, 64999) == 1 then
selfSay('Eu vou vencê-lo mais tarde, {!exit}.', cid)
npcHandler:ResetNpc()
end
if msgcontains(msg:lower(), "duel") then
selfSay('Olá, eu sou o Líder do Ginásio de Pewter, meu nome é Brock e eu uso Pokémons do tipo Pedra, você quer batalhar comigo?', cid)
talk_state = 1
elseif msgcontains(msg:lower(), "yes") and talk_state == 1 then
if getPlayerStorageValue(cid,987876) ~= 1 then
if getPlayerStorageValue(cid,574225) ~= 1 then
selfSay('Go, Golem', cid)
doCreateMonster("[super] Golem", getCreaturePosition(getNpcId()))
doSendMagicEffect(getCreaturePosition(getNpcId()) , 10)
setPlayerStorageValue(cid, 574225, 1)
else
selfSay('...', cid)
end
else
if getPlayerStorageValue(cid, 987877) ~= 1 and getPlayerStorageValue(cid,574225) == 1 then
if getPlayerStorageValue(cid,574226) ~= 1 then
selfSay('Go, Onix', cid)
doCreateMonster("Crystal Onix", getCreaturePosition(getNpcId()))
doSendMagicEffect(getCreaturePosition(getNpcId()) , 10)
talk_state = 2
setPlayerStorageValue(cid, 574226, 1)
else
selfSay('...', cid)
end
else
if getPlayerStorageValue(cid, 63768) ~= 1 and getPlayerStorageValue(cid,574226) == 1 and getPlayerStorageValue(cid,987877) == 1 then
selfSay('Parabéns, você me venceu com seu carisma e estilo. Aqui está sua recompensa...', cid)
doTransformItem(getUidsInContainer(getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid)[7], 2555)
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "Você ganhou do Líder de Ginásio de Pewter (Brock), você ganhou o item!")
setPlayerStorageValue(cid, 63768, 1)
else
selfSay('Você conseguiu... me venceu.', cid)
end
end
end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Isso é do NPC , na pasta: data/NPC/scripts
...Ajuda? '-'