Ir para conteúdo
  • Cadastre-se

[Resolvido] HELP NO NPC The Queen Of The Banshee


Posts Recomendados

GALERA NÃO ESTOU CONSEGUINDO ARRUMAR ESTE NPC, ALGUÉM ME AJUDE AI, DAREI 3 REP + PARA QUEM ME AJUDA...

NÃO ESTÁ FUNCIONANDO NA PARTE DOS ADDON E DA ESTE ERRO QUANDO TENDO CRIAR O NPC NO COMANDO /N

[16:4:20.089] [Error - LuaInterface::loadFile] data/npc/scripts/Queen Banshee.lua:180: '<eof>' expected near 'end'

[16:4:20.089] [Warning - NpcEvents::NpcEvents] Cannot load script: data/npc/scripts/Queen Banshee.lua

[16:4:20.089] data/npc/scripts/Queen Banshee.lua:180: '<eof>' expected near 'end'

\------------------------NPC---------------------------/

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)

local talkState = {}

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) end

if(not npcHandler:isFocused(cid)) then

return false

end

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

-- NPC The Queen of the Banshees feito por Rodrigo (Nottinghster)

-- Inicio The Queen of the Banshees NPC

local primeiro_selo = getPlayerStorageValue(cid, 32998)

local segundo_selo = getPlayerStorageValue(cid, 32997)

local terceiro_selo = getPlayerStorageValue(cid, 32996)

local quarto_selo = getPlayerStorageValue(cid, 32995)

local quinto_selo = getPlayerStorageValue(cid, 32994)

local sexto_selo = getPlayerStorageValue(cid, 32993)

local setimo_selo = getPlayerStorageValue(cid, 41992)

local teletransporte = {x=32202, y=31812, z=8, stackpos =0}

if msgcontains(msg, 'seventh') and getPlayerLevel(cid) < 60 or msgcontains(msg, 'last') and getPlayerLevel(cid) < 60 then

