function setButtonType( obj, type) { with(obj) { if (type == 1) { red = 0.5; green = 0.5; blue = 0.5; this.(@ obj @ "_Type") = type; } } player.chat = this.TGuild_Button5_Type; }