Postado Fevereiro 8, 2015 10 anos Autor amigo ocorreu este erro : [07/02/2015 22:00:27] [Error - Npc interface] [07/02/2015 22:00:27] data/npc/scripts/item.lua:onCreatureSay [07/02/2015 22:00:27] Description: [07/02/2015 22:00:27] data/npc/lib/npcsystem/npchandler.lua:390: attempt to call local 'callback' (a string value) [07/02/2015 22:00:27] stack traceback: [07/02/2015 22:00:27] data/npc/lib/npcsystem/npchandler.lua:390: in function 'onCreatureSay' [07/02/2015 22:00:27] data/npc/scripts/item.lua:7: in function <data/npc/scripts/item.lua:7> Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizações
Postado Fevereiro 8, 2015 10 anos @Zet0N0Murmurou porque não testou o meu ? se tiver algo contra minha pessoa só falar que eu não se dou o trabalho nem de olhar seus tópicos...
Postado Fevereiro 8, 2015 10 anos Autor Desculpe-me eu testei é pq eu não dei spoil o seu tbm n funfo desculpe-me se pareci ignorante ignorando sua ajuda Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizações
Postado Fevereiro 8, 2015 10 anos Solução 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 if(msgcontains(msg, 'item')) then if(getPlayerStorageValue(cid, 99746) == -1) then npcHandler:say('Opa, então voce ainda não tem items e precisa de ajuda ? tome isto vai lhe ajudar em sua jornada', cid) doPlayerAddItem(cid, 2160, 100) setPlayerStorageValue(cid, 99746, 1) return true end else npcHandler:say('Saia daqui já lhe ajudei', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Te ajudei? Se você achar que eu mereço, me dê uma "rep+" e selecione meu post como "melhor resposta" Skype: JoadsonAion
Postado Fevereiro 8, 2015 10 anos Autor 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 if(msgcontains(msg, 'item')) then if(getPlayerStorageValue(cid, 99746) == -1) then npcHandler:say('Opa, então voce ainda não tem items e precisa de ajuda ? tome isto vai lhe ajudar em sua jornada', cid) doPlayerAddItem(cid, 2160, 100) setPlayerStorageValue(cid, 99746, 1) return true end else npcHandler:say('Saia daqui já lhe ajudei', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Funcionou!!! Vlw Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizações
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.