Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Bom dia. A demon oak do meu server funciona igual a do global, porém tentando testar ela achei um bug no NPC Oldrak que impossibilita fazer a quest. Qualquer palavra chave que diz a ele, ao inves dele executar o a liberação ou dar o axe ele simplesmente só repete "I won't discuss any further with you for now." para qualquer coisa que diz a ele, além de mandar duas perguntas juntas que deveriam ser separadas no caso uma quando vai pegar o axe e outra depois que termina de fazer a quest.
Alguém saberia me dizer o que está errado nesse script?
Obrigado.

 

Imagem:

 

 


XP2S1CL.png
 

 

 

NPC:

 

 


local keywordHandler = KeywordHandler:new()
		local npcHandler = NpcHandler:new(keywordHandler)
		NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
		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
		-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
		    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
		    if (not npcHandler:isFocused(cid)) then
		        return false
		    end

     if msgcontains(msg, "infested area") or msgcontains(msg, "demon oak") then
		       npcHandler:say('How do you know? Did you go into the infested area?', cid)
		       talk_state = 1
		       elseif msgcontains(msg, 'yes') and talk_state == 1 then
		        if getPlayerStorageValue(cid, 35735) == 1 then
		                       npcHandler:say('I have searched for dareful heroes like you. ...', cid)
		                       npcHandler:say('Take this axe and bring that damn demon oak down, report back to me when you are done. The world depends on you now, kid. ...', cid)
		                        npcHandler:say('Good luck, I mean it.', cid)
		                       doPlayerSetStorageValue(cid, 35738, 1)
		                       DoPlayerAddItem(cid, 8293, 1)
		                       talk_state = 0
		                end
		            else
		                npcHandler:say('I won\'t discuss any further with you for now.', cid)
		                talk_state = 0
		            end
		     if getPlayerStorageValue(cid, 35735) == 1 and msgcontains(msg, "infested area") or msgcontains(msg, "demon oak") then
		                npcHandler:say('Did you really defeat it?', cid)
		                talk_state = 2
		        elseif msgcontains(msg, 'yes') and talk_state == 2 then
		            if getPlayerStorageValue(cid, 35700) == 1 then
		              npcHandler:say('You chopped down the demon oak?!? Unbelievable!! Let\'s hope it doesn\'t come back. As long as evil is still existent in the soil of the plains, it won\'t be over. Still, the demons suffered a setback, that\'s for sure. ...', cid)
		              npcHandler:say('For your brave action, I tell you a secret which has been kept for many many years. There is an old house south of the location where you found the demon oak. There should be a grave with the name \'Yesim Adeit\' somewhere close by. ...', cid)
		              npcHandler:say('It belongs to a Daramian nobleman named \'Teme Saiyid\'. I knew him well and he told me -almost augured- that someone will come who is worthy to obtain his treasure. I\'m sure this \'someone\' is you. Good luck in finding it!', cid)
		        doPlayerSetStorageValue(cid, 35700, 2)
		                talk_state = 0
		            else
		                npcHandler:say('Have you entered the infested area yet?', cid)
		                talk_state = 0
		            end

        elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 3) then
		            npcHandler:say('Bye.', cid)
		            talk_state = 0
		        end
		    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
		    return true
		end

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

 

 

 

 

 

