Postado Dezembro 13, 2012 12 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, 'present') and getPlayerVocation(cid) == 1 and getPlayerStorageValue(cid, 3058) < 1 then setPlayerStorageValue(cid, 21718, 1) doPlayerAddItem(cid,2160,1) selfSay("Pegue este item.", cid) if msgcontains(msg, 'present') and getPlayerVocation(cid) == 2 and getPlayerStorageValue(cid, 3058) < 1 then setPlayerStorageValue(cid, 21718, 1) doPlayerAddItem(cid,2160,1) selfSay("Pegue este item.", cid) if msgcontains(msg, 'present') and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 3058) < 1 then setPlayerStorageValue(cid, 21718, 1) doPlayerAddItem(cid,2160,1) selfSay("Pegue este item.", cid) if msgcontains(msg, 'present') and getPlayerVocation(cid) == 4 and getPlayerStorageValue(cid, 3058) < 1 then setPlayerStorageValue(cid, 21718, 1) doPlayerAddItem(cid,2160,1) selfSay("Pegue este item.", cid) end end end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Dezembro 13, 2012 12 anos Copia esse e cola no seu npc/script e tenta 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, 'present') and getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 and getPlayerStorageValue(cid, 21718) < 1 then setPlayerStorageValue(cid, 21718, 1) doPlayerAddItem(cid,2160,1) selfSay("Pegue este item.", cid) if msgcontains(msg, 'present') and getPlayerVocation(cid) == 2 and getPlayerStorageValue(cid, 21718) < 1 then setPlayerStorageValue(cid, 21718, 1) doPlayerAddItem(cid,2160,1) selfSay("Pegue este item.", cid) if msgcontains(msg, 'present') and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 21718) < 1 then setPlayerStorageValue(cid, 21718, 1) doPlayerAddItem(cid,2160,1) selfSay("Pegue este item.", cid) if msgcontains(msg, 'present') and getPlayerVocation(cid) == 4 and getPlayerStorageValue(cid, 21718) < 1 then setPlayerStorageValue(cid, 21718, 1) doPlayerAddItem(cid,2160,1) selfSay("Pegue este item.", cid) if msgcontains(msg, 'present') and getPlayerVocation(cid) == 5 and getPlayerStorageValue(cid, 21718) < 1 then setPlayerStorageValue(cid, 21718, 1) doPlayerAddItem(cid,2160,1) selfSay("Pegue este item.", cid) if msgcontains(msg, 'present') and getPlayerVocation(cid) == 6 and getPlayerStorageValue(cid, 21718) < 1 then setPlayerStorageValue(cid, 21718, 1) doPlayerAddItem(cid,2160,1) selfSay("Pegue este item.", cid) if msgcontains(msg, 'present') and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 21718) < 1 then setPlayerStorageValue(cid, 21718, 1) doPlayerAddItem(cid,2160,1) selfSay("Pegue este item.", cid) if msgcontains(msg, 'present') and getPlayerVocation(cid) == 8 and getPlayerStorageValue(cid, 21718) < 1 then setPlayerStorageValue(cid, 21718, 1) doPlayerAddItem(cid,2160,1) selfSay("Pegue este item.", cid) end end end end end end end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Postado Dezembro 14, 2012 12 anos Autor Ainda não funcionou. :X (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Dezembro 14, 2012 12 anos Ainda não funcionou. :X Informe o erro, e cola o script como vc pos la
Postado Dezembro 15, 2012 12 anos Autor É o mesmo script seu, só alterei o item, 3048 (Um ring), quando fala "present" pro npc ele não entrega o ring, e não da nenhum erro. (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
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.