Xtibianos venho pedir ajuda nesse script do npc de troca, quero que ele apenas faça a troca uma unica vez, toda vez que falo trocar ele sempre fica trocando. 
  
function creatureSayCallback(cid, type, msg) 
  
    if(not npcHandler:isFocused(cid)) then 
        return false 
    end 
  
    if msgcontains(msg, "trocar") then 
	  if getPlayerStorageValue(cid,574226) ~= 1 then    
        if playerHaveItems(cid, {8853, 2694}) then 
            doPlayerRemoveItems(cid, {8853, 2694}, 30) 
            doPlayerAddItem(cid, 7884, 1) 
	        setPlayerStorageValue(cid, 574226, 1)             
        else 
            selfSay("Voce nao tem os items nescessarios para a quest.") 
        end 
      end  
    end   
    return true 
end 
  
Como coloco para trocar apenas uma vez? Obrigado.