Postado Março 26, 2015 10 anos Solução Up você testou o meu ? continuou dando o mesmo erro ? como você vê acima eu e o snows postamos e tu vem e só da um "up", não estamos na sua mente pra saber o que aconteceu então de maiores informações ou pelo menos fale que o erro persiste, é a segunda vez que já estou te falando sobre isso, na próxima não faço nem questão de ajudar, pois se tu mesmo não se ajuda por que eu vou ajudar... abrçs #edit já aproveita e tenta esse : Ajudante.lua local items = { voc1 = { {2160, 10}, {2159, 10}, {9778, 2}, }, voc2 = { {2159, 12}, {2160, 12}, }, voc3 = { {2159, 11}, {2160, 11}, }, voc4 = { {2159, 13}, {2160, 13}, }, } local storage = 6554 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 msg = msg:lower() if getPlayerStorageValue(cid, storage) >= 1 then selfSay("Ja lhe entreguei os items, suma!", cid) return true end if msgcontains(msg, "yes") then if getPlayerVocation(cid) == 1 then for x = 1, #items.voc1 do doPlayerAddItem(cid, items.voc1[x][1], items.voc1[x][2]) end setPlayerStorageValue(cid, storage, 1) selfSay("Aqui, tome seus items.", cid) elseif getPlayerVocation(cid) == 2 then for x = 1, #items.voc2 do doPlayerAddItem(cid, items.voc2[x][1], items.voc2[x][2]) end setPlayerStorageValue(cid, storage, 1) selfSay("Aqui, tome seus items.", cid) elseif getPlayerVocation(cid) == 3 then for x = 1, #items.voc3 do doPlayerAddItem(cid, items.voc3[x][1], items.voc3[x][2]) end setPlayerStorageValue(cid, storage, 1) selfSay("Aqui, tome seus items.", cid) elseif getPlayerVocation(cid) == 4 then for x = 1, #items.voc4 do doPlayerAddItem(cid, items.voc4[x][1], items.voc4[x][2]) end setPlayerStorageValue(cid, storage, 1) selfSay("Aqui, tome seus items.", cid) end elseif msgcontains(msg, "no") then selfSay("Bye!!") end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) <?xml version="1.0" encoding="UTF-8"?> <npc name="Ajudante" script="Ajudante.lua" walkinterval="2000" speechbubble="1" floorchange="0"> <health now="100" max="100" /> <look type="160" head="98" body="95" legs="115" feet="114" addons="0"/> <parameters> <parameter key="message_greet" value="Ola, voce precisa de ajuda ? Eu dou items para os iniciantes! Quer os items ?" /> </parameters> </npc> Editado Março 26, 2015 10 anos por Summ (veja o histórico de edições)
Postado Março 26, 2015 10 anos Autor você testou o meu ? continuou dando o mesmo erro ? como você vê acima eu e o snows postamos e tu vem e só da um "up", não estamos na sua mente pra saber o que aconteceu então de maiores informações ou pelo menos fale que o erro persiste, é a segunda vez que já estou te falando sobre isso, na próxima não faço nem questão de ajudar, pois se tu mesmo não se ajuda por que eu vou ajudar... abrçs #edit já aproveita e tenta esse : Ajudante.lua local items = { voc1 = { {2160, 10}, {2159, 10}, {9778, 2}, }, voc2 = { {2159, 12}, {2160, 12}, }, voc3 = { {2159, 11}, {2160, 11}, }, voc4 = { {2159, 13}, {2160, 13}, }, } local storage = 6554 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 msg = msg:lower() if getPlayerStorageValue(cid, storage) >= 1 then selfSay("Ja lhe entreguei os items, suma!", cid) return true end if msgcontains(msg, "yes") then if getPlayerVocation(cid) == 1 then for x = 1, #items.voc1 do doPlayerAddItem(cid, items.voc1[x][1], items.voc1[x][2]) end setPlayerStorageValue(cid, storage, 1) selfSay("Aqui, tome seus items.", cid) elseif getPlayerVocation(cid) == 2 then for x = 1, #items.voc2 do doPlayerAddItem(cid, items.voc2[x][1], items.voc2[x][2]) end setPlayerStorageValue(cid, storage, 1) selfSay("Aqui, tome seus items.", cid) elseif getPlayerVocation(cid) == 3 then for x = 1, #items.voc3 do doPlayerAddItem(cid, items.voc3[x][1], items.voc3[x][2]) end setPlayerStorageValue(cid, storage, 1) selfSay("Aqui, tome seus items.", cid) elseif getPlayerVocation(cid) == 4 then for x = 1, #items.voc4 do doPlayerAddItem(cid, items.voc4[x][1], items.voc4[x][2]) end setPlayerStorageValue(cid, storage, 1) selfSay("Aqui, tome seus items.", cid) end elseif msgcontains(msg, "no") then selfSay("Bye!!") end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) <?xml version="1.0" encoding="UTF-8"?> <npc name="Ajudante" script="Ajudante.lua" walkinterval="2000" speechbubble="1" floorchange="0"> <health now="100" max="100" /> <look type="160" head="98" body="95" legs="115" feet="114" addons="0"/> <parameters> <parameter key="message_greet" value="Ola, voce precisa de ajuda ? Eu dou items para os iniciantes! Quer os items ?" /> </parameters> </npc> Vlw o seu Funcionou! Vlw msm 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.