• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

NPC The Queen of The Banshee 100%

I think 100% for 7.4
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

npcHandler:setMessage(MESSAGE_GREET, "Be greeted, dear visitor. Come and stay ... a while.")
npcHandler:setMessage(MESSAGE_PLACEDINQUEUE, "Wait as patiently as death is waiting for you!")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Yes, flee from death. But know it shall be always one step behind you.")
npcHandler:setMessage(MESSAGE_FAREWELL, "We will meet again.")

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 BansheeQueenBehaviour (cid, type, msg)
  if(not npcHandler:isFocused(cid)) then
     return 0
  end

        if(msgcontains(msg, "seventh") or msgcontains(msg, "last")) then
                npcHandler:say("If you have passed the first six seals and entered the blue fires that lead to the chamber of the seal you might receive my kiss ... It will open the last seal. Do you think you are ready?",cid)
                npcHandler:doTopic(cid, 1)
        elseif(msgcontains(msg, "yes")) and (npcHandler.Topic == 1) then
            if (getPlayerLevel(cid) >= 60) then
                if (getPlayerStorageValue(cid, 203) == 1) then                    
                        npcHandler:say("Yessss, I can sense you have passed the seal of sacrifice. Have you passed any other seal yet?",cid)
                        npcHandler:doTopic(cid, 2)
                else
                        npcHandler:say("You have not passed the seal of sacrifice yet. Return to me when you are better prepared.", cid)
                        npcHandler:doTopic(cid, 0)
                end
            else
                        npcHandler:say("You are not experienced enough to master the challenges ahead or to receive knowledge about the seventh seal. Go and learn more before asking me again.",cid)
                        npcHandler:doTopic(cid, 0) 
            end
       elseif(msgcontains(msg, "yes")) and (npcHandler.Topic == 2) then
                if (getPlayerStorageValue(cid, 200) == 1) then                        
                        npcHandler:say("I sense you have passed the hidden seal as well. Have you passed any other seal yet?",cid)
                        npcHandler:doTopic(cid, 3)
                else
                        npcHandler:say("You have not found the hidden seal yet. Return when you are better prepared.", cid)
                        npcHandler:doTopic(cid, 0)
                end
       elseif(msgcontains(msg, "yes")) and (npcHandler.Topic == 3) then
                if (getPlayerStorageValue(cid, 205) == 1) then                      
                        npcHandler:say("Oh yes, you have braved the plagueseal. Have you passed any other seal yet?",cid)
                        npcHandler:doTopic(cid, 4)
                else
                        npcHandler:say("You have not faced the plagueseal yet. Return to me when you are better prepared.", cid)
                        npcHandler:doTopic(cid, 0)
                end
       elseif(msgcontains(msg, "yes")) and (npcHandler.Topic == 4) then
                if (getPlayerStorageValue(cid, 204) == 1) then                         
                        npcHandler:say("Ah, I can sense the power of the seal of demonrage burning in your heart. Have you passed any other seal yet?",cid)
                        npcHandler:doTopic(cid, 5)
                else
                        npcHandler:say("You are not filled with the fury of the imprisoned demon. Return when you are better prepared.", cid)
                        npcHandler:doTopic(cid, 0)
                end
       elseif(msgcontains(msg, "yes")) and (npcHandler.Topic == 5) then 
                if (getPlayerStorageValue(cid, 202) == 1) then                       
                        npcHandler:say("So, you have managed to pass the seal of the true path. Have you passed any other seal yet?",cid)
                        npcHandler:doTopic(cid, 6)
                else
                        npcHandler:say("You have not found your true path yet. Return when you are better prepared.", cid)
                        npcHandler:doTopic(cid, 0)
                end
       elseif(msgcontains(msg, "yes")) and (npcHandler.Topic == 6) then 
                if (getPlayerStorageValue(cid, 201) == 1) then
                        setPlayerStorageValue(cid, 1348, 1)                    
                        npcHandler:say("I see! You have mastered the seal of logic. You have made the sacrifice, you have seen the unseen, you possess fortitude, you have filled yourself with power and found your path. You may ask me for my kiss now.",cid)
                        npcHandler:doTopic(cid, 0)
                else
                        npcHandler:say("You have not found your true path yet. Return to meh when you are better prepared.", cid)
                        npcHandler:doTopic(cid, 0)
                end
        elseif(msgcontains(msg, "kiss")) then
            if (getPlayerStorageValue(cid, 1348) == 1) then
                if (getPlayerStorageValue(cid, 206) == 1) then
                        npcHandler:say("You have already received my kiss. You should know better then to ask for it.",cid)
                        npcHandler:doTopic(cid, 0)
                else
                        npcHandler:say("Are you prepared to receive my kiss, even though this will mean that your death as well as a part of your soul will forever belong to me, my dear?",cid)
                        npcHandler:doTopic(cid, 7)
                end
            else
                        npcHandler:say("To receive my kiss you have to pass all other seals first.",cid)
                        npcHandler:doTopic(cid, 0)
            end
        elseif(msgcontains(msg, "yes")) and (npcHandler.Topic == 7) then
                        npcHandler:doTopic(cid, 0)
                        setPlayerStorageValue(cid, 206, 1)
                        addEvent(doSendMagicEffect, 100, getThingPos(cid), 10)
                        addEvent(doSendMagicEffect, 100, {x=32202, y=31812, z=8}, 14)
                        doTeleportThing(cid,{x=32202, y=31812, z=8})
                        npcHandler:setMessage(MESSAGE_TRAVEL, "So be it! Hmmmmmm...")
                        npcHandler:onTravel(cid)
        elseif(msgcontains(msg, "no")) and (npcHandler.Topic > 0) and (npcHandler.Topic < 7) then
                        npcHandler:say("Then try to be better prepared next time we meet.", cid)
                        npcHandler:doTopic(cid, 0)
        elseif(msgcontains(msg, "no")) and (npcHandler.Topic == 7) then
                        npcHandler:say("Perhaps it is the better choice for you, my dear.", cid)
                        npcHandler:doTopic(cid, 0)
        end
        return 1
