• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Problem outfit npc

Pifafa

Member
Joined
Nov 9, 2010
Messages
48
Reaction score
5
Eng!
Hello everyone. I have a problem that my npc does not deliver the necromancer shield, and nightmare shield. I can't do it he jumps to 4 part where player with full clothes could negotiate the shields.

Sorry, put here the script and more.

PT!
Olá a todos. Estou com um problema que meu npc não entrega o necromancer shield, e nightmare shield. Não consigo fazer ele pula para 4 parte onde player com a roupa completa poderia negocia os escudos.

 
Last edited:
ok, here is the relevant section

Lua:
        elseif npcHandler.topic[cid] == 71 then -- NIGHTMARE - OUTFIT
            if getPlayerStorageValue(cid, 20044) <= 0 then
                if getPlayerItemCount(cid, 6500) >= 500 then
                    if doPlayerRemoveItem(cid, 6500, 500) then
                        npcHandler:say("Parabéns! Quando finalizar todos os addons da Nightmare, fale comigo sobre {Nightmare Shield}.", cid)
                        doPlayerAddOutfit(cid, 269, 0)
                        doPlayerAddOutfit(cid, 268, 0)
                        setPlayerStorageValue(cid, 20044, 1)
                        npcHandler.topic[cid] = 0
                    else
                        doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você não tem todos os itens.", cid)
                    npcHandler.topic[cid] = 0
                end
            else
                npcHandler:say("Você já possui esse outfit.", cid)
            end
        elseif npcHandler.topic[cid] == 72 then -- NIGHTMARE - FIRST ADDON
            if getPlayerStorageValue(cid, 20044) == 1 then -- CHECAR NIGHTMARE OUTFIT
                if getPlayerStorageValue(cid, 20045) <= 0 then
                    if getPlayerItemCount(cid, 6500) >= 500 then
                        if doPlayerRemoveItem(cid, 6500, 500) then
                            npcHandler:say("Parabéns! Quando finalizar todos os addons da Nightmare, fale comigo sobre {Nightmare Shield}.", cid)
                            doPlayerAddOutfit(cid, 269, 1)
                            doPlayerAddOutfit(cid, 268, 1)
                            setPlayerStorageValue(cid, 20045, 1)
                            npcHandler.topic[cid] = 0
                        else
                            doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                            npcHandler.topic[cid] = 0
                        end
                    else
                        npcHandler:say("Você não tem todos os itens.", cid)
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você já possui esse addon.", cid)
                end
            else
                npcHandler:say("Primeiro você precisa possuir a outfit.", cid)
            end
        elseif npcHandler.topic[cid] == 73 then -- NIGHTMARE - SECOND ADDON
            if getPlayerStorageValue(cid, 20044) == 1 then -- CHECAR NIGHTMARE OUTFIT
                if getPlayerStorageValue(cid, 20046) <= 0 then
                    if getPlayerItemCount(cid, 6500) >= 1000 then
                        if doPlayerRemoveItem(cid, 6500, 1000) then
                            npcHandler:say("Parabéns! Quando finalizar todos os addons da Nightmare, fale comigo sobre {Nightmare Shield}.", cid)
                            doPlayerAddOutfit(cid, 269, 2)
                            doPlayerAddOutfit(cid, 268, 2)
                            setPlayerStorageValue(cid, 20046, 1)
                            npcHandler.topic[cid] = 0
                        else
                            doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                            npcHandler.topic[cid] = 0
                        end
                    else
                        npcHandler:say("Você não tem todos os itens.", cid)
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você já possui esse addon.", cid)
                end
            else
                npcHandler:say("Primeiro você precisa possuir a outfit.", cid)
            end
        --------------------------------------
        --------------------------------------
        elseif npcHandler.topic[cid] == 75 then -- BROTHERHOOD - OUTFIT
            if getPlayerStorageValue(cid, 20047) <= 0 then
                if getPlayerItemCount(cid, 6500) >= 500 then
                    if doPlayerRemoveItem(cid, 6500, 500) then
                        npcHandler:say("Parabéns! Quando finalizar todos os addons da Brotherhood, fale comigo sobre {Necromancer Shield}.", cid)
                        doPlayerAddOutfit(cid, 279, 0)
                        doPlayerAddOutfit(cid, 278, 0)
                        setPlayerStorageValue(cid, 20047, 1)
                        npcHandler.topic[cid] = 0
                    else
                        doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você não tem todos os itens.", cid)
                    npcHandler.topic[cid] = 0
                end
            else
                npcHandler:say("Você já possui esse outfit.", cid)
            end
        elseif npcHandler.topic[cid] == 76 then -- BROTHERHOOD - FIRST ADDON
            if getPlayerStorageValue(cid, 20047) == 1 then -- CHECAR BROTHERHOOD OUTFIT
                if getPlayerStorageValue(cid, 20048) <= 0 then
                    if getPlayerItemCount(cid, 6500) >= 500 then
                        if doPlayerRemoveItem(cid, 6500, 500) then
                            npcHandler:say("Parabéns! Quando finalizar todos os addons da Brotherhood, fale comigo sobre {Necromancer Shield}.", cid)
                            doPlayerAddOutfit(cid, 279, 1)
                            doPlayerAddOutfit(cid, 278, 1)
                            setPlayerStorageValue(cid, 20048, 1)
                            npcHandler.topic[cid] = 0
                        else
                            doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                            npcHandler.topic[cid] = 0
                        end
                    else
                        npcHandler:say("Você não tem todos os itens.", cid)
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você já possui esse addon.", cid)
                end
            else
                npcHandler:say("Primeiro você precisa possuir a outfit.", cid)
            end
        elseif npcHandler.topic[cid] == 77 then -- BROTHERHOOD  - SECOND ADDON
            if getPlayerStorageValue(cid, 20047) == 1 then -- CHECAR BROTHERHOOD OUTFIT
                if getPlayerStorageValue(cid, 20049) <= 0 then
                    if getPlayerItemCount(cid, 6500) >= 1000 then
                        if doPlayerRemoveItem(cid, 6500, 1000) then
                            npcHandler:say("Parabéns! Quando finalizar todos os addons da Brotherhood, fale comigo sobre {Necromancer Shield}.", cid)
                            doPlayerAddOutfit(cid, 279, 2)
                            doPlayerAddOutfit(cid, 278, 2)
                            setPlayerStorageValue(cid, 20049, 1)
                            npcHandler.topic[cid] = 0
                        else
                            doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                            npcHandler.topic[cid] = 0
                        end
                    else
                        npcHandler:say("Você não tem todos os itens.", cid)
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você já possui esse addon.", cid)
                end
            else
                npcHandler:say("Primeiro você precisa possuir a outfit.", cid)
            end
        --------------------------------------
        --------------------------------------
        elseif npcHandler.topic[cid] == 78 then -- NIGHTMARE SHIELD
            if getPlayerStorageValue(cid, 20050) <= 0 then
                if getPlayerItemCount(cid, 6500) >= 100 then
                    if doPlayerRemoveItem(cid, 6500, 100) then
                        npcHandler:say("Muito Bom! Nightmare Shield. Item excelente.", cid)
                        doPlayerAddItem(cid, 6391, 1)
                        setPlayerStorageValue(cid, 20050, 1)
                        npcHandler.topic[cid] = 0
                    else
                        doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você não tem todos os itens.", cid)
                    npcHandler.topic[cid] = 0
                end
            else
                npcHandler:say("Você já pegou o item.", cid)
                npcHandler.topic[cid] = 0
            end
      
        elseif npcHandler.topic[cid] == 79 then -- NECROMANCER SHIELD
            if getPlayerStorageValue(cid, 20051) <= 0 then
                if getPlayerItemCount(cid, 6500) >= 100 then
                    if doPlayerRemoveItem(cid, 6500, 100) then
                        npcHandler:say("Muito Bom! Necromancer Shield. Item excelente.", cid)
                        doPlayerAddItem(cid, 6433, 1)
                        setPlayerStorageValue(cid, 20051, 1)
                        npcHandler.topic[cid] = 0
                    else
                        doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você não tem todos os itens.", cid)
                    npcHandler.topic[cid] = 0
                end
            else
                npcHandler:say("Você já pegou o item.", cid)
                npcHandler.topic[cid] = 0
            end
        end

