Ir para conteúdo

Shadowfess

Campones
  • Total de itens

    16
  • Registro em

  • Última visita

Posts postados por Shadowfess

  1. Opa, beleza?!

     

    Então pessoal eu estou com um problema em uma quest do meu servidor. O mapa é um Snowz Thyrania 8.60  que estou remodelando aos poucos e corrigindo os bugs.

     

    Aqui neste tópico gostaria de ajuda para resolver o bug da Pharaoh Quest.

     

    A quest consiste em matar os Pharaos e com o loot entregar ao Ankhotep e pegar a recompensa final, no entanto mesmo com os itens na bp quando se diz a palavra chave para pegar recompensa, nada. Absolutamente nada acontece.

     

    vou deixar alguns prints aqui e junto vou anexar também o script do npc Ankhotep para verificar o que há de errado. Se alguém conseguir me ajudar, ficarei grato e darei +REP

     

    bug ankhotep.png

    bug ankhotep 2.png

    pharao4.lua

  2. Ah não curti assim, tirou o espírito de RPG  da quest, eu agradeço real de coração pelo script. Mas ainda sim permanece bugado também, porque o npc Jack pega os 10k da bp mas não conclui que a pessoa seja membro da explorer society. Eu acredito que o bug real seja no npc e não em script de porta nem no próprio script da dwarvarm. O problema todo é que o npc nem chega a falar a frase de que ta permitido entrar na sala ao pagar os 10k. Logo o script ta errado em alguma frase do npc, mas valeu, vou dar seu rep meu camarada. thx

  3. Não tem o script dessa porta nas actions, o ID da porta é 1223, mas não tem nada no actions.xml. 

     

    O que tem é o ID do báu 2178 que guarda a Dwarven armor e que tá localizada na fiparadox/dwarvarm.lua

     

    no script doors.lua não tem o ID  da porta da quest 1223.

     

    script doors

     

    local function checkStackpos(item, position)
        position.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        local thing = getThingFromPos(position)

        position.stackpos = STACKPOS_TOP_FIELD
        local field = getThingFromPos(position)

        return (item.uid == thing.uid or thing.itemid < 100 or field.itemid == 0)
    end

    function onUse(cid, item, fromPosition, itemEx, toPosition)
        if(getItemLevelDoor(item.itemid) > 0) then
            if(item.actionid == 189) then
                if(isPremium(cid) ~= TRUE) then
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
                    return TRUE
                end

                doTransformItem(item.uid, item.itemid + 1)
                doTeleportThing(cid, toPosition, TRUE)
                return TRUE
            end

            local gender = item.actionid - 186
            if(isInArray({PLAYERSEX_FEMALE,  PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender) == TRUE) then
                local playerGender = getPlayerSex(cid)
                if(playerGender ~= gender) then
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
                    return TRUE
                end

                doTransformItem(item.uid, item.itemid + 1)
                doTeleportThing(cid, toPosition, TRUE)
                return TRUE
            end

            local skull = item.actionid - 180
            if(skull >= 0 and skull < 6) then
                local playerSkull = getCreatureSkullType(cid)
                if(playerSkull ~= skull) then
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
                    return TRUE
                end

                doTransformItem(item.uid, item.itemid + 1)
                doTeleportThing(cid, toPosition, TRUE)
                return TRUE
            end

            local group = item.actionid - 150
            if(group >= 0 and group < 30) then
                local playerGroup = getPlayerGroupId(cid)
                if(playerGroup < group) then
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
                    return TRUE
                end

                doTransformItem(item.uid, item.itemid + 1)
                doTeleportThing(cid, toPosition, TRUE)
                return TRUE
            end

            local vocation = item.actionid - 100
            if(vocation >= 0 and vocation < 50) then
                local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
                if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
                    return TRUE
                end

                doTransformItem(item.uid, item.itemid + 1)
                doTeleportThing(cid, toPosition, TRUE)
                return TRUE
            end

            if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) then
                doTransformItem(item.uid, item.itemid + 1)
                doTeleportThing(cid, toPosition, TRUE)
            else
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
            end

            return TRUE
        end

        if(isInArray(specialDoors, item.itemid) == TRUE) then
            if(item.actionid == 100 or (item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) > 0)) then
                doTransformItem(item.uid, item.itemid + 1)
                doTeleportThing(cid, toPosition, TRUE)
            else
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
            end

            return TRUE
        end

        if(isInArray(keys, item.itemid) == TRUE) then
            if(itemEx.actionid > 0) then
                if(item.actionid == itemEx.actionid and doors[itemEx.itemid] ~= nil) then
                    doTransformItem(itemEx.uid, doors[itemEx.itemid])
                    return TRUE
                end

                doPlayerSendCancel(cid, "The key does not match.")
                return TRUE
            end

            return FALSE
        end

        if(isInArray(horizontalOpenDoors, item.itemid) == TRUE and checkStackpos(item, fromPosition)) then
            local newPosition = toPosition
            newPosition.y = newPosition.y + 1
            local doorPosition = fromPosition
            doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
            local doorCreature = getThingfromPos(doorPosition)
            if(doorCreature.itemid ~= 0) then
                if(getTileInfo(doorPosition).protection and not getTileInfo(newPosition).protection and doorCreature.uid ~= cid) then
                    doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
                else
                    doTeleportThing(doorCreature.uid, newPosition, TRUE)
                    if(isInArray(closingDoors, item.itemid) ~= TRUE) then
                        doTransformItem(item.uid, item.itemid - 1)
                    end
                end

                return TRUE
            end

            doTransformItem(item.uid, item.itemid - 1)
            return TRUE
        end

        if(isInArray(verticalOpenDoors, item.itemid) == TRUE and checkStackpos(item, fromPosition)) then
            local newPosition = toPosition
            newPosition.x = newPosition.x + 1
            local doorPosition = fromPosition
            doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
            local doorCreature = getThingfromPos(doorPosition)
            if(doorCreature.itemid ~= 0) then
                if(getTileInfo(doorPosition).protection and not getTileInfo(newPosition).protection and doorCreature.uid ~= cid) then
                    doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
                else
                    doTeleportThing(doorCreature.uid, newPosition, TRUE)
                    if(isInArray(closingDoors, item.itemid) ~= TRUE) then
                        doTransformItem(item.uid, item.itemid - 1)
                    end
                end

                return TRUE
            end

            doTransformItem(item.uid, item.itemid - 1)
            return TRUE
        end

        if(doors[item.itemid] ~= nil and checkStackpos(item, fromPosition)) then
            if(item.actionid == 0) then
                doTransformItem(item.uid, doors[item.itemid])
            else
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
            end

            return TRUE
        end

        return FALSE
    end
     

    Algo me diz que o erro tá em:

     

    elseif msgcontains(msg, 'mikaha') then
                            if doPlayerRemoveMoney(cid,10000) == 1 then
                            selfSay('Ótimo, agora você pode entrar na sala da Dwarven Armor(Localizada na Crusader Helmet Quest) e na pequena ilha dos exploradores!')
                            setPlayerStorageValue(cid,8586599,2)
                            else
                            selfSay('Você não tem os 10k.')
                            end
     

    Sem a permissão do npc Jack aparece esta mensagem verde de que a porta está selada, provável que esteja selada pela falta de permissão do npc pra entrar quando ele cobra os 10k. o ID da porta não tem nada nas actions, o que eu não sei é de onde vem o cid 8586599image.thumb.png.da611db7e05a3666fbdd98aaf5411e9e.png

  4. Sobre o script de cima também não deu certo, o npc pega os 10k da bp mas não permite a passagem pra pegar a dwarven armor na porta. Abaixo está o script da dwarven armor quest.

     

    fiparadox/dwarvarm.lua

     

    --
    function onUse(cid, item, frompos, item2, topos)
     
    if item.uid ==2178 then
    queststatus = getPlayerStorageValue(cid,2178)
    if queststatus == 1 then
    doPlayerSendTextMessage(cid,22,"It is empty.")
     
    else
    doPlayerSendTextMessage(cid,22,"You found a Dwarven Armor.")
    doSendMagicEffect(topos,12)
    coins_uid = doPlayerAddItem(cid,2503,1)
    setPlayerStorageValue(cid,2178,1)
    end
    return 0
    end
    return 1
    end

     

     

    Nas actions consta assim:

     

    <action uniqueid="2178" event="script" value="fiparadox/dwarvarm.lua" />

     

     

    O complicado é que essa quest, ela tá junto com a explorer do NPC Laghus, o npc laghus da o brooch quando fala na linguagem minotauro, e nessa mesma linguagem minotauro quando o Jack pede para falar MEMBER na linguagem minotauro que significa 'mikaha' , o npc só toma os 10k, e não libera a passagem, nada acontece. 

     

     

    vou postar também o script da linguagem dos minotauros e do laghu.

     

    Minotaurs.lua 

     

    Mino Fibula:
    Fala1:
    Suk mikaha duk hyth duk uthat.
    Sou membro da sociedade dos exploradores.

    Fala2:
    San kuji hulu pithin duk hyth, kuji nued duk makaht duk Jack, Ni Stugha, quko kuji ni repo, vulthi fuktha.
    Se você quiser participar da sociedade, você precisa da permissão do Jack, O Analista, quando você a tiver, volte aqui.

    Fala3:
    Akit tuta bruk hure inip duk kaht, ahu kuji ig mikaha duk hyth, ratak efa Jack, Ni Stugha lacun yhun wond.
    Aceite este broche como início da missão, agora você é membro da sociedade, fale com Jack, O Analista para mais intruções.

    Minotaur Language:

    Ruan: Hi
    Whimpy: Bye
    Braska: Espere
    Uthat: Explorador
    Hyth: Sociedade
    Makaht: Permissão
    Stugha: Analista
    Ratak: Fale
    Suk: Sou
    Mikaha: Membro
    Duk: De(da,do,das,etc...)
    San: Se
    Kuji: Você
    Hulu: Quiser
    Pithin: Pariticipar
    Nued: Precisa
    Ni: O(a,as,os)
    Quko: Quando
    Repo: Tiver
    Vuthi: Volte
    Fuktha: Aqui
    Bruk: Broche
    Akit: Aceite
    Tuta: Este
    Hure: Como
    Inip: Início
    Kaht: Missão
    Ahu: Agora
    Ig: É
    Efa: Com
    Lacun: Para
    Yhun: Mais
    Wond: Informações

     

     

    NPC Lugha/minofibula.lua:

     

     

    local focus = 0
    local talk_start = 0
    local target = 0
    local following = false
    local attacking = false

    function onThingMove(creature, thing, oldpos, oldstackpos)

    end


    function onCreatureAppear(creature)

    end


    function onCreatureDisappear(cid, pos)
          if focus == cid then
              selfSay('Whimpy.')
              focus = 0
              talk_start = 0
          end
    end


    function onCreatureTurn(creature)

    end


    function msgcontains(txt, str)
          return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
    end


    function onCreatureSay(cid, type, msg)
          msg = string.lower(msg)

          if (msgcontains(msg, 'ruan') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
              selfSay('Ruan ' .. getCreatureName(cid) .. '! Suk mikaha duk hyth duk uthat.')
              focus = cid
              talk_start = os.clock()

          elseif msgcontains(msg, 'ruan') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
              selfSay('Braska, ' .. getCreatureName(cid) .. '!')

          elseif focus == cid then
            talk_start = os.clock()

            if msgcontains(msg, 'hyth') then
                    if getPlayerStorageValue(cid,8586599) == -1 then
         selfSay('San kuji hulu pithin duk hyth, kuji nued duk makaht duk Jack, Ni Stugha, quko kuji ni repo ni repo, vulthi fuktha.')
         else
         selfSay('Akit tuta bruk hure inip duk kaht, ahu kuji ig mikaha duk hyth, ratak efa Jack, Ni Stugha lacun yhun wond, Ratak "KAHT" lacun Jack.')
         setPlayerStorageValue(cid,8586599,2)
         doPlayerAddItem(cid,4873,1)
         end

            elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
                selfSay('Adeus ' .. creatureGetName(cid) .. ', Volte Sempre.')
                focus = 0
                talk_start = 0

            elseif msg ~= "" then
                selfSay('Como? Eu não entendi!')
                talk_state = 0
            end
        end
    end

    function onCreatureChangeOutfit(creature)
    end

    function onThink()
        doNpcSetCreatureFocus(focus)
        if (os.clock() - talk_start) > 30 then
            if focus > 0 then
                selfSay('Proximo!!...')
            end
            focus = 0
            talk_start = 0
        end
        if focus ~= 0 then
            if getDistanceToCreature(focus) > 5 then
                selfSay('Good Bye')
                focus = 0
                talk_start = 0
            end
        end
    end

     

     

  5. Não funcionou =/

     

    o npc permanece só pegando os 10k da bp mas não autoriza a entrada na porta

     

    local focus = 0
    local talk_start = 0
    local target = 0
    local following = false
    local attacking = false

    function onThingMove(creature, thing, oldpos, oldstackpos)

    end


    function onCreatureAppear(creature)

    end


    function onCreatureDisappear(cid, pos)
          if focus == cid then
              selfSay('Good bye then.')
              focus = 0
              talk_start = 0
          end
    end


    function onCreatureTurn(creature)

    end


    function msgcontains(txt, str)
          return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
    end


    function onCreatureSay(cid, type, msg)
          msg = string.lower(msg)

        if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
              selfSay('Ola ' .. getCreatureName(cid) .. '! Posso lhe ajudar em algo?')
              focus = cid
              talk_start = os.clock()

          elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
              selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Estou ocupado.')

        elseif focus == cid then
            talk_start = os.clock()

        if msgcontains(msg, 'desafio da sereia') then
                selfSay('Aaaahhh... voce se refere a aquela maldita sereia que fica numa pequena praia? Ela tentou me lançar um feitiço! Tenha cuidado com os poderes dela... Voce realmente deseja saber sobre o desafio?')

        elseif msgcontains(msg, 'sim') then
                selfSay('Humm... Você só precisa dizer "TROPICALIS" para a sereia, ela o levara para uma floresta úmida e cheia de monstros perigosos, você poderá voltar de lá quando quiser, mais para finalizar o desafio você precisa entregar o "fish fin" para a sra. tweedy! cuidado meu jovem aventureiro, há muito para aprender sobre este continente, o submundo não é para fracos como você!')

            elseif msgcontains(msg, 'sociedade') then
                            if getPlayerStorageValue(cid,8586599) == -1 then
                selfSay('Hmm, quer dizer que você falou com o Lugha, se você conseguiu ir até lá, então você é bem vindo na sociedade, você tem minha permissão.') 
                            setPlayerStorageValue(cid,8586599,1)
                            else
                            selfSay('Você já tem minha permissão, vá falar com Lugha.')
                            end

        elseif msgcontains(msg, 'permissão') then
                if getPlayerStorageValue(cid,8586599) == -1 then
                selfSay('Hmm, quer dizer que você falou com o Lugha, se você conseguiu ir até lá, então você é bem vindo na sociedade, você tem minha permissão.') 
                            setPlayerStorageValue(cid,8586599,1)
                            else
                            selfSay('Você já tem minha permissão, vá falar com Lugha.')
                            end

            elseif msgcontains(msg, 'kaht') then
                            if getPlayerStorageValue(cid,8586599) == 2 then
                selfSay('Vejo que está melhorando sua fala, agora para finalizar sua entrada na sociedade, me pague 10k, para aceitar diga: MEMBRO, na linguagem dos minotauros!')
                            else
                            selfSay('Você não tem o broche dos exploradores.')
                            end
            elseif msgcontains(msg, 'mikaha') then
                            if doPlayerRemoveMoney(cid,10000) == 1 then
                selfSay('Ótimo, agora você pode entrar na sala da Dwarven Armor(Localizada na Crusader Helmet Quest) e na pequena ilha dos exploradores!')
                            setPlayerStorageValue(cid,8586599,1)
                            else
                            selfSay('Você não tem os 10k.')
                            end

            elseif msgcontains(msg, 'cookbook') then
                            if getPlayerStorageValue(cid,2237) <= 1 then
                selfSay('Você não tem o requerimento de Bo\'ques.')
                            elseif getPlayerStorageValue(cid,2242) == 1 then
                            selfSay('Você já pegou seu cookbook.')
                            else
                            selfSay('HAHAHA! Mais um achando que irá conseguir a autorização para falar com Djanni... pff, de qualquer modo aqui está seu cookbook.')
                            doPlayerAddItem(cid,2347,1)
                            setPlayerStorageValue(cid,2242,1)
                            end
            elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
                selfSay('Adeus ' .. creatureGetName(cid) .. ', Volte Sempre.')
                focus = 0
                talk_start = 0

            elseif msg ~= "" then
                selfSay('Como? Eu não entendi!')
                talk_state = 0
            end
        end
    end

    function onCreatureChangeOutfit(creature)
    end

    function onThink()
        doNpcSetCreatureFocus(focus)
        if (os.clock() - talk_start) > 30 then
            if focus > 0 then
                selfSay('Proximo!!...')
            end
            focus = 0
            talk_start = 0
        end
        if focus ~= 0 then
            if getDistanceToCreature(focus) > 5 then
                selfSay('Good Bye')
                focus = 0
                talk_start = 0
            end
        end
    end

    bug 1.png

  6. Opa beleza? tenho um snowz thyranic 8.60 e estou tentando resolver o script do NPC Jack.

     

    Basicamente ele é responsável pela explorer society quest. E toda vez que vou entregar 10k para ser MEMBRO da sociedade, ele toma os 10k da bp e nada acontece. No script diz que ele deveria me dar a permissão para entrar na porta que guarda a quest da Dwarven Armor. Estou postando aqui o script do npc.

     

     

    jack.lua

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...