selfSay("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)

elseif msgcontains(msg,'seventh') and getPlayerLevel(cid) > 59 or msgcontains(msg, 'last') and getPlayerLevel(cid) > 59 then

selfSay("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)

talk_state = 2

elseif msgcontains(msg, 'kiss') and setimo_selo == -1 and talk_state == 8 then

selfSay('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)

talk_state = 1

elseif msgcontains(msg, 'kiss') and setimo_selo == -1 then

selfSay('To receive my kiss you have to pass all other seals first.',cid)

talk_state = 0

elseif msgcontains(msg, 'kiss') and setimo_selo == 1 then

selfSay('You have already received my kiss. You should know better then to ask for it.',cid)

talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 1 then

selfSay('So be it! Hmmmmmm...',cid)

doTeleportThing(cid, teletransporte)

setPlayerStorageValue(cid, 41998, 1)

setPlayerStorageValue(cid, 41997, 1)

setPlayerStorageValue(cid, 41996, 1)

setPlayerStorageValue(cid, 41995, 1)

setPlayerStorageValue(cid, 41994, 1)

setPlayerStorageValue(cid, 41993, 1)

setPlayerStorageValue(cid, 41992, 1)

elseif msgcontains(msg, 'no') and talk_state == 1 then

selfSay('Perhaps it is the better choice for you, my dear.',cid)

talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and quarto_selo == 1 then

selfSay('Yessss, I can sense you have passed the seal of sacrifice. Have you passed any other seal yet?',cid)

talk_state = 3

elseif msgcontains(msg, 'yes') and talk_state == 2 and quarto_selo == -1 then

selfSay('You have not passed the seal of sacrifice yet. Return to me when you are better prepared.',cid)

talk_state = 0

elseif msgcontains(msg, 'no') and talk_state == 2 then

selfSay('Then try to be better prepared next time we meet.',cid)

talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 3 and primeiro_selo == 1 then

selfSay('I sense you have passed the hidden seal as well. Have you passed any other seal yet?',cid)

talk_state = 4

elseif msgcontains(msg, 'yes') and talk_state == 3 and primeiro_selo == -1 then

selfSay('You have not found the hidden seal yet. Return when you are better prepared.',cid)

talk_state = 0

elseif msgcontains(msg, 'no') and talk_state == 3 then

selfSay('Then try to be better prepared next time we meet.',cid)

talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 4 and segundo_selo == 1 then

selfSay('Oh yes, you have braved the plagueseal. Have you passed any other seal yet?',cid)

talk_state = 5

elseif msgcontains(msg, 'yes') and talk_state == 4 and segundo_selo == -1 then

selfSay('You have not faced the plagueseal yet. Return to me when you are better prepared.',cid)

talk_state = 0

elseif msgcontains(msg, 'no') and talk_state == 4 then

selfSay('Then try to be better prepared next time we meet.',cid)

talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 5 and terceiro_selo == 1 then

selfSay('Ah, I can sense the power of the seal of demonrage burning in your heart. Have you passed any other seal yet?',cid)

talk_state = 6

elseif msgcontains(msg, 'yes') and talk_state == 5 and terceiro_selo == -1 then

selfSay('You are not filled with the fury of the imprisoned demon. Return when you are better prepared.',cid)

talk_state = 0

elseif msgcontains(msg, 'no') and talk_state == 5 then

selfSay('Then try to be better prepared next time we meet.',cid)

talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 6 and quinto_selo == 1 then

selfSay('So, you have managed to pass the seal of the 1 path. Have you passed any other seal yet?',cid)

talk_state = 7

elseif msgcontains(msg, 'yes') and talk_state == 6 and quinto_selo == -1 then

selfSay('You have not found your 1 path yet. Return when you are better prepared.',cid)

talk_state = 0

elseif msgcontains(msg, 'no') and talk_state == 6 then

selfSay('Then try to be better prepared next time we meet.',cid)

talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 7 and sexto_selo == 1 then

selfSay('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)

talk_state = 8

elseif msgcontains(msg, 'yes') and talk_state == 7 and sexto_selo == -1 then

selfSay('You have not found your 1 path yet. Return to meh when you are better prepared.',cid)

talk_state = 0

elseif msgcontains(msg, 'no') and talk_state == 7 then

selfSay('Then try to be better prepared next time we meet.',cid)

talk_state = 0

elseif (msgcontains(msg, 'spectral dress')) and getPlayerStorageValue(cid, 22327) == -1 then

selfSay('Your wish for a spectral dress is silly. Allthough I will grant you the permission to take one. My maidens left one in a box in a room, directly south of here.',cid)

setPlayerStorageValue(cid, 22327, 1)

doPlayerAddItem(cid, 2657, 1)

elseif (msgcontains(msg, 'bye')) and (talkState[talkUser] >= 1 and talkState[talkUser] <= 8) then

selfSay('We will meet again.',cid)

talkState[talkUser] = 0

elseif msgcontains(msg, 'addon') and getPlayerStorageValue(cid, 10223) ~= 5 then

npcHandler:say("Sorry, but you don\'t have Wizard Outfit !", cid)

elseif msgcontains(msg, "addon") and getPlayerStorageValue(cid, 10224) ~= 1 and getPlayerStorageValue(cid, 10223) == 5 then

npcHandler:say("Say... I have been longing for something for an eternity now... if you help me retrieve it, I will reward you. Do you consent to this arrangement ?", cid)

talkState[talkUser] = 1

elseif msgcontains(msg, "yes") and getPlayerStorageValue(cid, 10224) ~= 1 and getPlayerStorageValue(cid, 10223) == 5 and talkState[talkUser] == 1 then

npcHandler:say("Listen... there are no blooming flowers down here and the only smell present is that of death and decay. ...", cid)

npcHandler:say("I wish that I could breathe the lovely smell of beautiful flowers just one more time, especially those which elves cultivate. ...", cid)

npcHandler:say("Could you please bring me 50 {Holy Orchids} ?", cid)

talkState[talkUser] = 2

elseif msgcontains(msg, "yes") and getPlayerStorageValue(cid, 10224) ~= 1 and getPlayerStorageValue(cid, 10223) == 5 and talkState[talkUser] == 2 then

npcHandler:say("Thank you. I will wait for your return.", cid)

setPlayerStorageValue(cid, 10224, 1)

setPlayerStorageValue(cid, 10225, 1)

talkState[talkUser] = 0

elseif msgcontains(msg, "holy orchid") and getPlayerStorageValue(cid, 10225) == 1 then

npcHandler:say("Have you really brought me 50 Holy Orchids ?", cid)

talkState[talkUser] = 1

elseif msgcontains(msg, "yes") and getPlayerStorageValue(cid, 10225) == 1 and talkState[talkUser] == 1 then

if (doPlayerRemoveItem(cid, 5922, 50) == TRUE) then

npcHandler:say("Thank you! You have no idea what that means to me. As promised, here is your reward... as a follower of Zathroth, I hope that you will like this accessory.", cid)

if getPlayerSex(cid) == 0 then

doPlayerAddOutfit(cid, 149, 2)

else

doPlayerAddOutfit(cid, 145, 2)

end

setPlayerStorageValue(cid, 10225, 2)

talkState[talkUser] = 0

else

npcHandler:say("Sorry, but you don\'t have 50 {Holy Orchids} !", cid)

talkState[talkUser] = 0

end

else

if msgcontains(msg, "addon") then

if getPlayerStorageValue(cid, 10225) <= 1 then

npcHandler:say("Bring me 50x {Holy Orchid} !", cid)

else

npcHandler:say("You have already this addon !", cid)

end

end

end

return true

end

end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

Link para o post
Compartilhar em outros sites
  • 7 months later...
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

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) end
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

-- NPC The Queen of the Banshees feito por Rodrigo (Nottinghster)
-- Inicio The Queen of the Banshees NPC

local primeiro_selo = getPlayerStorageValue(cid, 32998)
local segundo_selo = getPlayerStorageValue(cid, 32997)
local terceiro_selo = getPlayerStorageValue(cid, 32996)
local quarto_selo = getPlayerStorageValue(cid, 32995)
local quinto_selo = getPlayerStorageValue(cid, 32994)
local sexto_selo = getPlayerStorageValue(cid, 32993)
local setimo_selo = getPlayerStorageValue(cid, 41992)
local teletransporte = {x=32202, y=31812, z=8, stackpos =0}

if msgcontains(msg, 'seventh') and getPlayerLevel(cid) < 60 or msgcontains(msg, 'last') and getPlayerLevel(cid) < 60 then
selfSay("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)

elseif msgcontains(msg,'seventh') and getPlayerLevel(cid) > 59 or msgcontains(msg, 'last') and getPlayerLevel(cid) > 59 then
selfSay("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)
talk_state = 2

elseif msgcontains(msg, 'kiss') and setimo_selo == -1 and talk_state == 8 then
selfSay('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)
talk_state = 1
elseif msgcontains(msg, 'kiss') and setimo_selo == -1 then
selfSay('To receive my kiss you have to pass all other seals first.',cid)
talk_state = 0
elseif msgcontains(msg, 'kiss') and setimo_selo == 1 then
selfSay('You have already received my kiss. You should know better then to ask for it.',cid)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 1 then
selfSay('So be it! Hmmmmmm...',cid)
doTeleportThing(cid, teletransporte)
setPlayerStorageValue(cid, 41998, 1)
setPlayerStorageValue(cid, 41997, 1)
setPlayerStorageValue(cid, 41996, 1)
setPlayerStorageValue(cid, 41995, 1)
setPlayerStorageValue(cid, 41994, 1)
setPlayerStorageValue(cid, 41993, 1)
setPlayerStorageValue(cid, 41992, 1)

elseif msgcontains(msg, 'no') and talk_state == 1 then
selfSay('Perhaps it is the better choice for you, my dear.',cid)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and quarto_selo == 1 then
selfSay('Yessss, I can sense you have passed the seal of sacrifice. Have you passed any other seal yet?',cid)
talk_state = 3
elseif msgcontains(msg, 'yes') and talk_state == 2 and quarto_selo == -1 then
selfSay('You have not passed the seal of sacrifice yet. Return to me when you are better prepared.',cid)
talk_state = 0
elseif msgcontains(msg, 'no') and talk_state == 2 then
selfSay('Then try to be better prepared next time we meet.',cid)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 3 and primeiro_selo == 1 then
selfSay('I sense you have passed the hidden seal as well. Have you passed any other seal yet?',cid)
talk_state = 4
elseif msgcontains(msg, 'yes') and talk_state == 3 and primeiro_selo == -1 then
selfSay('You have not found the hidden seal yet. Return when you are better prepared.',cid)
talk_state = 0
elseif msgcontains(msg, 'no') and talk_state == 3 then
selfSay('Then try to be better prepared next time we meet.',cid)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 4 and segundo_selo == 1 then
selfSay('Oh yes, you have braved the plagueseal. Have you passed any other seal yet?',cid)
talk_state = 5
elseif msgcontains(msg, 'yes') and talk_state == 4 and segundo_selo == -1 then
selfSay('You have not faced the plagueseal yet. Return to me when you are better prepared.',cid)
talk_state = 0
elseif msgcontains(msg, 'no') and talk_state == 4 then
selfSay('Then try to be better prepared next time we meet.',cid)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 5 and terceiro_selo == 1 then
selfSay('Ah, I can sense the power of the seal of demonrage burning in your heart. Have you passed any other seal yet?',cid)
talk_state = 6
elseif msgcontains(msg, 'yes') and talk_state == 5 and terceiro_selo == -1 then
selfSay('You are not filled with the fury of the imprisoned demon. Return when you are better prepared.',cid)
talk_state = 0
elseif msgcontains(msg, 'no') and talk_state == 5 then
selfSay('Then try to be better prepared next time we meet.',cid)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 6 and quinto_selo == 1 then
selfSay('So, you have managed to pass the seal of the 1 path. Have you passed any other seal yet?',cid)
talk_state = 7
elseif msgcontains(msg, 'yes') and talk_state == 6 and quinto_selo == -1 then
selfSay('You have not found your 1 path yet. Return when you are better prepared.',cid)
talk_state = 0
elseif msgcontains(msg, 'no') and talk_state == 6 then
selfSay('Then try to be better prepared next time we meet.',cid)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 7 and sexto_selo == 1 then
selfSay('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)
talk_state = 8
elseif msgcontains(msg, 'yes') and talk_state == 7 and sexto_selo == -1 then
selfSay('You have not found your 1 path yet. Return to meh when you are better prepared.',cid)
talk_state = 0
elseif msgcontains(msg, 'no') and talk_state == 7 then
selfSay('Then try to be better prepared next time we meet.',cid)
talk_state = 0

elseif (msgcontains(msg, 'spectral dress')) and getPlayerStorageValue(cid, 22327) == -1 then
selfSay('Your wish for a spectral dress is silly. Allthough I will grant you the permission to take one. My maidens left one in a box in a room, directly south of here.',cid)
setPlayerStorageValue(cid, 22327, 1)
doPlayerAddItem(cid, 2657, 1)

elseif (msgcontains(msg, 'bye')) and (talkState[talkUser] >= 1 and talkState[talkUser] <= 8) then
selfSay('We will meet again.',cid)
talkState[talkUser] = 0



elseif msgcontains(msg, 'addon') and getPlayerStorageValue(cid, 10223) ~= 5 then
npcHandler:say("Sorry, but you don\'t have Wizard Outfit !", cid)


elseif msgcontains(msg, "addon") and getPlayerStorageValue(cid, 10224) ~= 1 and getPlayerStorageValue(cid, 10223) == 5 then
npcHandler:say("Say... I have been longing for something for an eternity now... if you help me retrieve it, I will reward you. Do you consent to this arrangement ?", cid)
talkState[talkUser] = 1

elseif msgcontains(msg, "yes") and getPlayerStorageValue(cid, 10224) ~= 1 and getPlayerStorageValue(cid, 10223) == 5 and talkState[talkUser] == 1 then
npcHandler:say("Listen... there are no blooming flowers down here and the only smell present is that of death and decay. ...", cid)
npcHandler:say("I wish that I could breathe the lovely smell of beautiful flowers just one more time, especially those which elves cultivate. ...", cid)
npcHandler:say("Could you please bring me 50 {Holy Orchids} ?", cid)
talkState[talkUser] = 2

elseif msgcontains(msg, "yes") and getPlayerStorageValue(cid, 10224) ~= 1 and getPlayerStorageValue(cid, 10223) == 5 and talkState[talkUser] == 2 then
npcHandler:say("Thank you. I will wait for your return.", cid)
setPlayerStorageValue(cid, 10224, 1)
setPlayerStorageValue(cid, 10225, 1)
talkState[talkUser] = 0

elseif msgcontains(msg, "holy orchid") and getPlayerStorageValue(cid, 10225) == 1 then
npcHandler:say("Have you really brought me 50 Holy Orchids ?", cid)
talkState[talkUser] = 1

elseif msgcontains(msg, "yes") and getPlayerStorageValue(cid, 10225) == 1 and talkState[talkUser] == 1 then
if (doPlayerRemoveItem(cid, 5922, 50) == TRUE) then
npcHandler:say("Thank you! You have no idea what that means to me. As promised, here is your reward... as a follower of Zathroth, I hope that you will like this accessory.", cid)
if getPlayerSex(cid) == 0 then
doPlayerAddOutfit(cid, 149, 2)
else
doPlayerAddOutfit(cid, 145, 2)
end
setPlayerStorageValue(cid, 10225, 2)
talkState[talkUser] = 0
else
npcHandler:say("Sorry, but you don\'t have 50 {Holy Orchids} !", cid)
talkState[talkUser] = 0
end
else
if msgcontains(msg, "addon") then
if getPlayerStorageValue(cid, 10225) <= 1 then
npcHandler:say("Bring me 50x {Holy Orchid} !", cid)
else
npcHandler:say("You have already this addon !", cid)
end
end
end
return true

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new()) 

Tenta assim, só tirei os dois end das linhas 180 e 181

@editado

adicionei o L que esqueci agora ta ok

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

Dúvida sanada, tag adicionada.

Tópico movido!

"A alma permanece em suas criações" V89E5aN.png


142c9d3439.jpg
(Não dou suporte por mensagem privada.)

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