Help me make this npc ask you for this storage to be able to transport
- Storage.Quest.FeasterOfSouls.Bosses.IrgixTheFlimsy.Killed
- Storage.Quest.FeasterOfSouls.Bosses.VokTheFreakish.Killed
- Storage.Quest.FeasterOfSouls.Bosses.UnazTheMean.Killed
Lua:
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
local voices = {
{text = 'ANOTHER RABBIT, HMPF. OR IS IT A FOX? A BAT?! STAY OUT!'} ,
{text = 'Come, take a seat! Or... oh, I see. Feel free to just stand there'}
}
npcHandler:addModule(VoiceModule:new(voices))
local function creatureSayCallback(cid, type, msg)
if not npcHandler:isFocused(cid) then
return false
end
local player = Player(cid)
if msgcontains(msg, "boss") then
if player:getStorageValue(Storage.Quest.FeasterOfSouls.Bosses.TheThaian.Timer) > 1 then
npcHandler:say("You should wait to face the boss", cid)
npcHandler.topic[cid] = 1
elseif player:getStorageValue(Storage.Quest.FeasterOfSouls.Bosses.TheThaian.Timer) < 1 then
player:teleportTo({x = 33898, y = 31887, z = 8})
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
npcHandler.topic[cid] = 0
end
return true
end
end
keywordHandler:addKeyword({'thaian'}, StdModule.say, {npcHandler = npcHandler, text = 'So you found non. No crystals, none at all. Go in to the dungeon and try to farm more luminescent crystals.'})
keywordHandler:addKeyword({'need'}, StdModule.say, {npcHandler = npcHandler, text = 'Nrgaaaah! Get back if you have enough info from {Spectulus}...'})
keywordHandler:addKeyword({'report'}, StdModule.say, {npcHandler = npcHandler, text = 'You have to find the way how to acces to the dungeon first.'})
keywordHandler:addKeyword({'mission'}, StdModule.say, {npcHandler = npcHandler, text = 'You have to find the way how to acces to the dungeon first.'})
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())