You must have the quest, 'Lost Tribe' completed. You will get two emotes, 'Goblin Bow' and 'Goblin Dance'. To use this dueling glitch, you will have to mass click the x x x x x x right x x x x x x you get into the dueling options screen. After the duel has started, click the x x x x x x x x x x x x right before you cast a spell. This will enable you to use magic, regardless if the magic option was turned off or not. Make sure you perform the in-duel method x x x x x x you get attacked, otherwise you will have to start the whole process over again.
Everytime you want to cast a spell, you will have to continuously click the xxxxxx xxxxxx right before you cast a spell.