-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
- 0 respostas
- 481 visualizações
-
- 0 respostas
- 1570 visualizações
-
- 0 respostas
- 1204 visualizações
-
- 2 respostas
- 2050 visualizações
-
script alguém pode me ajudar nessa spells aqui, queira que colocassem pro meu personagem ficar inatingível por 6 segundos e podendo atacar livremente
Por lazaroszz,
- 0 respostas
- 1033 visualizações
-

Pergunta
espalha 1
Bom eu tenho um npc de mission aqui, ele é igual a um outro, que você pega os items, faz as missões entrega-os para o npc, e ele te da acesso a uma porta.
Só que esse npc não tá respondendo, alguém pode me ajudar?
Script.
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, 'castle') and getPlayerStorageValue(cid, 60083) == -1 and getPlayerStorageValue(cid, 60081) == -1 then npcHandler:say('This castle was built for Prince Kober, but since the {vampires} appeared, it just isnt the same.', cid) talk_state = 5 elseif msgcontains(msg, 'vampires') and talk_state == 5 then npcHandler:say('The legend says they built giant {caves} under this castle.', cid) talk_state = 6 elseif msgcontains(msg, 'caves') and talk_state == 6 then npcHandler:say('Yes, dark, forgotten caves. I can let you go there, but you have to do me a {favour} first.', cid) talk_state = 7 elseif msgcontains(msg, 'favour') and talk_state == 7 then npcHandler:say('I was traveling past the {western steppes}. I found some ancient ruins, so I went to the caves. I saw so much evil, and I met Medusa. She stole something {precious} of mine.', cid) talk_state = 8 elseif msgcontains(msg, 'western steppes') then npcHandler:say('It is big plain, west of Intiri. You can find lots of dry grass, insect swarms and sandcrawlers there. Search for my {precious} in the serpents cave, in the middle of it.', cid) doPlayerSetStorageValue(cid,60081, 1) talk_state = 0 elseif msgcontains(msg, 'precious') then npcHandler:say('My old diary. I would really appreciate it if you found it. I will reward you. You can ask me about {western steppes}, if you still do not know where to search for my diary.', cid) doPlayerSetStorageValue(cid,60081, 1) talk_state = 0 elseif (msgcontains(msg, 'diary') or msgcontains(msg, 'reward') or msgcontains(msg, 'castle')) and getPlayerItemCount(cid,1961) < 1 and getPlayerStorageValue(cid, 60083) == -1 then npcHandler:say('You havw not found my diary yet.', cid) elseif getPlayerStorageValue(cid, 60081) == 1 and getPlayerStorageValue(cid, 60083) == -1 and (msgcontains(msg, 'diary') or msgcontains(msg, 'castle') or msgcontains(msg, 'reward')) then if getPlayerItemCount(cid,1961) >= 1 then if doPlayerRemoveItem(cid,1961,1) then npcHandler:say('Oh thank you so much! Alright, you can pass the doors to caves now.', cid) doPlayerSetStorageValue(cid,60083, 1) talk_state = 0 end end ------------------------------------------------ confirm no ------------------------------------------------ -- 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 end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())Link para o comentário
https://xtibia.com/forum/topic/190896-npc-de-mission-n%C3%A3o-responde/Compartilhar em outros sites
5 respostass a esta questão
Posts Recomendados