At first glance it looks like the code is there? You ask NPC about "Nightmare Shield" after you complete the outfit? and same with the other one?

What happens?
What do you expect to happen?
 
ok, here is the relevant section

Lua:
        elseif npcHandler.topic[cid] == 71 then -- NIGHTMARE - OUTFIT
            if getPlayerStorageValue(cid, 20044) <= 0 then
                if getPlayerItemCount(cid, 6500) >= 500 then
                    if doPlayerRemoveItem(cid, 6500, 500) then
                        npcHandler:say("Parabéns! Quando finalizar todos os addons da Nightmare, fale comigo sobre {Nightmare Shield}.", cid)
                        doPlayerAddOutfit(cid, 269, 0)
                        doPlayerAddOutfit(cid, 268, 0)
                        setPlayerStorageValue(cid, 20044, 1)
                        npcHandler.topic[cid] = 0
                    else
                        doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você não tem todos os itens.", cid)
                    npcHandler.topic[cid] = 0
                end
            else
                npcHandler:say("Você já possui esse outfit.", cid)
            end
        elseif npcHandler.topic[cid] == 72 then -- NIGHTMARE - FIRST ADDON
            if getPlayerStorageValue(cid, 20044) == 1 then -- CHECAR NIGHTMARE OUTFIT
                if getPlayerStorageValue(cid, 20045) <= 0 then
                    if getPlayerItemCount(cid, 6500) >= 500 then
                        if doPlayerRemoveItem(cid, 6500, 500) then
                            npcHandler:say("Parabéns! Quando finalizar todos os addons da Nightmare, fale comigo sobre {Nightmare Shield}.", cid)
                            doPlayerAddOutfit(cid, 269, 1)
                            doPlayerAddOutfit(cid, 268, 1)
                            setPlayerStorageValue(cid, 20045, 1)
                            npcHandler.topic[cid] = 0
                        else
                            doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                            npcHandler.topic[cid] = 0
                        end
                    else
                        npcHandler:say("Você não tem todos os itens.", cid)
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você já possui esse addon.", cid)
                end
            else
                npcHandler:say("Primeiro você precisa possuir a outfit.", cid)
            end
        elseif npcHandler.topic[cid] == 73 then -- NIGHTMARE - SECOND ADDON
            if getPlayerStorageValue(cid, 20044) == 1 then -- CHECAR NIGHTMARE OUTFIT
                if getPlayerStorageValue(cid, 20046) <= 0 then
                    if getPlayerItemCount(cid, 6500) >= 1000 then
                        if doPlayerRemoveItem(cid, 6500, 1000) then
                            npcHandler:say("Parabéns! Quando finalizar todos os addons da Nightmare, fale comigo sobre {Nightmare Shield}.", cid)
                            doPlayerAddOutfit(cid, 269, 2)
                            doPlayerAddOutfit(cid, 268, 2)
                            setPlayerStorageValue(cid, 20046, 1)
                            npcHandler.topic[cid] = 0
                        else
                            doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                            npcHandler.topic[cid] = 0
                        end
                    else
                        npcHandler:say("Você não tem todos os itens.", cid)
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você já possui esse addon.", cid)
                end
            else
                npcHandler:say("Primeiro você precisa possuir a outfit.", cid)
            end
        --------------------------------------
        --------------------------------------
        elseif npcHandler.topic[cid] == 75 then -- BROTHERHOOD - OUTFIT
            if getPlayerStorageValue(cid, 20047) <= 0 then
                if getPlayerItemCount(cid, 6500) >= 500 then
                    if doPlayerRemoveItem(cid, 6500, 500) then
                        npcHandler:say("Parabéns! Quando finalizar todos os addons da Brotherhood, fale comigo sobre {Necromancer Shield}.", cid)
                        doPlayerAddOutfit(cid, 279, 0)
                        doPlayerAddOutfit(cid, 278, 0)
                        setPlayerStorageValue(cid, 20047, 1)
                        npcHandler.topic[cid] = 0
                    else
                        doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você não tem todos os itens.", cid)
                    npcHandler.topic[cid] = 0
                end
            else
                npcHandler:say("Você já possui esse outfit.", cid)
            end
        elseif npcHandler.topic[cid] == 76 then -- BROTHERHOOD - FIRST ADDON
            if getPlayerStorageValue(cid, 20047) == 1 then -- CHECAR BROTHERHOOD OUTFIT
                if getPlayerStorageValue(cid, 20048) <= 0 then
                    if getPlayerItemCount(cid, 6500) >= 500 then
                        if doPlayerRemoveItem(cid, 6500, 500) then
                            npcHandler:say("Parabéns! Quando finalizar todos os addons da Brotherhood, fale comigo sobre {Necromancer Shield}.", cid)
                            doPlayerAddOutfit(cid, 279, 1)
                            doPlayerAddOutfit(cid, 278, 1)
                            setPlayerStorageValue(cid, 20048, 1)
                            npcHandler.topic[cid] = 0
                        else
                            doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                            npcHandler.topic[cid] = 0
                        end
                    else
                        npcHandler:say("Você não tem todos os itens.", cid)
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você já possui esse addon.", cid)
                end
            else
                npcHandler:say("Primeiro você precisa possuir a outfit.", cid)
            end
        elseif npcHandler.topic[cid] == 77 then -- BROTHERHOOD  - SECOND ADDON
            if getPlayerStorageValue(cid, 20047) == 1 then -- CHECAR BROTHERHOOD OUTFIT
                if getPlayerStorageValue(cid, 20049) <= 0 then
                    if getPlayerItemCount(cid, 6500) >= 1000 then
                        if doPlayerRemoveItem(cid, 6500, 1000) then
                            npcHandler:say("Parabéns! Quando finalizar todos os addons da Brotherhood, fale comigo sobre {Necromancer Shield}.", cid)
                            doPlayerAddOutfit(cid, 279, 2)
                            doPlayerAddOutfit(cid, 278, 2)
                            setPlayerStorageValue(cid, 20049, 1)
                            npcHandler.topic[cid] = 0
                        else
                            doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                            npcHandler.topic[cid] = 0
                        end
                    else
                        npcHandler:say("Você não tem todos os itens.", cid)
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você já possui esse addon.", cid)
                end
            else
                npcHandler:say("Primeiro você precisa possuir a outfit.", cid)
            end
        --------------------------------------
        --------------------------------------
        elseif npcHandler.topic[cid] == 78 then -- NIGHTMARE SHIELD
            if getPlayerStorageValue(cid, 20050) <= 0 then
                if getPlayerItemCount(cid, 6500) >= 100 then
                    if doPlayerRemoveItem(cid, 6500, 100) then
                        npcHandler:say("Muito Bom! Nightmare Shield. Item excelente.", cid)
                        doPlayerAddItem(cid, 6391, 1)
                        setPlayerStorageValue(cid, 20050, 1)
                        npcHandler.topic[cid] = 0
                    else
                        doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você não tem todos os itens.", cid)
                    npcHandler.topic[cid] = 0
                end
            else
                npcHandler:say("Você já pegou o item.", cid)
                npcHandler.topic[cid] = 0
            end
     
        elseif npcHandler.topic[cid] == 79 then -- NECROMANCER SHIELD
            if getPlayerStorageValue(cid, 20051) <= 0 then
                if getPlayerItemCount(cid, 6500) >= 100 then
                    if doPlayerRemoveItem(cid, 6500, 100) then
                        npcHandler:say("Muito Bom! Necromancer Shield. Item excelente.", cid)
                        doPlayerAddItem(cid, 6433, 1)
                        setPlayerStorageValue(cid, 20051, 1)
                        npcHandler.topic[cid] = 0
                    else
                        doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
                        npcHandler.topic[cid] = 0
                    end
                else
                    npcHandler:say("Você não tem todos os itens.", cid)
                    npcHandler.topic[cid] = 0
                end
            else
                npcHandler:say("Você já pegou o item.", cid)
                npcHandler.topic[cid] = 0
            end
        end

At first glance it looks like the code is there? You ask NPC about "Nightmare Shield" after you complete the outfit? and same with the other one?

What happens?
What do you expect to happen?



He should give the speech about the shield, which is at the end of the script.
 
Back
Top