This is something you should predefine. You should know what weapons are to be used with your character and thus should define how to use them.. For example, I used to use this procedure in stealth (Dunno about EUO)
procedure CheckSpecial(Wep:Cardinal; Ability:String; Special:String; Hands:Integer);
begin
  if( Hands = 1 ) then
  begin
    if( GetType(ObjAtLayer(RHandLayer())) = Wep ) then
    begin
      if( (GetActiveAbility<> Ability) AND (GetMana(SELFID)>10) ) then
      begin
        if( Special = 'Primary' ) then
        begin
          UsePrimaryAbility;
        end;
        if( Special = 'Secondary' ) then
        begin
          UseSecondaryAbility;
        end;
        ClientPrint(GetActiveAbility);
        wait(175);
      end;
    end;
  end;
  
  if( Hands = 2 ) then
  begin
    if( GetType(ObjAtLayer(LHandLayer())) = Wep ) then
    begin
      if( (GetActiveAbility<> Ability) AND (GetMana(SELFID)>10) ) then
      begin
        if( Special = 'Primary' ) then
        begin
          UsePrimaryAbility;
        end;
        if( Special = 'Secondary' ) then
        begin
          UseSecondaryAbility;
        end;
        ClientPrint(GetActiveAbility);
        wait(175);
      end;
    end;
  end;
end;
And I call it via this as an example for a composite bow.
CheckSpecial($26C2,'Armor Ignore','Primary',2);
It's not the prettiest or even probably close to the best way to do it (You could predefine an entire library of weapons if you wanted and employ it some way.)