Ir para conteúdo

Featured Replies

Postado
  • Autor
17 minutos atrás, Kemmlly disse:
2 horas atrás, elipe disse:

Entendi , faço jaja, só me manda as falas da outra missão.

Palavra para começar "upgrade"

npc : se voce conseguir convenser o kael a lhe entregar a carta, eu consigo modificar os dados

quando entrega : Obrigado, agora posso terminar.

o item que o player entrega : 2464

o item que o player ganhar : 2463

  • Respostas 12
  • Visualizações 1.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • @elipe   local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid

  • local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid)

  • local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid)

Postado
  • Solução
22 horas atrás, elipe disse:

Palavra para começar "upgrade"

npc : se voce conseguir convenser o kael a lhe entregar a carta, eu consigo modificar os dados

quando entrega : Obrigado, agora posso terminar.

o item que o player entrega : 2464

o item que o player ganhar : 2463

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)
    local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
    --[[
    REMEMBER TO SET YOUR STORAGE AS YOURSTORAGE!
    ]]--
    local storage = 100010
    
    local tab = {
	item = {5920, 1}, -- {id do item que ele precia receber na primeira missao, quantidade}
	item2 = {5920, 1}, -- {id do item que ele vai dar, quantidade}    
	item3 = {5920, 1}, -- {id do item que ele vai receber do Katum, quantidade}  
	}
    
    if(msgcontains(msg, 'quest') or msgcontains(msg, 'slug')) then
        if(getPlayerStorageValue(cid, storage) < 1) then
            npcHandler:say("Hey, Eu perdi as minhas miniaturas no sub-solo.. voce poderia buscar para min? eu preciso de {5 dragon miniature}.", cid)
            setPlayerStorageValue(cid, storage, 1)
        elseif(getPlayerStorageValue(cid, storage) == 1) then
            npcHandler:say("Voce recuperou as 5 dragon miniature?", cid)
            talkState[talkUser] = 1
        elseif(getPlayerStorageValue(cid, storage) > 1) then
            npcHandler:say("Desculpe voce ja fez essa quest.", cid)
        end
    elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
        if getPlayerItemCount(cid, tab.item[1]) >= tab.item[2] then
        	doPlayerRemoveItem(cid, tab.item[1], tab.item[2])
            npcHandler:say("Wow! Muito obrigado! tenho algo aqui de muito valor, e acredito que Katum gostaria de falar com voce!", cid)
            doPlayerAddItem(cid, tab.item2[1], tab.item2[2])
            setPlayerStorageValue(cid, 100012, 0)
            setPlayerStorageValue(cid, storage, 2)
            talkState[talkUser] = 0
        else
            npcHandler:say("Voce nao tem meus items, sinto muito.", cid)
            talkState[talkUser] = 0
        end
    elseif(msgcontains(msg, 'no') and talkState[talkUser] > 0) then
        npcHandler:say("entao ta..", cid)
        talkState[talkUser] = 0
    elseif (msgcontains(msg, 'upgrade') and getPlayerStorageValue(cid, 100012) == 0) then
           if getPlayerItemCount(cid, tab.item3[1]) >= tab.item3[2] then
           npcHandler:say("Obrigado, agora posso terminar.", cid)
           doPlayerRemoveItem(cid, tab.item3[1], tab.item3[2])
           setPlayerStorageValue(cid, 100012, 1)
           else
           npcHandler:say("Voce não pegou o item com o Katum, retorne quando tiver o item.", cid)
           end
    elseif (msgcontains(msg, 'upgrade') and getPlayerStorageValue(cid, 100012) == 1) then
            npcHandler:say("Nao ha upgrade disponivel, voce ja concluiu a tarefa.", cid)
	elseif (msgcontains(msg, 'upgrade') and getPlayerStorageValue(cid, 100012) < 0) then
			npcHandler:say("Voce deve completar a primeira missao para iniciar o upgrade.", cid)
    end
    
    return TRUE
    
    
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Acredito que seja assim, certo?

Postado
  • Autor
17 horas atrás, Kemmlly disse:

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)
    local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
    --[[
    REMEMBER TO SET YOUR STORAGE AS YOURSTORAGE!
    ]]--
    local storage = 100010
    
    local tab = {
	item = {5920, 1}, -- {id do item que ele precia receber na primeira missao, quantidade}
	item2 = {5920, 1}, -- {id do item que ele vai dar, quantidade}    
	item3 = {5920, 1}, -- {id do item que ele vai receber do Katum, quantidade}  
	}
    
    if(msgcontains(msg, 'quest') or msgcontains(msg, 'slug')) then
        if(getPlayerStorageValue(cid, storage) < 1) then
            npcHandler:say("Hey, Eu perdi as minhas miniaturas no sub-solo.. voce poderia buscar para min? eu preciso de {5 dragon miniature}.", cid)
            setPlayerStorageValue(cid, storage, 1)
        elseif(getPlayerStorageValue(cid, storage) == 1) then
            npcHandler:say("Voce recuperou as 5 dragon miniature?", cid)
            talkState[talkUser] = 1
        elseif(getPlayerStorageValue(cid, storage) > 1) then
            npcHandler:say("Desculpe voce ja fez essa quest.", cid)
        end
    elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
        if getPlayerItemCount(cid, tab.item[1]) >= tab.item[2] then
        	doPlayerRemoveItem(cid, tab.item[1], tab.item[2])
            npcHandler:say("Wow! Muito obrigado! tenho algo aqui de muito valor, e acredito que Katum gostaria de falar com voce!", cid)
            doPlayerAddItem(cid, tab.item2[1], tab.item2[2])
            setPlayerStorageValue(cid, 100012, 0)
            setPlayerStorageValue(cid, storage, 2)
            talkState[talkUser] = 0
        else
            npcHandler:say("Voce nao tem meus items, sinto muito.", cid)
            talkState[talkUser] = 0
        end
    elseif(msgcontains(msg, 'no') and talkState[talkUser] > 0) then
        npcHandler:say("entao ta..", cid)
        talkState[talkUser] = 0
    elseif (msgcontains(msg, 'upgrade') and getPlayerStorageValue(cid, 100012) == 0) then
           if getPlayerItemCount(cid, tab.item3[1]) >= tab.item3[2] then
           npcHandler:say("Obrigado, agora posso terminar.", cid)
           doPlayerRemoveItem(cid, tab.item3[1], tab.item3[2])
           setPlayerStorageValue(cid, 100012, 1)
           else
           npcHandler:say("Voce não pegou o item com o Katum, retorne quando tiver o item.", cid)
           end
    elseif (msgcontains(msg, 'upgrade') and getPlayerStorageValue(cid, 100012) == 1) then
            npcHandler:say("Nao ha upgrade disponivel, voce ja concluiu a tarefa.", cid)
	elseif (msgcontains(msg, 'upgrade') and getPlayerStorageValue(cid, 100012) < 0) then
			npcHandler:say("Voce deve completar a primeira missao para iniciar o upgrade.", cid)
    end
    
    return TRUE
    
    
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Acredito que seja assim, certo?

Perfeito (y) 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo