Tava com um ideia em fazer uma guest pokemon tipo assim : O player fala com npc ai o npc pergunta se ele ja deu dex em Omanyte e Omastar Se ele tiver dado dex ele ganha um premium ou seja um item "xxxx". Se ele nao tiver o npc fala "Procure um Omanyte e Omastar e quando der dex neles volte aqui".
[Encerrado] Pedido De Npc
Área errada, movido.
• Estagiário desde 26/08/2012
• Colaborador desde 30/09/2012
• Moderador desde 24/01/2013
• Saída da equipe: ??/??/2013
Meus scripts:
Movement - Vocation Weapon
Mod - Partner System
Mod - Characters Market System (In Game) -- Exclusivo
Mod - Caixa Eletrônico
Mod - Vampire System
Mod - Summon Boost System
Mod - Defend The Generator
Sistema - RadBr Banishment System -- Super Exclusivo
Sistema - Advanced Quiz System -- Exclusivo
Talk - Comprando Pontos de EXP
Talk - Stop Time
Talk - Calculadora Ingame
Talk - Perfect Reset System -- Exclusivo
Tutorial - Aprendendo a Scriptear
ta ae..
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function doBuyPokemonWithCasinoCoins(cid, poke) npcHandler:onSellpokemon(cid) end
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 function checkFosseis(cid)
local poke = ""
for a = 1138, 1139 do
if not getPlayerInfoAboutPokemon(cid, oldpokedex[a-1000][1]).dex then
if a == 1139 then
poke = poke..oldpokedex[a-1000][1].."."
else
poke = poke..oldpokedex[a-1000][1]..", "
end
end
end
return poke
end
-------------------------------------
local reward = {{12222, 10}} --{ {id do item, qntdade} } // se quiser por mais itens... { {id do item, qntdade}, {id do item, qntdade} }
-------------------------------------
if getPlayerStorageValue(cid, 659896) == 1 then
selfSay("You already have help me...", cid)
talkState[cid] = 0
return false
end
if msgcontains(msg, 'help') and getPlayerStorageValue(cid, 659896) == -1 then
selfSay("You have the dex of the old pokemons Omanyte and Omastar?", cid)
talkState[cid] = 1
elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'sim')) and talkState[cid] == 1 and getPlayerStorageValue(cid, 659896) == -1 then
local check = checkFosseis(cid)
if check == "" then
selfSay("Thank you very much, take this reward...", cid)
for i = 1, #reward do
doPlayerAddItem(cid, reward[1], reward[2])
end
setPlayerStorageValue(cid, 659896, 1)
else
selfSay("You haven't this poke(s) in your pokedex yet: "..check, cid)
talkState[cid] = 0
return true
end
elseif (msgcontains(msg, 'no') or msgcontains(msg, 'nao')) then
selfSay("So good bye...", cid)
talkState[cid] = 0
return false
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein
Eu tentei fazer por storage mas dava erro, acho que NPC nao aceita storage :c
vlw Slicercomo sempre min ajudourep+
Eu tentei fazer por storage mas dava erro, acho que NPC nao aceita storage :c
Evite FLOOD.
Reportado.
Dúvida sanada
Me segui lá (:
+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
"O fracasso é a oportunidade de se começar de novo inteligentemente"