Well you'll need to have the character you want to buff targeted, or something like dannet going and the knowhow to utilize it.
But assuming it's your target.
/if (${Target.ID} == ${Group.MainAssist.ID} && !${Target.Buff[Talisman of the Lion].ID}) /cast ${Me.Gem[${Spell[Talisman of the Lion]}]}
I believe should be sufficient. The spell type is GroupV2. So assuming it's possible to cast it on them by simply targeting them and casting it with the implied Target Group Buff.
An alternate would be that since casting it on them, would also cast it on you, you can force it to target them if YOU don't have the buff.
/if (!${Me.Buff[${Me.Book[Talisman of the Lion].RankName}].ID} && ${Group.MainAssist.ID}) /multiline ; /target id ${Group.MainAssist.ID}; /cast ${Me.Gem[${Spell[Talisman of the Lion]}]}
I'm not 100% on the ${Me.Gem bit and not in game to verify.