Postado Janeiro 17, 2014 11 anos Autor Solução Ai achei a solução , coloquei a seguinte função no script, esta resolvido, só para constar dou rep + para os dois , só pela atenção function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid grato mesmo.
Postado Janeiro 17, 2014 11 anos testa assim: 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) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid --- vendedor----- if msgcontains(msg, 'Parcel')or msgcontains(msg, 'Trade')then npcHandler:say("Cara , To Indo Pra Falencia, Faz um tempão que não chega parcel, Vou ficar devendo " , cid ) end ---tarefa 1----- if msgcontains(msg,'tarefa')then if (getPlayerStorageValue(cid, 200) < 1)then npcHandler:say("Não existe tarefa para você." , cid ) end if (getPlayerStorageValue(cid, 201) < 2)and (getPlayerStorageValue(cid, 201) > 0) then npcHandler:say("A Vise ao Marlon que estou sem, que ele mande por navio os itens dele, certo? " , cid ) setPlayerStorageValue(cid, 200, 1) end end -----resposta 1------ if msgcontains(msg, 'yes') and (getPlayerStorageValue(cid, 200) < 2)and (getPlayerStorageValue(cid, 200) > 0) then npcHandler:say("Beleza retorne a ele, e diga o meu recado " , cid ) setPlayerStorageValue(cid, 200, 0) setPlayerStorageValue(cid, 300, 0) setPlayerStorageValue(cid, 201, 2) end if msgcontains(msg, 'no') and (getPlayerStorageValue(cid, 200) < 2)and (getPlayerStorageValue(cid, 200) > 0) then npcHandler:say("Somente diga a ele que não tem, que ele mando via Barco. até mais " , cid ) setPlayerStorageValue(cid, 200, 0) setPlayerStorageValue(cid, 300, 0) setPlayerStorageValue(cid, 201, 2) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) #EDITADO vish, já achou a solução. Editado Janeiro 17, 2014 11 anos por AnneMotta (veja o histórico de edições) 16/11/2014 23/11/2014 RIP AnneMotta 21/01/2012 - 15/01/2014 Liga das lendas: DIAMOND É A META
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.