Well this is quite illegal if it's doing this by automatically. Doesn't matter if it's LUA or not
The reason why Multiboxing for example is legal, is because the player controls all the actions.
If multiboxing where so that your other characters automatically threw Lesse Healing Wave when you are at 50% health then it would be illegal.
So this program wouldn't be illegal really if you had to press a button all the time to actually request the duel.
But seeing as it's not it is always checking and doing things without the player needing to do anything it's illegal