Ir para conteúdo

Featured Replies

Postado

Ola pessoal do tibia king.

 

eu estou tendo problemas em uma quest em especifica. O nome da quest era Main Kantho quest. porem tudo funciona certinho ate chegar nessa parte do script. No caso eu consigo dar started. porem não finaliza. 

fui seguindo as falas e ele chega a falar ate em 

See what you can do. I will mark on your map the location where you must begin the search, use the magnifier at all. The track can be anywhere.

 

segue o script:

Citar

            storage = 8417,
            talk_questStarting = "Glad you came. We are all very worried and any help is welcome. Are you willing to help us now?",
            talk_questStarted = "Now there's no turning back. I'll tell you everything. Ash Ketchum from Pallet Town is gone. The last contact we had was when his getting back home from a visit to another continent with info about new Pokemon. He emailed me telling  the location of his arrival, but I couldn't find him myself. The battle signs that we saw in Viridian are indications that he was there. We would meet there. I talked to his mother and she did not know anything. My grandfather cannot contact him, and since he is the league champion... everyone is concerned. He may have been ambushed. The clues that I follow brought me here. Everything indicates that he was taken by someone. Ash kept a diary in which he wrote his achievements and some notes. I found one of the pages torn near here. If we could find more about this diary... so we need to get divide. Go with this magnifier. See what you can do. I will mark on your map the location where you must begin the search, use the magnifier at all. The track can be anywhere.",
            talk_questFinishing = "How did you end up here...?",
            talk_questFinished = "Now it does not matter. I found a piece of torn page that might give me some information. Go to Pallet Town and talk to Delia, Ash's mom. Tell her we're making progress. When I need you I call. Now go!",
            talk_questFinishFail = "Likes no.",
            talk_questDone = "",
            rewardItems = {},
            rewardExp = 500,
            requiredLevel = 10,
            questType = QUEST_TYPE.CUSTOM,
            questRequest = function(cid)
                return getPlayerItemCount(cid, 23533) > 0 and getCreatureStorage(cid, 8509) == QUEST_STATUS.FINISHED
            end,
            canStart = function(cid) return getCreatureStorage(cid, 8410) == QUEST_STATUS.FINISHED --[[ and getSamePosition(getCreaturePosition(getNpcId()), {x = 932, y = 262, z = 7})]] end, -- Kanto Main #1 complete (Assistant Guyli)
            questStartItems = { 23533, 1 }, -- gary oak's magnifier
            onEnd = function(cid)
                doPlayerRemoveItem(cid, 23533, getPlayerItemCount(cid, 23533)) -- remove gary oak's magnifier
                doCreatureSetStorage(cid, 8419, QUEST_STATUS.STARTED) -- Autostart 8419
            end,
            onStart = function(cid)
                doPlayerAddMapMark(cid, { x = 3546, y = 300, z = 5 }, MAPMARK_EXCLAMATION, "Ash Ketchum search location.")
            end,
            startPosition = { x = 3304, y = 603, z = 7 },
            finishPosition = { x = 3450, y = 245, z = 7 }
        },
        {
            -- Auto started by 8417
            storage = 8419,
            talk_questStarting = "",
            talk_questStarted = "",
            talk_questFinishing = "You already spoke to Delia?",
            talk_questFinished = "I had more progress, this time you should go alone. I need to take care of some of my subjects. Talk to Bill, he is informed about everything. He is at north of Cerulean in his tower.",
            talk_questFinishFail = "Likes no.",
            talk_questDone = "",
            rewardItems = {
                { type = REWARD_TYPE.ITEM, id = 12245, count = 10, unique = true }, -- pokemon great health potion
                { type = REWARD_TYPE.ITEM, id = 13653, count = 15, unique = true }, -- pokemon energy potion
            },
            rewardExp = 500,
            requiredLevel = 10,
            questType = QUEST_TYPE.CUSTOM,
            questRequest = function(cid) return getCreatureStorage(cid, 8418) == QUEST_STATUS.FINISHED end,
            blockStart = true, -- Auto started
            finishPosition = { x = 3282, y = 262, z = 7 }
        },

 

 

e aqui o script do npc

Citar

setCreatureIcon(getNpcId(), CREATURE_ICONS.QUEST)

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 sayStory(...) return npcHandler:sayStory(...) end

local npcBattle = NpcBattle:new(getNpcName(), 9274, 9674, npcHandler)
npcBattle:setPokemons({"Squirtle", "Eevee", "Doduo", "Growlithe"})
npcBattle:setOneWin(true)
npcBattle:setDifficulty(10)
npcBattle:setRequired(function(cid) return getCreatureStorage(cid, 8413) == QUEST_STATUS.FINISHED end)
npcBattle:setOnWin(function(cid)
    doCreatureSetStorage(cid, 8414, QUEST_STATUS.STARTED)
end)

local name = getNpcName()

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, function(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
        return false
    end

    local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

    if (getCreatureStorage(cid, 8413) == QUEST_STATUS.FINISHED and
            not getPlayerDefeatedNPC(cid, name)) then
        if (msgcontains(msg, 'mission') or msgcontains(msg, 'help') or msgcontains(msg, 'task') or
                msgcontains(msg, 'battle') or msgcontains(msg, 'quest') or msgcontains(msg, 'missao') or msgcontains(msg, 'ajuda') or msgcontains(msg, 'tarefa') or msgcontains(msg, 'batalha')) then
            npcHandler.talkState[talkUser] =  npcBattle:doTalkStart(getNpcId(), cid)

        elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'sim')) then
            npcHandler.talkState[talkUser] =  npcBattle:doTalkEnd(getNpcId(), cid, npcHandler.talkState[talkUser])

        else
            selfSay("Let's {battle}?", cid)
        end

        return true
    end

    npcHandler.talkState[talkUser] = doQuestTalk(cid, name, msg, npcHandler.talkState[talkUser])

    return true
end)

npcHandler:addModule(FocusModule:new())
 

a base utilizada é a Psoul

Editado por Shirushi1
Mudei de Duvida (veja o histórico de edições)

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