Editado por dimmebag (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
3 horas atrás, DboExplorer disse:

Ele fica dando essa mensagem porque o player precisar ter a Storage 35700,1

 

Não é isso o problema. Já tentei alterar e não muda nada.

Link para o post
Compartilhar em outros sites
local keywordHandler = KeywordHandler:new()
		local npcHandler = NpcHandler:new(keywordHandler)
		NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
		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
		-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
		    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
	if (not npcHandler:isFocused(cid)) then
		return false
	end

	if msgcontains(msg, "infested area") or msgcontains(msg, "demon oak") then
		if getPlayerStorageValue(cid, 35735) == 1 then
			npcHandler:say('Did you really defeat it?', cid)
			talk_state = 2
		else
			npcHandler:say('How do you know? Did you go into the infested area?', cid)
			talk_state = 1
		end
			   
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
		if getPlayerStorageValue(cid, 35735) == 1 then
		   npcHandler:say('I have searched for dareful heroes like you. ...', cid)
		   npcHandler:say('Take this axe and bring that damn demon oak down, report back to me when you are done. The world depends on you now, kid. ...', cid)
		   npcHandler:say('Good luck, I mean it.', cid)
		   doPlayerSetStorageValue(cid, 35738, 1)
		   DoPlayerAddItem(cid, 8293, 1)
		   talk_state = 0
		else
		   npcHandler:say('I won\'t discuss any further with you for now.', cid)
		   talk_state = 0
		end
		
	elseif msgcontains(msg, 'yes') and talk_state == 2 then
		if getPlayerStorageValue(cid, 35700) == 1 then
			npcHandler:say('You chopped down the demon oak?!? Unbelievable!! Let\'s hope it doesn\'t come back. As long as evil is still existent in the soil of the plains, it won\'t be over. Still, the demons suffered a setback, that\'s for sure. ...', cid)
			npcHandler:say('For your brave action, I tell you a secret which has been kept for many many years. There is an old house south of the location where you found the demon oak. There should be a grave with the name \'Yesim Adeit\' somewhere close by. ...', cid)
			npcHandler:say('It belongs to a Daramian nobleman named \'Teme Saiyid\'. I knew him well and he told me -almost augured- that someone will come who is worthy to obtain his treasure. I\'m sure this \'someone\' is you. Good luck in finding it!', cid)
			doPlayerSetStorageValue(cid, 35700, 2)
			talk_state = 0
		else
			npcHandler:say('Have you entered the infested area yet?', cid)
			talk_state = 0
		end
		
	elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 3) then
		npcHandler:say('Bye.', cid)
		talk_state = 0
	end
		    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
	return true
end

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

 

Acho que arrumei. Testa ae

Link para o post
Compartilhar em outros sites
51 minutos atrás, Weslley Kiyo disse:

local keywordHandler = KeywordHandler:new()
		local npcHandler = NpcHandler:new(keywordHandler)
		NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
		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
		-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
		    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
	if (not npcHandler:isFocused(cid)) then
		return false
	end

	if msgcontains(msg, "infested area") or msgcontains(msg, "demon oak") then
		if getPlayerStorageValue(cid, 35735) == 1 then
			npcHandler:say('Did you really defeat it?', cid)
			talk_state = 2
		else
			npcHandler:say('How do you know? Did you go into the infested area?', cid)
			talk_state = 1
		end
			   
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
		if getPlayerStorageValue(cid, 35735) == 1 then
		   npcHandler:say('I have searched for dareful heroes like you. ...', cid)
		   npcHandler:say('Take this axe and bring that damn demon oak down, report back to me when you are done. The world depends on you now, kid. ...', cid)
		   npcHandler:say('Good luck, I mean it.', cid)
		   doPlayerSetStorageValue(cid, 35738, 1)
		   DoPlayerAddItem(cid, 8293, 1)
		   talk_state = 0
		else
		   npcHandler:say('I won\'t discuss any further with you for now.', cid)
		   talk_state = 0
		end
		
	elseif msgcontains(msg, 'yes') and talk_state == 2 then
		if getPlayerStorageValue(cid, 35700) == 1 then
			npcHandler:say('You chopped down the demon oak?!? Unbelievable!! Let\'s hope it doesn\'t come back. As long as evil is still existent in the soil of the plains, it won\'t be over. Still, the demons suffered a setback, that\'s for sure. ...', cid)
			npcHandler:say('For your brave action, I tell you a secret which has been kept for many many years. There is an old house south of the location where you found the demon oak. There should be a grave with the name \'Yesim Adeit\' somewhere close by. ...', cid)
			npcHandler:say('It belongs to a Daramian nobleman named \'Teme Saiyid\'. I knew him well and he told me -almost augured- that someone will come who is worthy to obtain his treasure. I\'m sure this \'someone\' is you. Good luck in finding it!', cid)
			doPlayerSetStorageValue(cid, 35700, 2)
			talk_state = 0
		else
			npcHandler:say('Have you entered the infested area yet?', cid)
			talk_state = 0
		end
		
	elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 3) then
		npcHandler:say('Bye.', cid)
		talk_state = 0
	end
		    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
	return true