end

local keywords = {
["name"] = {response = "It hurts me to even think about my mortal past. Its long lost and forgotten. So don't ask me about it!"},
["job"] = {response = "It is my curse to be the eternal guardian of this ancient place."},
["place"] = {response = "It served as a temple, a source of power and ... as a sender for an ancient race in time long gone by and forgotten."},
["race"] = {response = "The race that built this edifice came to this place from the stars. They ran from an enemy even more horrible than even themselves. But they carried the seed of their own destruction in them."},
["seed"] = {response = "This ancient race was annihilated by its own doings, that's all I know. Aeons have passed since then, but the sheer presence of this complex is still defiling and desecrating this area." },
["destruction"] = {response = "This ancient race was annihilated by its own doings, that's all I know. Aeons have passed since then, but the sheer presence of this complex is still defiling and desecrating this area." },
["complex"] = {response = "Its constructors were too strange for you or even me to understand. We cannot know what this ... thing they have built was supposed to be good for. All I can feel is a constant twisting and binding of souls, though that is probably only a side-effect."},
["ghostlands"] = {response = "The place you know as the Ghostlands had a different name once ... and many names thereafter. Too many for me to remember them all."},
["banshee"] = {response = "They are my maidens. They give me comfort in my eternal vigil over the last seal."},
["seal"] = {response = "I am the guardian of the SEVENTH and final seal. The seal to open the last door before ... but perhaps it is better you see it with your own eyes."},
["guardian"] = {response = "I am the guardian of the SEVENTH and final seal. The seal to open the last door before ... but perhaps it is better you see it with your own eyes."},
}
  for v in pairs(keywords) do
    if (msgcontains(msg, v)) then
        npcHandler:say(keywords[v].response, cid)
        npcHandler:doTopic(cid, 0)
    end
  end
  return 1
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, BansheeQueenBehaviour)
npcHandler:addModule(FocusModule:new())
 
Depends, if you are in any topic and doesn't say yes or no, you will stay on topic. Not sure of correct behavior but pretty sure it is that if message does Not contain "yes" in any form, message will be:

Code:
Then try to be better prepared next time we meet.

Also missing information about if you are pz locked!
 
Also missing information about if you are pz locked!

It seems to me that on 7.4 wasn't pz lock in npc's. Like in boat captains.

Depends, if you are in any topic and doesn't say yes or no, you will stay on topic. Not sure of correct behavior but pretty sure it is that if message does Not contain "yes" in any form, message will be:

Code:
Then try to be better prepared next time we meet.

There shouldn't be msg "Then try to be better prepared next time we meet." when you are on topic and you said anything related to this topic.
 
Last edited:
Back
Top