The optimal decision for an agent to make at a given game situation often depends on the decisions that other agents make at the same time. Rational agents will try to find a stable equilibrium before taking an action. Rational agents can use the negotiation mechanism to reach the equilibrium. In the previous work, we proposed the communication actions of paying guarantee or compensation to convince or persuade other agents and a negotiation protocol for agents to communicate with a trusted third party. In this paper, we extend the negotiation mechanism to deal with n-by-n games and justify its optimality with the underlying assumptions. During the negotiation process, each agent makes suggestions on how they can reach equilibrium while maximizing its own payoff. The mechanism can deal with all the game situations and find an acceptable equilibrium that gives optimal payoffs.