end

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

 

Acho que arrumei. Testa ae





17:50 Oldrak: Welcome GOD Dante! Rarely I can welcome visitors in these days.
17:50 GOD Dante [1]: infested area
17:50 Oldrak: Did you really defeat it?
17:50 GOD Dante [1]: yes
17:50 Oldrak: Have you entered the infested area yet?
17:50 GOD Dante [1]: yes
17:50 GOD Dante [1]: demon oak
17:50 Oldrak: Did you really defeat it?
17:50 GOD Dante [1]: yes
17:50 Oldrak: Have you entered the infested area yet?
17:50 GOD Dante [1]: yes
17:50 GOD Dante [1]: yes
17:50 GOD Dante [1]: no
17:50 GOD Dante [1]: bye
17:50 Oldrak: Good bye, GOD Dante!



Não funcionou.
Link para o post
Compartilhar em outros sites
local keywordHandler = KeywordHandler:new()
	local npcHandler = NpcHandler:new(keywordHandler)
	NpcSystem.parseParameters(npcHandler)
	local  talkState = {}

-- OTServ event handling functions start
		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
		-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
	if (not npcHandler:isFocused(cid)) then
		return false
	end

	local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
	if msgcontains(msg, "infested area") or msgcontains(msg, "demon oak") then
		if getPlayerStorageValue(cid, 35735) == 1 then
			npcHandler:say('Did you really defeat it?', cid)
			talkState[talkUser] = 2
		else
			npcHandler:say('How do you know? Did you go into the infested area?', cid)
			talkState[talkUser] = 1
		end
			   
	elseif msgcontains(msg, 'yes') then
	  if talkState[talkUser] == 1 then
		if getPlayerStorageValue(cid, 35735) == 1 then
		   npcHandler:say('I have searched for dareful heroes like you. ...', cid)
		   npcHandler:say('Take this axe and bring that damn demon oak down, report back to me when you are done. The world depends on you now, kid. ...', cid)
		   npcHandler:say('Good luck, I mean it.', cid)
		   doPlayerSetStorageValue(cid, 35738, 1)
		   DoPlayerAddItem(cid, 8293, 1)
		   talkState[talkUser] = 0
		else
		   npcHandler:say('I won\'t discuss any further with you for now.', cid)
		   talkState[talkUser] = 0
		end
	  end
		
	elseif msgcontains(msg, 'yes') then
	  if talkState[talkUser] == 2 then
		if getPlayerStorageValue(cid, 35700) == 1 then
			npcHandler:say('You chopped down the demon oak?!? Unbelievable!! Let\'s hope it doesn\'t come back. As long as evil is still existent in the soil of the plains, it won\'t be over. Still, the demons suffered a setback, that\'s for sure. ...', cid)
			npcHandler:say('For your brave action, I tell you a secret which has been kept for many many years. There is an old house south of the location where you found the demon oak. There should be a grave with the name \'Yesim Adeit\' somewhere close by. ...', cid)
			npcHandler:say('It belongs to a Daramian nobleman named \'Teme Saiyid\'. I knew him well and he told me -almost augured- that someone will come who is worthy to obtain his treasure. I\'m sure this \'someone\' is you. Good luck in finding it!', cid)
			doPlayerSetStorageValue(cid, 35700, 2)
			talkState[talkUser] = 0
		else
			npcHandler:say('Have you entered the infested area yet?', cid)
			talkState[talkUser] = 0
		end
	  end
		
	elseif(msgcontains(msg, "no") and isInArray({1,2}, talkState[talkUser])) then
		npcHandler:say('Bye.', cid)
		talkState[talkUser] = 0
	end
	return true
end

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

 

Não prestei atenção e deixei o script ainda bugado k

Tenta agora @dimmebag.

Editado por Weslley Kiyo (veja o histórico de edições)
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.


  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo