Resolvido
Postado em agosto 17, 2012
muito sono tenta assim
to saindo aqui flw
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 npcHandler:setMessage(MESSAGE_GREET, "O meu amigo está muito doente e precisa de ajuda pode ajuda-lo??") function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end Sto = getPlayerStorageValue(cid,2491) local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid -- Conversa Jogador/NPC if(msgcontains(msg, 'yes')) and getPlayerItemCount(cid,2515)>=2 and getPlayerItemCount(cid,2391)>=300 then if Sto == -1 then doPlayerAddItem(cid,2152,10) doPlayerRemoveItem(cid,2515,2) doPlayerRemoveItem(cid,2391,300) setPlayerStorageValue(cid,5001,1) setPlayerStorageValue(cid,2491,1) selfSay('Obrigado por me ajudar, pegue essa recompensa.',cid) talkState[talkUser] = 1 else selfSay('Ele está piorando, rapido por favor..',cid) talkState[talkUser] = 1 end return TRUE end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Por Favor quando for fazer pedidos faz o pedido com mais clareza e com os mínimos detalhes
GOSTO DOS MEUS SCRIPT CLICK EM CURTIR :D