Ir para conteúdo
  • Cadastre-se

(Resolvido)[AJUDA] Alguém sabe onde tirar o acesso a meriana?


Ir para solução Resolvido por Wakon,

Posts Recomendados

Tipo, pra entrar em meriana/goroma precisa de uma missão, e eu preciso liberar pra o player ir direto do npc pra meriana/goroma sem ter feito a missão, onde eu mudo isso?

Editado por arthur122222 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • Solução

Vá em "Data/npc/scripts" procure por Captain Waverider.lua e troque por esse:

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 creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
        return false
    end
    
    local player = Player(cid)

    if(msgcontains(msg, "peg leg")) then
            npcHandler:say("Ohhhh. So... <lowers his voice> you know who sent you so I sail you to you know where. <wink> <wink> It will cost 50 gold to cover my expenses. Is it that what you wish?", cid)
            npcHandler.topic[cid] = 1
    elseif(msgcontains(msg, "passage")) then
        if isPlayer(cid) then
            npcHandler:say("<sigh> I knew someone else would claim all the treasure someday. But at least it will be you and not some greedy and selfish person. For a small fee of 200 gold pieces I will sail you to your rendezvous with fate. Do we have a deal?", cid)
            npcHandler.topic[cid] = 2
        elseif(getPlayerStorageValue(cid, 28901) == 4) then
            npcHandler:say("I have to admit this leaves me a bit puzzled.", cid)
            npcHandler.topic[cid] = 0
        end
    elseif(msgcontains(msg, "yes")) then
        if(npcHandler.topic[cid] == 1) then
                if player:getMoney() >= 50 then
                player:removeMoney(50)
                npcHandler:say("And there we go!", cid)
                doTeleportThing(cid, {x = 32346, y = 32625, z = 7})
                player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
                npcHandler.topic[cid] = 0
        else
                npcHandler:say("You don't have enough money.", cid)
                npcHandler.topic[cid] = 0
            end
        elseif(npcHandler.topic[cid] == 2) then
            if player:getMoney() >= 200 then
                player:removeMoney(200)
                npcHandler:say("And there we go!", cid)
                doTeleportThing(cid, {x = 32131, y = 32913, z = 7})
                player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
                npcHandler.topic[cid] = 0
            else
                npcHandler:say("You don't have enough money.", cid)
                npcHandler.topic[cid] = 0
            end
        end
    end
    return true
end

npcHandler:setMessage(MESSAGE_GREET, "Greetings, daring adventurer. If you need a {passage}, let me know.")
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye.")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Oh well.")
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Ai é só o player chegar e falar hi - peg leg - yes.

Link para o post
Compartilhar em outros sites

Deu o seguinte erro:

 

[ERRO - NPC : :loadfromxmll failed to load data/npc/captain waverider.xml: error

parsing element attribute

Link para o post
Compartilhar em outros sites

Deu o seguinte erro:

 

[ERRO - NPC : :loadfromxmll failed to load data/npc/captain waverider.xml: error

parsing element attribute

Tenta trocar seu XML:

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Captain Waverider" script="Captain Waverider.lua" walkinterval="2000" speechbubble="1" floorchange="0">
<health now="100" max="100"/>
<look type="96" head="0" body="0" legs="0" feet="0" addons="0"/>
</npc>

Link para o post
Compartilhar em outros sites

Quando eu falo: hi, peg leg - ele fala isso: Captain Waverider: Sorry, my old ears can't hear you.

Link para o post
Compartilhar em outros sites

Quando eu falo: hi, peg leg - ele fala isso: Captain Waverider: Sorry, my old ears can't hear you.

Então você não trocou o script, pois retirei essa mensagem.

Link para o post
Compartilhar em outros sites

XML é a mesma coisa que isso: Vá em "Data/npc/scripts" procure por Captain Waverider.lua. CERTO? QUE BURRO.. DA ZERO PRA ELE!


Já corrigi. Agora preciso o de Goroma

Editado por arthur122222 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

XML dos Npc's fica em "Data/npc" e os arquivos .LUA fica em "Data/npc/scripts"...

 

Em "Data/npc/scripts" troque o Jack Fate.lua por esse:

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
local lastSound = 0
function onThink()
    if lastSound < os.time() then
        lastSound = (os.time() + 5)
        if math.random(100) < 25 then
            Npc():say("Passages to Edron, Thais, Venore, Darashia, Ankrahmun, Yalahar, Port Hope and Goroma.", TALKTYPE_SAY)
        end
    end
    npcHandler:onThink()
end

local function creatureSayCallback(cid, type, msg)
    if not npcHandler:isFocused(cid) then
        return false
    end
    local player = Player(cid)
    if msgcontains(msg, 'thais') then
        npcHandler:say('Do you seek a passage to Thais?', cid)
        npcHandler.topic[cid] = 1
    elseif npcHandler.topic[cid] == 1 then
        if msgcontains(msg, 'yes') then
            npcHandler:say("I have to warn you - we might get into a tropical storm on that route. I'm not sure if my ship will withstand it. Do you really want to travel to Thais?",cid)
            npcHandler.topic[cid] = 2
        end
    elseif msgcontains(msg, 'goroma') then
            npcHandler:say('Ugh. You really want to go back to Goroma? I\'ll surely have to repair my ship afterwards, so I won\'t charge. Okay?', cid)
            npcHandler.topic[cid] = 3
    elseif msgcontains(msg, 'shutdown') then
        npcHandler:say('Ugh. You really want to go back to Shutdown? I\'ll surely have to repair my ship afterwards, so I won\'t charge. Okay?', cid)
        npcHandler.topic[cid] = 4
    elseif msgcontains(msg, 'yes') then
        if npcHandler.topic[cid] == 2 then
            local player = Player(cid)
                if math.random(8) == 1 then
                    player:teleportTo(Position(32161, 32558, 6), false)
                    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
                    npcHandler:say('Set the sails!', cid)
                    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
                    npcHandler.topic[cid] = 0
                else
                    player:teleportTo(Position(32310, 32210, 6), false)
                    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
                    npcHandler:say('Set the sails!', cid)
                    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
                    npcHandler.topic[cid] = 0
                end
        elseif npcHandler.topic[cid] == 3 then
            player:teleportTo(Position(32161, 32558, 6), false)
            player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
            npcHandler.topic[cid] = 0
        elseif npcHandler.topic[cid] == 4 then
            npcHandler:say('Noob filho da puta vaza daqui, corno viado.', cid)
            npcHandler.topic[cid] = 0    
        end
    end
    return true
end

local travelNode = keywordHandler:addKeyword({'edron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Edron?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=33173, y=31764, z=6} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})

local travelNode = keywordHandler:addKeyword({'venore'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Venore?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=32954, y=32022, z=6} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})

local travelNode = keywordHandler:addKeyword({'port hope'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Port Hope?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=32527, y=32784, z=6} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})

local travelNode = keywordHandler:addKeyword({'darashia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Darashia?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=33289, y=32480, z=6} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})

local travelNode = keywordHandler:addKeyword({'ankrahmun'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Ankrahmun?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=33092, y=32883, z=6} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})

local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Yalahar?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=32816, y=31272, z=6} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})

keywordHandler:addKeyword({'sail'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Where do you want to go? To Edron, Thais, Venore, Darashia, Ankrahmun, Yalahar, Port Hope or Goroma.?'})
keywordHandler:addKeyword({'passage'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Where do you want to go? To Edron, Thais, Venore, Darashia, Ankrahmun, Yalahar, Port Hope or Goroma.?'})
keywordHandler:addKeyword({'name'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'My name is Jack Fate from the Royal Tibia Line.'})
keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I\'m the captain of this sailing ship.'})
keywordHandler:addKeyword({'captain'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I\'m the captain of this sailing ship.'})
keywordHandler:addKeyword({'liberty bay'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'That\'s where we are.'})

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:setMessage(MESSAGE_GREET, "Welcome on board, Sir |PLAYERNAME|.")
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye. Recommend us if you were satisfied with our service.")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye then.")
npcHandler:addModule(FocusModule:new())

Agora ainda em "Data/npc/scripts" troque o Jack FateGoroma.lua por esse:

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 creatureSayCallback(cid, type, msg)
    if(not(npcHandler:isFocused(cid))) then
        return false
    end
         
    if msgcontains(msg, 'wood') or msgcontains(msg, 'ship') or msgcontains(msg, 'wreck') or msgcontains(msg, 'passage') or msgcontains(msg, 'liberty bay') then
        npcHandler:say("Do you want to travel back to Liberty Bay?", cid)
        npcHandler.topic[cid] = 4
    elseif msgcontains(msg, "yes") then
        if npcHandler.topic[cid] == 1 then
            selfSay("Thank you. Luckily, the damage my ship has taken looks more severe than it is, so I will only need a few wooden boards. ...", cid)
            selfSay("I saw some lousy trolls running away with some parts of the ship. It might be a good idea to follow them and check if they have some more wood. ...", cid)
            npcHandler:say("We will need 30 pieces of wood, no more, no less. Did you understand everything?", cid)
            npcHandler.topic[cid] = 2
        elseif npcHandler.topic[cid] == 2 then
            npcHandler:say("Good! Please return once you have gathered 30 pieces of wood.", cid)
            setPlayerStorageValue(cid, 55700, 1)
            setPlayerStorageValue(cid, 29105, 1) -- Quest Log Default
            setPlayerStorageValue(cid, 29109, 1) -- Quest Log
            npcHandler.topic[cid] = 0
        elseif npcHandler.topic[cid] == 3 then
            if(getPlayerItemCount(cid, 5901) >= 30) then
                doPlayerRemoveItem(cid, 5901, 30)
                npcHandler:say("Excellent! Now we can leave this godforsaken place. Thank you for your help. Should you ever want to return to this island, ask me for a passage to Goroma.", cid)
                setPlayerStorageValue(cid, 55700, 2)
                setPlayerStorageValue(cid, 29109, 2) -- Quest Log
                npcHandler.topic[cid] = 0
            else
                npcHandler:say("You don't have it...", cid)
            end
        elseif npcHandler.topic[cid] == 4 then
            doTeleportThing(cid, {x=32285, y=32891, z=6})
            doSendMagicEffect({x=32285, y=32891, z=6}, CONST_ME_TELEPORT)
            npcHandler.topic[cid] = 0
            end
        end
    return true
end

npcHandler:setMessage(MESSAGE_GREET, "Hello, Sir |PLAYERNAME|.")
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye.")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye then.")
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo